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.

Failender

Forge Modder
  • Joined

  • Last visited

Everything posted by Failender

  1. public void onUpdate(ItemStack itemstack, World worldIn, Entity entity, int itemSlot, boolean isSelected)
  2. you dont need to search for the item, you get it passed as argument (int itemSlot)
  3. player.mainInventory.setStackInSlot(randomIndex, itemstack); player.mainInventory.setStackInSlot(itemSlot, null);
  4. while(true) int randomIndex=random.nextInt(maxIndex); if(inv.getSlot(randomIndex)==null) placeItemHereAndSetOtherOneNull(); //TODO: prevent infinite loop
  5. if the new item is in a different slot simply set the old one to null
  6. EntityPlayer player= (EntityPlayer) entity; if(entity instanceof EntityPlayer) Rethink this code please.
  7. why do you want to have a custom inventory if you want to use the default vanilla? Instead of using ur own inventory just use the vanilla one (in case u are using a gui)
  8. set the old slot where the itemstack was to null/replace it with the new one. java garbage collection will do the rest
  9. The first argument of setInventorySlotContents is the index, not the stacksize.
  10. if(held == new ItemStack(Items.bone)){ ItemStack out = new ItemStack(Items.iron_ingot); EntityItem entity = new EntityItem(world, player.posX, player.posY, player.posZ, out); world.spawnEntityInWorld(entity); } Im not sure what you are triing to do there. if(held.getItem()==Items.bone);
  11. only create the explosion on server side (!if(world.isRemote))
  12. Failender replied to Morpheus420's topic in Modder Support
    No. Dont use event.getSide() , that is stuff proxies are made for.
  13. you should consider fixxing those 200 other errors u got in ur log first..
  14. jesus christ what is up with that error log? try some basic debugging. u got a NPE in ur shouldExecute method, either theEntity or theEntity.getAttackTarget() is null
  15. normally a check !world.isRemote will work . depends on where u call it
  16. even winrar can edit jar files sir..
  17. you want a hacky way? decompile it , add it to your workspace and compile ur mod with the library inside. i bet there are better ways
  18. you only need to kill the entity on server side, client sid will get informed
  19. okay, I guess that is the better solution :b
  20. Create a new project, gradlew setupDecomp.. And setup eclipse after that copy ur source folder into the new project
  21. just google "minecraft remove recipe" there is everything you need

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.