Tag Info

New answers tagged


You can use the field inventory in the player class to help you. Using the method player.inventory.hasItemStack(ItemStack); to test if it contains the battery item. An example: @Override public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) { if (player.inventory.hasItemStack(Items.battery)) { //Do something to ...

Top 50 recent answers are included