Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Blakexx

Members
  • Joined

  • Last visited

Everything posted by Blakexx

  1. Ho, so I used to know how to make a fireball and change the power of the fireball and everything, but I forgot how, so I had to look around for ways to do it, so I got this. Remember I already have the item working so it has nothing to do with my item not being implemented properly into the game. @Override //shoots fireball // public ItemStack onItemRightClick(ItemStack itemstack, World worldIn, EntityPlayer entityplayer) { if (!worldIn.isRemote) { Vec3 look = entityplayer.getLookVec(); EntityLargeFireball fireball2 = new EntityLargeFireball(worldIn, entityplayer, 1, 1, 1); fireball2.setPosition( entityplayer.posX + look.xCoord * 5, entityplayer.posY + look.yCoord * 5, entityplayer.posZ + look.zCoord * 5); fireball2.accelerationX = look.xCoord * 0.5; fireball2.accelerationY = look.yCoord * 0.5; fireball2.accelerationZ = look.zCoord * 0.5; worldIn.spawnEntityInWorld(fireball2); } return itemstack; }
  2. I understand what you are doing but that is not exactly what I am going for, basically I intend on using something to test if they are airborne (and yes I know there already is something for that), then let them fly for a short amount of time when they double tab space bar and then boost them where they are looking, but I hit a wall and deleted all my code like an idiot because where I was going was not going to work, I had a friend who worked with bukkit servers and that is how he said to do it, but he never explained how, so now I am stuck
  3. ok I gtg now sorry for being annoying guys I am getting back into Java so it may take me a bit to grasp what you guys are saying. Thank you so much for your help
  4. Whatever, the code works, I got it not to ignore armor thanks to your guy's help, so can we move onto the double jumping?
  5. I understand java, it is just that I already have that, I just didn't know that existed so I made it more complicated, but it works?
  6. I don't know where to implement getEntitywithin... in my code.
  7. oh and btw I am trying to switch over to world.getEntitiesWithinAABB, but I am getting a ton of errors.
  8. I fixed the error, the only problem is that it stops working for a bit occasionally, I will paste anything I find about it.
  9. wait, it works, but on occasion it just stops working for a bit?
  10. also nvm again, made custom dmg source, but it does no dmg? Instead I get a long error in console.
  11. wait never mind, it seems that it still ignores armor
  12. nvm just did one that was already there (generic dmg) now, about double jumping...
  13. idk, have not modded in a while , is this correct? DamageSource metapower = new DamageSource("Examplemod.metapower");
  14. Then I would need to create a damage source, how exactly do you do that.
  15. No it does, I tested it, it just ignores armor, trust me.
  16. I am not, I am damaging all entity's inside of the zone I created, I already have what you said in there.
  17. So I have 2 things, one, I want to be able to add double jumping like on those servers for my mod, also, I have an ability that completely ignores armor and what mode you are in (meaning it kills people in creative). I could not find an entity.damge thing, here is the code for my ability @Override public ItemStack onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn) { playerIn.swingItem(); //System.out.println("swung"); for (int x = playerIn.getPosition().getX() - 3; x < playerIn.getPosition().getX() + 3; x++){ //System.out.println("inside x"); for (int y = playerIn.getPosition().getY() - 3; y < playerIn.getPosition().getY() + 3;y++){ for (int z = playerIn.getPosition().getZ() - 3; z < playerIn.getPosition().getZ() + 3; z++){ //System.out.println("Inside z"); for (Object o: worldIn.getLoadedEntityList()){ EntityLiving e; //System.out.println("Inside entity check"); try { e = (EntityLiving)o; } catch (Exception ex){ continue; } if (e.equals(playerIn)) continue; if (e.getPosition().getX() == x && e.getPosition().getY() == y && e.getPosition().getZ() == z){ e.performHurtAnimation(); e.setHealth(e.getHealth() - 8 );

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.