Advertisement
CeresOverPluto

EntityMimic.java

Jun 25th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. // Keep in mind that this is copy-pasted from the Zombie file, the model and texture are still the same.
  2. // Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
  3. // Jad home page: http://www.kpdus.com/jad.html
  4. // Decompiler options: packimports(3) braces deadcode
  5.  
  6. package net.minecraft.src;
  7.  
  8. import java.util.Random;
  9.  
  10. // Referenced classes of package net.minecraft.src:
  11. // EntityMob, World, MathHelper, Item
  12.  
  13. public class EntityMimic extends EntityMob
  14. {
  15.  
  16. public EntityMimic(World world)
  17. {
  18. super(world);
  19. texture = "/mob/zombie.png";
  20. moveSpeed = 1.5F;
  21. attackStrength = 5;
  22. }
  23.  
  24. public void onLivingUpdate()
  25. {
  26. if(worldObj.isDaytime())
  27. {
  28. float f = getEntityBrightness(1.0F);
  29. if(f > 0.5F && worldObj.canBlockSeeTheSky(MathHelper.floor_double(posX), MathHelper.floor_double(posY), MathHelper.floor_double(posZ)) && rand.nextFloat() * 30F < (f - 0.4F) * 2.0F)
  30. {
  31. fire = 300;
  32. }
  33. }
  34. super.onLivingUpdate();
  35. }
  36.  
  37. protected String getLivingSound()
  38. {
  39. return "mob.zombie";
  40. }
  41.  
  42. protected String getHurtSound()
  43. {
  44. return "mob.zombiehurt";
  45. }
  46.  
  47. protected String getDeathSound()
  48. {
  49. return "mob.zombiedeath";
  50. }
  51.  
  52. protected int getDropItemId()
  53. {
  54. return Item.ingotIron.shiftedIndex;
  55. }
  56.  
  57. ModLoader.removeSpawn(EntityMimic.class, EnumCreatureType.creature);
  58.  
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement