Advertisement
Guest User

Untitled

a guest
Jun 28th, 2016
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 57.76 KB | None | 0 0
  1. package ed.enderdeath.mod.entity;
  2.  
  3. import java.util.ArrayList;
  4. import java.util.List;
  5. import java.util.Random;
  6. import java.util.UUID;
  7.  
  8. import cpw.mods.fml.relauncher.Side;
  9. import cpw.mods.fml.relauncher.SideOnly;
  10. import ed.enderdeath.mod.Food.Baie;
  11. import ed.enderdeath.mod.Item.Croquette;
  12. import ed.enderdeath.mod.common.enderdeath;
  13. import net.minecraft.block.Block;
  14. import net.minecraft.block.BlockColored;
  15. import net.minecraft.entity.Entity;
  16. import net.minecraft.entity.EntityAgeable;
  17. import net.minecraft.entity.EntityCreature;
  18. import net.minecraft.entity.EntityLivingBase;
  19. import net.minecraft.entity.SharedMonsterAttributes;
  20. import net.minecraft.entity.ai.EntityAIAttackOnCollide;
  21. import net.minecraft.entity.ai.EntityAIFollowOwner;
  22. import net.minecraft.entity.ai.EntityAIHurtByTarget;
  23. import net.minecraft.entity.ai.EntityAILeapAtTarget;
  24. import net.minecraft.entity.ai.EntityAILookIdle;
  25. import net.minecraft.entity.ai.EntityAIMate;
  26. import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
  27. import net.minecraft.entity.ai.EntityAIOwnerHurtByTarget;
  28. import net.minecraft.entity.ai.EntityAIOwnerHurtTarget;
  29. import net.minecraft.entity.ai.EntityAISwimming;
  30. import net.minecraft.entity.ai.EntityAITargetNonTamed;
  31. import net.minecraft.entity.ai.EntityAIWander;
  32. import net.minecraft.entity.ai.EntityAIWatchClosest;
  33. import net.minecraft.entity.boss.IBossDisplayData;
  34. import net.minecraft.entity.monster.EntityCreeper;
  35. import net.minecraft.entity.monster.EntityGhast;
  36. import net.minecraft.entity.monster.IMob;
  37. import net.minecraft.entity.passive.EntityAnimal;
  38. import net.minecraft.entity.passive.EntityHorse;
  39. import net.minecraft.entity.passive.EntitySheep;
  40. import net.minecraft.entity.passive.EntityTameable;
  41. import net.minecraft.entity.player.EntityPlayer;
  42. import net.minecraft.entity.projectile.EntityArrow;
  43. import net.minecraft.item.ItemStack;
  44. import net.minecraft.nbt.NBTTagCompound;
  45. import net.minecraft.pathfinding.PathEntity;
  46. import net.minecraft.potion.Potion;
  47. import net.minecraft.potion.PotionEffect;
  48. import net.minecraft.realms.RealmsAnvilLevelStorageSource;
  49. import net.minecraft.util.AxisAlignedBB;
  50. import net.minecraft.util.DamageSource;
  51. import net.minecraft.util.MathHelper;
  52. import net.minecraft.util.ResourceLocation;
  53. import net.minecraft.world.World;
  54.  
  55. public class Familiar extends EntityTameable implements IMob, IBossDisplayData {
  56.  
  57. private float field_70926_e;
  58. private float field_70924_f;
  59. /** true is the wolf is wet else false */
  60. private boolean isShaking;
  61. private boolean field_70928_h;
  62. private float timeWolfIsShaking;
  63. private float prevTimeWolfIsShaking;
  64. public int lvl = 0;
  65. private static final String __OBFID = "CL_00001654";
  66. private static RenderFamiliar render;
  67.  
  68. private World world;
  69. private int x;
  70. private int y;
  71. private int z;
  72. private Random random;
  73. private int short1;
  74. private double d3;
  75. private double d4;
  76. private double d5;
  77. private int rubis;
  78. private int k = 3;
  79. private int ultime = 5;
  80. private EntityLivingBase p_70624_1_;
  81. private EntityPlayer player;
  82.  
  83. private int fire;
  84. private int blue;
  85. private int dirt;
  86. private int ender;
  87. private UUID propietaire;
  88. private int skin;
  89. private NBTTagCompound nbt;
  90.  
  91. private ResourceLocation ressource;
  92. private ItemStack stack;
  93.  
  94. public Familiar(World p_i1696_1_) {
  95. super(p_i1696_1_);
  96. this.setSize(0.6F, 0.8F);
  97. this.getNavigator().setAvoidsWater(true);
  98. this.tasks.addTask(1, new EntityAISwimming(this));
  99. this.tasks.addTask(2, this.aiSit);
  100.  
  101. this.tasks.addTask(3, new EntityAILeapAtTarget(this, 0.4F));
  102. this.tasks.addTask(4, new EntityAIAttackOnCollide(this, 1.0D, true));
  103. this.tasks.addTask(5, new EntityAIFollowOwner(this, 1.0D, 10.0F, 2.0F));
  104. this.tasks.addTask(6, new EntityAIMate(this, 1.0D));
  105. this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
  106.  
  107. this.tasks.addTask(9, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
  108. this.tasks.addTask(9, new EntityAILookIdle(this));
  109. this.targetTasks.addTask(1, new EntityAIOwnerHurtByTarget(this));
  110. this.targetTasks.addTask(2, new EntityAIOwnerHurtTarget(this));
  111. this.targetTasks.addTask(3, new EntityAIHurtByTarget(this, true));
  112. this.targetTasks.addTask(4, new EntityAITargetNonTamed(this, EntitySheep.class, 200, false));
  113.  
  114. this.targetTasks.addTask(6, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 3, true));
  115.  
  116. }
  117.  
  118. protected void applyEntityAttributes() {
  119. super.applyEntityAttributes();
  120. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.30000001192092896D);
  121.  
  122. if (this.isTamed()) {
  123. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(5.0D);
  124. } else {
  125. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(8.0D);
  126. }
  127. }
  128.  
  129. /**
  130. * Returns true if the newer Entity AI code should be run
  131. */
  132. public boolean isAIEnabled() {
  133. return true;
  134. }
  135.  
  136. /**
  137. * Sets the active target the Task system uses for tracking
  138. */
  139. public void setAttackTarget(EntityLivingBase p_70624_1_) {
  140. super.setAttackTarget(p_70624_1_);
  141.  
  142. if (p_70624_1_ == null) {
  143. this.setAngry(false);
  144. } else if (!this.isTamed()) {
  145. this.setAngry(true);
  146.  
  147. } else if (this.lvl == 0) {
  148. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 210, 0));
  149. this.clearActivePotions();
  150. }
  151.  
  152. }
  153.  
  154. /**
  155. * main AI tick function, replaces updateEntityActionState
  156. */
  157. protected void updateAITick() {
  158. this.dataWatcher.updateObject(18, Float.valueOf(this.getHealth()));
  159.  
  160. }
  161.  
  162. protected void entityInit() {
  163. super.entityInit();
  164. this.dataWatcher.addObject(18, new Float(this.getHealth()));
  165. this.dataWatcher.addObject(19, new Byte((byte) 0));
  166. this.dataWatcher.addObject(20, new Byte((byte) BlockColored.func_150032_b(1)));
  167.  
  168. }
  169.  
  170. /**
  171. * (abstract) Protected helper method to write subclass entity data to NBT.
  172. */
  173. public void writeEntityToNBT(NBTTagCompound p_70014_1_) {
  174. super.writeEntityToNBT(p_70014_1_);
  175. p_70014_1_.setBoolean("Angry", this.isAngry());
  176. p_70014_1_.setByte("CollarColor", (byte) this.getCollarColor());
  177. }
  178.  
  179. /**
  180. * (abstract) Protected helper method to read subclass entity data from NBT.
  181. */
  182. public void readEntityFromNBT(NBTTagCompound p_70037_1_) {
  183. super.readEntityFromNBT(p_70037_1_);
  184. this.setAngry(p_70037_1_.getBoolean("Angry"));
  185.  
  186. if (p_70037_1_.hasKey("CollarColor", 99)) {
  187. this.setCollarColor(p_70037_1_.getByte("CollarColor"));
  188. }
  189. }
  190.  
  191. /**
  192. * Returns the sound this mob makes while it's alive.
  193. */
  194. public void updateEntityActionState() {
  195.  
  196. List list = worldObj.getEntitiesWithinAABB(EntityCreature.class,
  197. AxisAlignedBB.getBoundingBox(posX, posY, posZ, posX + 1, posY + 1, posZ + 1));
  198. for (int i = 0; i < list.size(); i++) {
  199. Entity entity = (Entity) list.get(i);
  200. if (!list.isEmpty()) {
  201. if (!(entity instanceof EntityPlayer)) {
  202. this.setTarget(entity);
  203. }
  204. }
  205. }
  206. super.updateEntityActionState();
  207. }
  208.  
  209. /**
  210. * Returns the volume for the sounds this mob makes.
  211. */
  212. protected float getSoundVolume() {
  213. return 0.4F;
  214. }
  215.  
  216. public static ArrayList<UUID> propietairea = new ArrayList();
  217.  
  218. /**
  219. * Called frequently so the entity can update its state every tick as
  220. * required. For example, zombies and skeletons use this to react to
  221. * sunlight and start to burn.
  222. */
  223. public void onLivingUpdate() {
  224. super.onLivingUpdate();
  225.  
  226. if (!this.worldObj.isRemote && this.isShaking && !this.field_70928_h && !this.hasPath() && this.onGround) {
  227. this.field_70928_h = true;
  228. this.timeWolfIsShaking = 0.0F;
  229. this.prevTimeWolfIsShaking = 0.0F;
  230. this.worldObj.setEntityState(this, (byte) 8);
  231. }
  232. for (k = 0; k < 2; ++k) {
  233. this.worldObj.spawnParticle("enchantmenttable",
  234. this.posX + (this.rand.nextDouble() - 0.5D) * (double) this.width,
  235. this.posY + this.rand.nextDouble() * (double) this.height - 0.25D,
  236. this.posZ + (this.rand.nextDouble() - 0.5D) * (double) this.width,
  237. (this.rand.nextDouble() - 0.5D) * 2.0D, -this.rand.nextDouble(),
  238. (this.rand.nextDouble() - 0.5D) * 2.0D);
  239. }
  240. }
  241.  
  242. public void onUpdate() {
  243. super.onUpdate();
  244. this.field_70924_f = this.field_70926_e;
  245.  
  246. if (this.func_70922_bv()) {
  247. this.field_70926_e += (1.0F - this.field_70926_e) * 0.4F;
  248. } else {
  249. this.field_70926_e += (0.0F - this.field_70926_e) * 0.4F;
  250. }
  251.  
  252. if (this.func_70922_bv()) {
  253. this.numTicksToChaseTarget = 10;
  254. }
  255.  
  256. if (this.isWet()) {
  257. this.isShaking = true;
  258. this.field_70928_h = false;
  259. this.timeWolfIsShaking = 0.0F;
  260. this.prevTimeWolfIsShaking = 0.0F;
  261. } else if ((this.isShaking || this.field_70928_h) && this.field_70928_h) {
  262. if (this.timeWolfIsShaking == 0.0F) {
  263. this.playSound("mob.wolf.shake", this.getSoundVolume(),
  264. (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F);
  265. }
  266.  
  267. this.prevTimeWolfIsShaking = this.timeWolfIsShaking;
  268. this.timeWolfIsShaking += 0.05F;
  269.  
  270. if (this.prevTimeWolfIsShaking >= 2.0F) {
  271. this.isShaking = false;
  272. this.field_70928_h = false;
  273. this.prevTimeWolfIsShaking = 0.0F;
  274. this.timeWolfIsShaking = 0.0F;
  275. }
  276.  
  277. if (this.timeWolfIsShaking > 0.4F) {
  278. float f = (float) this.boundingBox.minY;
  279. int i = (int) (MathHelper.sin((this.timeWolfIsShaking - 0.4F) * (float) Math.PI) * 7.0F);
  280.  
  281. for (int j = 0; j < i; ++j) {
  282. float f1 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width * 0.5F;
  283. float f2 = (this.rand.nextFloat() * 2.0F - 1.0F) * this.width * 0.5F;
  284. this.worldObj.spawnParticle("splash", this.posX + (double) f1, (double) (f + 0.8F),
  285. this.posZ + (double) f2, this.motionX, this.motionY, this.motionZ);
  286. }
  287. }
  288. }
  289. }
  290.  
  291. /**
  292. * The speed it takes to move the entityliving's rotationPitch through the
  293. * faceEntity method. This is only currently use in wolves.
  294. */
  295. public int getVerticalFaceSpeed() {
  296. return this.isSitting() ? 20 : super.getVerticalFaceSpeed();
  297. }
  298.  
  299. /**
  300. * Called when the entity is attacked.
  301. */
  302. public boolean attackEntityFrom(DamageSource p_70097_1_, float p_70097_2_) {
  303. if (this.isEntityInvulnerable()) {
  304. return false;
  305. } else {
  306. Entity entity = p_70097_1_.getEntity();
  307. this.aiSit.setSitting(false);
  308.  
  309. if (entity != null && !(entity instanceof EntityPlayer) && !(entity instanceof EntityArrow)) {
  310. p_70097_2_ = (p_70097_2_ + 1.0F) / 2.0F;
  311. }
  312.  
  313. return super.attackEntityFrom(p_70097_1_, p_70097_2_);
  314. }
  315. }
  316.  
  317. public boolean attackEntityAsMob(Entity p_70652_1_) {
  318. int i = this.isTamed() ? 4 : 2;
  319.  
  320. this.worldObj.setEntityState(this, (byte) 4);
  321.  
  322. if (this.lvl == 0) {
  323. ((net.minecraft.entity.EntityLivingBase) p_70652_1_)
  324. .addPotionEffect(new PotionEffect(Potion.poison.id, 1000, 0));
  325. }
  326.  
  327. if (this.lvl == 0) {
  328. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 0));
  329. }
  330. if (this.lvl == 1) {
  331. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 1));
  332. }
  333. if (this.lvl == 2) {
  334. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 1));
  335. }
  336. if (this.lvl == 3) {
  337. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 2));
  338. }
  339. if (this.lvl == 4) {
  340. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 2));
  341. }
  342. if (this.lvl == 5) {
  343. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 2));
  344. }
  345. if (this.lvl == 6) {
  346. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 3));
  347. }
  348. if (this.lvl == 7) {
  349. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 3));
  350. }
  351. if (this.lvl == 8) {
  352. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 3));
  353. }
  354. if (this.lvl == 9) {
  355. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 3));
  356. }
  357. if (this.lvl == 10) {
  358. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 3));
  359. }
  360. if (this.lvl == 11) {
  361. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 3));
  362. }
  363. if (this.lvl == 12) {
  364. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 4));
  365. }
  366. if (this.lvl == 13) {
  367. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 4));
  368. }
  369. if (this.lvl == 14) {
  370. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 4));
  371. }
  372. if (this.lvl == 15) {
  373. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 4));
  374. }
  375. if (this.lvl == 16) {
  376. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 4));
  377. }
  378. if (this.lvl == 17) {
  379. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 4));
  380. }
  381. if (this.lvl == 18) {
  382. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 4));
  383. }
  384. if (this.lvl == 19) {
  385. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 4));
  386. }
  387. if (this.lvl == 20) {
  388. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 5));
  389. }
  390. if (this.lvl == 21) {
  391. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 5));
  392. }
  393. if (this.lvl == 22) {
  394. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 5));
  395. }
  396. if (this.lvl == 23) {
  397. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 5));
  398. }
  399. if (this.lvl == 24) {
  400. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 5));
  401. }
  402. if (this.lvl == 25) {
  403. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 6));
  404. }
  405. if (this.lvl == 26) {
  406. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 6));
  407. }
  408. if (this.lvl == 27) {
  409. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 6));
  410. }
  411. if (this.lvl == 28) {
  412. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 6));
  413. }
  414. if (this.lvl == 29) {
  415. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 6));
  416. }
  417. if (this.lvl == 30) {
  418. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 7));
  419. }
  420. if (this.lvl == 31) {
  421. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 7));
  422. }
  423. if (this.lvl == 32) {
  424. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 7));
  425. }
  426. if (this.lvl == 33) {
  427. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 7));
  428. }
  429. if (this.lvl == 34) {
  430. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 7));
  431. }
  432. if (this.lvl == 35) {
  433. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 7));
  434. }
  435. if (this.lvl == 36) {
  436. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 7));
  437. }
  438. if (this.lvl == 37) {
  439. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 7));
  440. }
  441. if (this.lvl == 38) {
  442. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 7));
  443. }
  444. if (this.lvl == 39) {
  445. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 7));
  446. }
  447. if (this.lvl == 40) {
  448. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 8));
  449. }
  450. if (this.lvl == 41) {
  451. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 8));
  452. }
  453. if (this.lvl == 42) {
  454. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 8));
  455. }
  456. if (this.lvl == 43) {
  457. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 8));
  458. }
  459. if (this.lvl == 44) {
  460. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 8));
  461. }
  462. if (this.lvl == 45) {
  463. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 8));
  464. }
  465. if (this.lvl == 46) {
  466. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 8));
  467. }
  468. if (this.lvl == 47) {
  469. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 8));
  470. }
  471. if (this.lvl == 48) {
  472. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 8));
  473. }
  474. if (this.lvl == 49) {
  475. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 8));
  476. }
  477. if (this.lvl == 50) {
  478. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 8));
  479. }
  480. if (this.lvl == 51) {
  481. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 8));
  482. }
  483. if (this.lvl == 52) {
  484. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 8));
  485. }
  486. if (this.lvl == 53) {
  487. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 8));
  488. }
  489. if (this.lvl == 54) {
  490. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 8));
  491. }
  492. if (this.lvl == 55) {
  493. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 8));
  494. }
  495. if (this.lvl == 56) {
  496. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 8));
  497. }
  498. if (this.lvl == 57) {
  499. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 8));
  500. }
  501. if (this.lvl == 58) {
  502. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 8));
  503. }
  504. if (this.lvl == 59) {
  505. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 8));
  506. }
  507. if (this.lvl == 60) {
  508. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 9));
  509. }
  510. if (this.lvl == 61) {
  511. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 9));
  512. }
  513. if (this.lvl == 62) {
  514. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 9));
  515. }
  516. if (this.lvl == 63) {
  517. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 9));
  518. }
  519. if (this.lvl == 64) {
  520. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 9));
  521. }
  522. if (this.lvl == 65) {
  523. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 9));
  524. }
  525. if (this.lvl == 66) {
  526. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 9));
  527. }
  528. if (this.lvl == 67) {
  529. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 9));
  530. }
  531. if (this.lvl == 68) {
  532. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 9));
  533. }
  534. if (this.lvl == 69) {
  535. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 9));
  536. }
  537. if (this.lvl == 70) {
  538. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 9));
  539. }
  540. if (this.lvl == 71) {
  541. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 9));
  542. }
  543. if (this.lvl == 72) {
  544. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 9));
  545. }
  546. if (this.lvl == 73) {
  547. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 9));
  548. }
  549. if (this.lvl == 74) {
  550. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 9));
  551. }
  552. if (this.lvl == 75) {
  553. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 9));
  554. }
  555. if (this.lvl == 76) {
  556. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 9));
  557. }
  558. if (this.lvl == 77) {
  559. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 9));
  560. }
  561. if (this.lvl == 78) {
  562. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 9));
  563. }
  564. if (this.lvl == 79) {
  565. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 9));
  566. }
  567. if (this.lvl == 80) {
  568. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 9));
  569. }
  570. if (this.lvl == 81) {
  571. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 9));
  572. }
  573. if (this.lvl == 82) {
  574. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 9));
  575. }
  576. if (this.lvl == 83) {
  577. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 9));
  578. }
  579. if (this.lvl == 84) {
  580. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 9));
  581. }
  582. if (this.lvl == 85) {
  583. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 10));
  584. }
  585. if (this.lvl == 86) {
  586. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 10));
  587. }
  588. if (this.lvl == 87) {
  589. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 10));
  590. }
  591. if (this.lvl == 88) {
  592. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 10));
  593. }
  594. if (this.lvl == 89) {
  595. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 10));
  596. }
  597. if (this.lvl == 90) {
  598. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 10));
  599. }
  600. if (this.lvl == 91) {
  601. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 10));
  602. }
  603. if (this.lvl == 92) {
  604. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 10));
  605. }
  606. if (this.lvl == 93) {
  607. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 10));
  608. }
  609. if (this.lvl == 94) {
  610. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 10));
  611. }
  612. if (this.lvl == 95) {
  613. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 10));
  614. }
  615. if (this.lvl == 96) {
  616. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 10));
  617. }
  618. if (this.lvl == 97) {
  619. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 10));
  620. }
  621. if (this.lvl == 98) {
  622. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 10));
  623. }
  624.  
  625. if (this.lvl == 99) {
  626. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 10));
  627. }
  628.  
  629. if (this.lvl == 100) {
  630. this.addPotionEffect(new PotionEffect(Potion.damageBoost.id, 50, 12));
  631. }
  632.  
  633. if (this.lvl > 10) {
  634. ((net.minecraft.entity.EntityLivingBase) p_70652_1_)
  635. .addPotionEffect(new PotionEffect(Potion.poison.id, 1000, 0));
  636. ((net.minecraft.entity.EntityLivingBase) p_70652_1_)
  637. .addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 2000, 0));
  638. }
  639. if (this.lvl > 40) {
  640. ((net.minecraft.entity.EntityLivingBase) p_70652_1_)
  641. .addPotionEffect(new PotionEffect(Potion.weakness.id, 2000, 1));
  642. ((net.minecraft.entity.EntityLivingBase) p_70652_1_)
  643. .addPotionEffect(new PotionEffect(Potion.wither.id, 2000, 1));
  644. ((net.minecraft.entity.EntityLivingBase) p_70652_1_)
  645. .addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 2000, 1));
  646. ((net.minecraft.entity.EntityLivingBase) p_70652_1_).setFire(10000);
  647. }
  648. if (this.lvl > 50) {
  649. this.motionY = 2.0F;
  650. ((net.minecraft.entity.EntityLivingBase) p_70652_1_)
  651. .addPotionEffect(new PotionEffect(Potion.weakness.id, 2000, 1));
  652. ((net.minecraft.entity.EntityLivingBase) p_70652_1_)
  653. .addPotionEffect(new PotionEffect(Potion.wither.id, 2000, 1));
  654. ((net.minecraft.entity.EntityLivingBase) p_70652_1_)
  655. .addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 2000, 1));
  656. ((net.minecraft.entity.EntityLivingBase) p_70652_1_).setFire(10000);
  657. }
  658.  
  659. if (this.lvl > 99) {
  660. ((net.minecraft.entity.EntityLivingBase) p_70652_1_)
  661. .addPotionEffect(new PotionEffect(Potion.wither.id, 2000, 3));
  662. ((net.minecraft.entity.EntityLivingBase) p_70652_1_)
  663. .addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 2000, 3));
  664. ((net.minecraft.entity.EntityLivingBase) p_70652_1_)
  665. .addPotionEffect(new PotionEffect(Potion.hunger.id, 2000, 3));
  666. ((net.minecraft.entity.EntityLivingBase) p_70652_1_)
  667. .addPotionEffect(new PotionEffect(Potion.confusion.id, 500, 3));
  668. ((net.minecraft.entity.EntityLivingBase) p_70652_1_)
  669. .addPotionEffect(new PotionEffect(Potion.blindness.id, 1000, 3));
  670. ((net.minecraft.entity.EntityLivingBase) p_70652_1_)
  671. .addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 2000, 3));
  672. this.motionY = 2.0F;
  673. ((net.minecraft.entity.EntityLivingBase) p_70652_1_).setFire(10000);
  674.  
  675. }
  676. return p_70652_1_.attackEntityFrom(DamageSource.causeMobDamage(this), (float) i);
  677.  
  678. }
  679.  
  680. public void setTamed() {
  681.  
  682. if (this.lvl == 1) {
  683. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(100.0D);
  684. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.5D);
  685.  
  686. }
  687. if (this.lvl == 2) {
  688. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(110.0D);
  689. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.57D);
  690. }
  691. if (this.lvl == 3) {
  692. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(120.0D);
  693. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.589D);
  694. }
  695. if (this.lvl == 4) {
  696. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(130.0D);
  697. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.5897D);
  698. }
  699. if (this.lvl == 5) {
  700. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(140.0D);
  701. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.58986D);
  702. }
  703. if (this.lvl == 6) {
  704. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(150.0D);
  705. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.59986D);
  706. }
  707. if (this.lvl == 7) {
  708. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(160.0D);
  709. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.59996D);
  710. }
  711. if (this.lvl == 8) {
  712. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(170.0D);
  713. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.59999D);
  714. }
  715. if (this.lvl == 9) {
  716. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(180.0D);
  717. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.59999D);
  718. }
  719. if (this.lvl == 10) {
  720. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(190.0D);
  721. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.69999D);
  722. }
  723. if (this.lvl == 11) {
  724. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(200.0D);
  725. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.699999D);
  726. }
  727. if (this.lvl == 12) {
  728. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(210.0D);
  729. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.699999D);
  730. }
  731. if (this.lvl == 13) {
  732. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(220.0D);
  733. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.6999999D);
  734. }
  735. if (this.lvl == 12) {
  736. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(230.0D);
  737. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.799999D);
  738. }
  739. if (this.lvl == 13) {
  740. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(240.0D);
  741. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.8D);
  742. }
  743. if (this.lvl == 14) {
  744. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(250.0D);
  745. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.8D);
  746. }
  747. if (this.lvl == 15) {
  748. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(260.0D);
  749. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.8D);
  750. }
  751. if (this.lvl == 16) {
  752. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(270.0D);
  753. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.8D);
  754. }
  755. if (this.lvl == 17) {
  756. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(280.0D);
  757. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.8D);
  758. }
  759. if (this.lvl == 18) {
  760. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(290.0D);
  761. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.8D);
  762. }
  763. if (this.lvl == 19) {
  764. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(300.0D);
  765. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.8D);
  766. }
  767. if (this.lvl == 20) {
  768. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(310.0D);
  769. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.8D);
  770. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  771. }
  772. if (this.lvl == 21) {
  773. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(320.0D);
  774. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.8D);
  775. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  776. }
  777. if (this.lvl == 22) {
  778. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(330.0D);
  779. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.8D);
  780. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  781. }
  782. if (this.lvl == 23) {
  783. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(340.0D);
  784. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.8D);
  785. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  786. }
  787. if (this.lvl == 24) {
  788. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(350.0D);
  789. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.8D);
  790. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  791. }
  792. if (this.lvl == 25) {
  793. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(360.0D);
  794. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.8D);
  795. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  796. }
  797. if (this.lvl == 26) {
  798. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(370.0D);
  799. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.9D);
  800. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  801. }
  802. if (this.lvl == 27) {
  803. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(380.0D);
  804. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.9D);
  805. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  806. }
  807. if (this.lvl == 28) {
  808. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(390.0D);
  809. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.9D);
  810. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  811. }
  812. if (this.lvl == 29) {
  813. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(400.0D);
  814. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.9D);
  815. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  816. }
  817. if (this.lvl == 30) {
  818. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(410.0D);
  819. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.9D);
  820. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  821. }
  822. if (this.lvl == 31) {
  823. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(420.0D);
  824. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.9D);
  825. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  826. }
  827. if (this.lvl == 32) {
  828. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(420.0D);
  829. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.9D);
  830. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  831. }
  832. if (this.lvl == 33) {
  833. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(430.0D);
  834. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.0D);
  835. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  836. }
  837. if (this.lvl == 34) {
  838. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(440.0D);
  839. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.1D);
  840. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  841. }
  842. if (this.lvl == 35) {
  843. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(450.0D);
  844. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.1D);
  845. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  846. }
  847. if (this.lvl == 36) {
  848. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(460.0D);
  849. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.2D);
  850. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  851. }
  852. if (this.lvl == 37) {
  853. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(470.0D);
  854. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.2D);
  855. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  856. }
  857.  
  858. if (this.lvl == 38) {
  859. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(480.0D);
  860. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.2D);
  861. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  862. }
  863. if (this.lvl == 39) {
  864. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(490.0D);
  865. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.3D);
  866. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  867. }
  868. if (this.lvl == 40) {
  869. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(500.0D);
  870. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.3D);
  871. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  872. }
  873. if (this.lvl == 41) {
  874. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(510.0D);
  875. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.3D);
  876. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  877. }
  878. if (this.lvl == 42) {
  879. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(520.0D);
  880. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.4D);
  881. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  882. }
  883. if (this.lvl == 43) {
  884. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(530.0D);
  885. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.4D);
  886. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  887. }
  888. if (this.lvl == 44) {
  889. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(540.0D);
  890. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.4D);
  891. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  892. }
  893. if (this.lvl == 45) {
  894. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(550.0D);
  895. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.4D);
  896. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  897. }
  898. if (this.lvl == 46) {
  899. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(560.0D);
  900. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.4D);
  901. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  902. }
  903. if (this.lvl == 47) {
  904. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(570.0D);
  905. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.5D);
  906. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  907. }
  908. if (this.lvl == 48) {
  909. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(570.0D);
  910. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.5D);
  911. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  912. }
  913. if (this.lvl == 49) {
  914. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(580.0D);
  915. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.5D);
  916. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  917. }
  918. if (this.lvl == 50) {
  919. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(580.0D);
  920. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.6D);
  921. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  922. }
  923. if (this.lvl == 51) {
  924. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(590.0D);
  925. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.6D);
  926. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  927. }
  928. if (this.lvl == 52) {
  929. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(600.0D);
  930. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.6D);
  931. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  932. }
  933. if (this.lvl == 52) {
  934. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(610.0D);
  935. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.6D);
  936. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  937. }
  938. if (this.lvl == 53) {
  939. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(620.0D);
  940. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.6D);
  941. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  942. }
  943. if (this.lvl == 54) {
  944. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(630.0D);
  945. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.6D);
  946. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  947. }
  948. if (this.lvl == 55) {
  949. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(640.0D);
  950. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.6D);
  951. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  952. }
  953.  
  954. if (this.lvl == 55) {
  955. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(650.0D);
  956. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.7D);
  957. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  958. }
  959.  
  960. if (this.lvl == 56) {
  961. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(660.0D);
  962. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.7D);
  963. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  964. }
  965. if (this.lvl == 57) {
  966. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(670.0D);
  967. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.7D);
  968. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  969. }
  970. if (this.lvl == 58) {
  971. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(680.0D);
  972. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.7D);
  973. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  974. }
  975. if (this.lvl == 59) {
  976. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(690.0D);
  977. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.7D);
  978. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  979. }
  980. if (this.lvl == 60) {
  981. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(700.0D);
  982. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.7D);
  983. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  984. }
  985. if (this.lvl == 61) {
  986. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(710.0D);
  987. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.7D);
  988. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  989. }
  990. if (this.lvl == 62) {
  991. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(720.0D);
  992. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.7D);
  993. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  994. }
  995. if (this.lvl == 63) {
  996. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(730.0D);
  997. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.7D);
  998. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  999. }
  1000. if (this.lvl == 64) {
  1001. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(740.0D);
  1002. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.7D);
  1003. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1004. }
  1005. if (this.lvl == 65) {
  1006. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(750.0D);
  1007. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.7D);
  1008. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1009. }
  1010. if (this.lvl == 66) {
  1011. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(760.0D);
  1012. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.7D);
  1013. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1014. }
  1015. if (this.lvl == 67) {
  1016. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(770.0D);
  1017. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.7D);
  1018. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1019. }
  1020. if (this.lvl == 68) {
  1021. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(780.0D);
  1022. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.7D);
  1023. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1024. }
  1025. if (this.lvl == 69) {
  1026. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(790.0D);
  1027. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.7D);
  1028. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1029. }
  1030. if (this.lvl == 70) {
  1031. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(800.0D);
  1032. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.7D);
  1033. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1034. }
  1035. if (this.lvl == 71) {
  1036. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(810.0D);
  1037. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.7D);
  1038. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1039. }
  1040. if (this.lvl == 72) {
  1041. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(820.0D);
  1042. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.7D);
  1043. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1044. }
  1045. if (this.lvl == 73) {
  1046. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(830.0D);
  1047. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.8D);
  1048. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1049. }
  1050. if (this.lvl == 74) {
  1051. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(840.0D);
  1052. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.8D);
  1053. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1054. }
  1055. if (this.lvl == 75) {
  1056. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(850.0D);
  1057. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.8D);
  1058. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1059. }
  1060. if (this.lvl == 76) {
  1061. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(860.0D);
  1062. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.8D);
  1063. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1064. }
  1065. if (this.lvl == 77) {
  1066. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(870.0D);
  1067. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.8D);
  1068. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1069. }
  1070. if (this.lvl == 78) {
  1071. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(880.0D);
  1072. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.8D);
  1073. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1074. }
  1075. if (this.lvl == 79) {
  1076. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(890.0D);
  1077. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.8D);
  1078. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1079. }
  1080. if (this.lvl == 80) {
  1081. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(900.0D);
  1082. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.8D);
  1083. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1084. }
  1085. if (this.lvl == 81) {
  1086. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(910.0D);
  1087. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.8D);
  1088. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1089. }
  1090. if (this.lvl == 82) {
  1091. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(920.0D);
  1092. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.8D);
  1093. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1094. }
  1095. if (this.lvl == 83) {
  1096. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(930.0D);
  1097. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.8D);
  1098. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1099. }
  1100. if (this.lvl == 84) {
  1101. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(930.0D);
  1102. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.9D);
  1103. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1104. }
  1105. if (this.lvl == 85) {
  1106. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(940.0D);
  1107. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.9D);
  1108. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1109. }
  1110. if (this.lvl == 86) {
  1111. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(940.0D);
  1112. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.9D);
  1113. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1114. }
  1115. if (this.lvl == 87) {
  1116. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(940.0D);
  1117. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.9D);
  1118. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1119. }
  1120. if (this.lvl == 88) {
  1121. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(940.0D);
  1122. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.9D);
  1123. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1124. }
  1125. if (this.lvl == 89) {
  1126. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(940.0D);
  1127. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.9D);
  1128. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1129. }
  1130. if (this.lvl == 90) {
  1131. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(950.0D);
  1132. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.9D);
  1133. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1134. }
  1135. if (this.lvl == 91) {
  1136. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(960.0D);
  1137. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.9D);
  1138. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1139. }
  1140. if (this.lvl == 92) {
  1141. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(970.0D);
  1142. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.9D);
  1143. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1144. }
  1145. if (this.lvl == 93) {
  1146. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(980.0D);
  1147. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.9D);
  1148. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1149. }
  1150. if (this.lvl == 94) {
  1151. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(990.0D);
  1152. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.9D);
  1153. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1154. }
  1155. if (this.lvl == 95) {
  1156. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(990.0D);
  1157. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.9D);
  1158. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1159. }
  1160. if (this.lvl == 96) {
  1161. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(990.0D);
  1162. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.9D);
  1163. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1164. }
  1165. if (this.lvl == 97) {
  1166. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(990.0D);
  1167. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.9D);
  1168. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1169. }
  1170. if (this.lvl == 98) {
  1171. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(990.0D);
  1172. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.9D);
  1173. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1174. }
  1175. if (this.lvl == 99) {
  1176. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(990.0D);
  1177. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(1.9D);
  1178. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1179. }
  1180. if (this.lvl == 100) {
  1181. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(1200.0D);
  1182. this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(2.25D);
  1183. this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(5.0D);
  1184. }
  1185.  
  1186. else if (this.lvl == 0) {
  1187. this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(40.0D);
  1188. }
  1189.  
  1190. }
  1191.  
  1192. /**
  1193. * Called when a player interacts with a mob. e.g. gets milk from a cow,
  1194. * gets into the saddle on a pig.
  1195. */
  1196.  
  1197. public boolean interact(EntityPlayer p_70085_1_) {
  1198. ItemStack itemstack = p_70085_1_.inventory.getCurrentItem();
  1199.  
  1200. if (this.lvl > 0) {
  1201. if (itemstack != null) {
  1202. if (itemstack.getItem() instanceof Baie) {
  1203. Baie itemfood = (Baie) itemstack.getItem();
  1204.  
  1205. if (itemfood.isFamiliarFavoriteMeat() && this.dataWatcher.getWatchableObjectFloat(18) < 20.0F) {
  1206. if (!p_70085_1_.capabilities.isCreativeMode) {
  1207. --itemstack.stackSize;
  1208. }
  1209.  
  1210. this.heal((float) itemfood.func_150905_g(itemstack));
  1211.  
  1212. if (itemstack.stackSize <= 0) {
  1213. p_70085_1_.inventory.setInventorySlotContents(p_70085_1_.inventory.currentItem,
  1214. (ItemStack) null);
  1215. }
  1216.  
  1217. return true;
  1218. }
  1219. }
  1220. }
  1221. if (this.func_152114_e(p_70085_1_) && !this.worldObj.isRemote && !this.isBreedingItem(itemstack)) {
  1222. this.aiSit.setSitting(!this.isSitting());
  1223. this.isJumping = false;
  1224. this.setPathToEntity((PathEntity) null);
  1225. this.setTarget((Entity) null);
  1226. this.setAttackTarget((EntityLivingBase) null);
  1227. }
  1228.  
  1229. }
  1230.  
  1231.  
  1232. if (itemstack != null && itemstack.getItem() instanceof Croquette) {
  1233.  
  1234. if (!p_70085_1_.capabilities.isCreativeMode) {
  1235. --itemstack.stackSize;
  1236. }
  1237. if (propietaire == null || propietaire.equals(player.getUniqueID())) {
  1238. propietaire = player.getUniqueID();
  1239. this.stack.writeToNBT(nbt);
  1240. this.stack.readFromNBT(nbt);
  1241. }
  1242. if (itemstack.stackSize <= 0) {
  1243. p_70085_1_.inventory.setInventorySlotContents(p_70085_1_.inventory.currentItem, (ItemStack) null);
  1244. }
  1245.  
  1246. if (!this.worldObj.isRemote) {
  1247. if (this.rand.nextInt(3) == 0) {
  1248.  
  1249. this.setPathToEntity((PathEntity) null);
  1250. this.setAttackTarget((EntityLivingBase) null);
  1251. this.aiSit.setSitting(true);
  1252. if (this.lvl == 10) {
  1253. System.out.println("lvl 10!!!");
  1254.  
  1255. }
  1256. if (itemstack != null && itemstack.getItem() == enderdeath.RubisCroquette) {
  1257. if (lvl > rubis) {
  1258. this.lvl++;
  1259. this.lvl++;
  1260. this.lvl++;
  1261. }
  1262.  
  1263. }
  1264.  
  1265. if (itemstack != null && itemstack.getItem() == enderdeath.SaphirCroquette) {
  1266. if (lvl > ultime) {
  1267. this.lvl++;
  1268. this.lvl++;
  1269. this.lvl++;
  1270. this.lvl++;
  1271. this.lvl++;
  1272. }
  1273.  
  1274. }
  1275.  
  1276. this.lvl++;
  1277. System.out.println(lvl);
  1278. this.func_152115_b(p_70085_1_.getUniqueID().toString());
  1279. this.playTameEffect(true);
  1280. this.worldObj.setEntityState(this, (byte) 7);
  1281. this.setTamed();
  1282.  
  1283. } else {
  1284. this.playTameEffect(false);
  1285. this.worldObj.setEntityState(this, (byte) 6);
  1286. }
  1287.  
  1288. }
  1289. if (itemstack != null && itemstack.getItem() == enderdeath.SkinFire) {
  1290. this.skin = 1;
  1291.  
  1292. }
  1293. return true;
  1294. }
  1295.  
  1296. return super.interact(p_70085_1_);
  1297. }
  1298.  
  1299. public void onSkin() {
  1300. if (this.skin == 1) {
  1301. this.render.onskin(this);
  1302.  
  1303. }
  1304. }
  1305.  
  1306. public void onParticuleFire() {
  1307. for (k = 0; k < 2; ++k) {
  1308. this.worldObj.spawnParticle("fire", this.posX + (this.rand.nextDouble() - 0.5D) * (double) this.width,
  1309. this.posY + this.rand.nextDouble() * (double) this.height - 0.25D,
  1310. this.posZ + (this.rand.nextDouble() - 0.5D) * (double) this.width,
  1311. (this.rand.nextDouble() - 0.5D) * 2.0D, -this.rand.nextDouble(),
  1312. (this.rand.nextDouble() - 0.5D) * 2.0D);
  1313. }
  1314. }
  1315.  
  1316. @SideOnly(Side.CLIENT)
  1317. public float getTailRotation() {
  1318. return this.isAngry() ? 1.5393804F
  1319. : (this.isTamed()
  1320. ? (0.55F - (20.0F - this.dataWatcher.getWatchableObjectFloat(18)) * 0.02F) * (float) Math.PI
  1321. : ((float) Math.PI / 5F));
  1322. }
  1323.  
  1324. public boolean isBreedingItem(ItemStack p_70877_1_) {
  1325. return p_70877_1_ == null ? false
  1326. : (!(p_70877_1_.getItem() instanceof Baie) ? false
  1327. : ((Baie) p_70877_1_.getItem()).isFamiliarFavoriteMeat());
  1328. }
  1329.  
  1330. public boolean isAngry() {
  1331. return (this.dataWatcher.getWatchableObjectByte(16) & 2) != 0;
  1332. }
  1333.  
  1334. public void setAngry(boolean p_70916_1_) {
  1335. byte b0 = this.dataWatcher.getWatchableObjectByte(16);
  1336.  
  1337. if (p_70916_1_) {
  1338. this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 | 2)));
  1339. } else {
  1340. this.dataWatcher.updateObject(16, Byte.valueOf((byte) (b0 & -3)));
  1341. }
  1342. }
  1343.  
  1344. public int getCollarColor() {
  1345. return this.dataWatcher.getWatchableObjectByte(20) & 15;
  1346. }
  1347.  
  1348. public void setCollarColor(int p_82185_1_) {
  1349. this.dataWatcher.updateObject(20, Byte.valueOf((byte) (p_82185_1_ & 15)));
  1350. }
  1351.  
  1352. public Familiar createChild(EntityAgeable p_90011_1_) {
  1353. Familiar entitywolf = new Familiar(this.worldObj);
  1354. String s = this.func_152113_b();
  1355.  
  1356. if (s != null && s.trim().length() > 0) {
  1357. entitywolf.func_152115_b(s);
  1358. if (this.lvl >= 1)
  1359. ;
  1360. }
  1361.  
  1362. return entitywolf;
  1363. }
  1364.  
  1365. public void func_70918_i(boolean p_70918_1_) {
  1366. if (p_70918_1_) {
  1367. this.dataWatcher.updateObject(19, Byte.valueOf((byte) 1));
  1368. } else {
  1369. this.dataWatcher.updateObject(19, Byte.valueOf((byte) 0));
  1370. }
  1371. }
  1372.  
  1373. /**
  1374. * Returns true if the mob is currently able to mate with the specified mob.
  1375. */
  1376. public boolean canMateWith(EntityAnimal p_70878_1_) {
  1377. if (p_70878_1_ == this) {
  1378. return false;
  1379. } else if (!this.isTamed()) {
  1380. return false;
  1381. } else if (!(p_70878_1_ instanceof Familiar)) {
  1382. return false;
  1383. } else {
  1384. Familiar familiar = (Familiar) p_70878_1_;
  1385. return !familiar.isTamed() ? false
  1386. : (familiar.isSitting() ? false : this.isInLove() && familiar.isInLove());
  1387. }
  1388. }
  1389.  
  1390. public boolean func_70922_bv() {
  1391. return this.dataWatcher.getWatchableObjectByte(19) == 1;
  1392. }
  1393.  
  1394. /**
  1395. * Determines if an entity can be despawned, used on idle far away entities
  1396. */
  1397. protected boolean canDespawn() {
  1398. return !this.isTamed() && this.ticksExisted > 2400;
  1399. }
  1400.  
  1401. public boolean func_142018_a(EntityLivingBase p_142018_1_, EntityLivingBase p_142018_2_) {
  1402. if (!(p_142018_1_ instanceof EntityCreeper) && !(p_142018_1_ instanceof EntityGhast)) {
  1403. if (p_142018_1_ instanceof Familiar) {
  1404. Familiar entitywolf = (Familiar) p_142018_1_;
  1405.  
  1406. if (entitywolf.isTamed() && entitywolf.getOwner() == p_142018_2_) {
  1407. return false;
  1408. }
  1409. }
  1410.  
  1411. return p_142018_1_ instanceof EntityPlayer && p_142018_2_ instanceof EntityPlayer
  1412. && !((EntityPlayer) p_142018_2_).canAttackPlayer((EntityPlayer) p_142018_1_) ? false
  1413. : !(p_142018_1_ instanceof EntityHorse) || !((EntityHorse) p_142018_1_).isTame();
  1414. } else {
  1415. return false;
  1416. }
  1417. }
  1418. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement