Posted June 7, 20196 yr I am trying to get the horse armor item that is currently on the horse entity. @EventBusSubscriber(modid = Reference.MODID) public class DamageHorseArmor { @SubscribeEvent public static void DamageWoodArmor(LivingAttackEvent event){ World world = event.getEntity().getEntityWorld(); Entity victim = event.getEntity(); if(!world.isRemote){ if(victim instanceof EntityHorse){ if(((EntityHorse)victim).getHorseArmorType() == MaterialReference.WOOD){ } } } } } The line of code: ((EntityHorse)victim).getHorseArmorType() Only returns the material type, but not the item itself which I need.
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.