Advertisement
Guest User

Untitled

a guest
Feb 20th, 2016
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. package elucent.aa;
  2.  
  3. import net.minecraft.entity.player.EntityPlayer;
  4. import net.minecraft.item.ItemStack;
  5. import net.minecraftforge.event.entity.living.LivingHurtEvent;
  6. import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
  7.  
  8. public class aaEventManager {
  9. @SubscribeEvent
  10. public void onLivingDamage(LivingHurtEvent event){
  11. if (event.entityLiving instanceof EntityPlayer){
  12. EntityPlayer p = (EntityPlayer)(event.entityLiving);
  13. ItemStack[] inv = p.getInventory();
  14. for (int i = 0; i < inv.length; i ++){
  15. if (inv[i].getItem() == aaItemManager.itemLuminousShield){
  16. event.ammount *= 0.25;
  17. }
  18. }
  19. }
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement