Posted March 2, 20169 yr How can i test for an item in the boots slot with an enchant id of 11 my custom flight enchantment i have set up the event bus but can wrap my head around how that would work any help will be appreciated
March 2, 20169 yr Author I solved the problem accendintaly ran iton the solution while doing something else heres my code: @SubscribeEvent public void onLivingUpdateEvent(LivingUpdateEvent event) { if (event.entityLiving instanceof EntityPlayer) { EntityPlayer playerIn = (EntityPlayer) event.entityLiving; if (!playerIn.capabilities.isCreativeMode) { if (playerIn.inventory.armorItemInSlot(0) != null) { if (EnchantmentHelper.getEnchantedItem(your enchantment, playerIn) != null) { your code here}}}}}}
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.