Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Robots 0.56 KB | None | 0 0
  1. public boolean attackEntityFrom(Entity entity, int i){
  2.  
  3.         if(entity instanceof EntityPlayer){
  4.             if(rand.nextInt(5) == 0){
  5.             ModLoader.getMinecraftInstance().ingameGUI.addChatMessage("§eHerobrine disconnected.");
  6.             message = 1336;
  7.             worldObj.playSoundAtEntity(this, "mob.ghast.scream", 1.0F, 1.0F);
  8.             setEntityDead();
  9.             ((EntityPlayer) entity).health -=2;
  10.             if(rand.nextInt(2) >1){
  11.                 dropItem(Item.appleGold.shiftedIndex, 1);
  12.             }else{
  13.                 dropItem(Item.doorSteel.shiftedIndex, 1);
  14.             }
  15.             }
  16.         }
  17.  
  18.         return super.attackEntityFrom(entity, i);
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement