diff options
author | mbax <matt@phozop.net> | 2013-11-04 07:07:38 -0600 |
---|---|---|
committer | Wesley Wolfe <weswolf@aol.com> | 2013-11-30 19:26:12 -0600 |
commit | 2726696652179a5ead7dc07dd39edf7dfda687f7 (patch) | |
tree | ff78e22fdd4fc01889a5f6cc482b599f965cd93a /src/main/java/net/minecraft/server/EntityMagmaCube.java | |
parent | ff8b70fbb7a96b9d2ff078afcf3b3ff90f200981 (diff) | |
download | craftbukkit-2726696652179a5ead7dc07dd39edf7dfda687f7.tar craftbukkit-2726696652179a5ead7dc07dd39edf7dfda687f7.tar.gz craftbukkit-2726696652179a5ead7dc07dd39edf7dfda687f7.tar.lz craftbukkit-2726696652179a5ead7dc07dd39edf7dfda687f7.tar.xz craftbukkit-2726696652179a5ead7dc07dd39edf7dfda687f7.zip |
Update CraftBukkit to Minecraft 1.7.2
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityMagmaCube.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityMagmaCube.java | 58 |
1 files changed, 25 insertions, 33 deletions
diff --git a/src/main/java/net/minecraft/server/EntityMagmaCube.java b/src/main/java/net/minecraft/server/EntityMagmaCube.java index c2947b7a..1fe6b073 100644 --- a/src/main/java/net/minecraft/server/EntityMagmaCube.java +++ b/src/main/java/net/minecraft/server/EntityMagmaCube.java @@ -7,16 +7,16 @@ public class EntityMagmaCube extends EntitySlime { this.fireProof = true; } - protected void az() { - super.az(); + protected void aD() { + super.aD(); this.getAttributeInstance(GenericAttributes.d).setValue(0.20000000298023224D); } public boolean canSpawn() { - return this.world.difficulty > 0 && this.world.b(this.boundingBox) && this.world.getCubes(this, this.boundingBox).isEmpty() && !this.world.containsLiquid(this.boundingBox); + return this.world.difficulty != EnumDifficulty.PEACEFUL && this.world.b(this.boundingBox) && this.world.getCubes(this, this.boundingBox).isEmpty() && !this.world.containsLiquid(this.boundingBox); } - public int aQ() { + public int aV() { return this.getSize() * 3; } @@ -24,32 +24,32 @@ public class EntityMagmaCube extends EntitySlime { return 1.0F; } - protected String bJ() { + protected String bN() { return "flame"; } - protected EntitySlime bK() { + protected EntitySlime bO() { return new EntityMagmaCube(this.world); } - protected int getLootId() { - return Item.MAGMA_CREAM.id; + protected Item getLoot() { + return Items.MAGMA_CREAM; } protected void dropDeathLoot(boolean flag, int i) { // CraftBukkit start - Whole method java.util.List<org.bukkit.inventory.ItemStack> loot = new java.util.ArrayList<org.bukkit.inventory.ItemStack>(); - int j = this.getLootId(); + Item item = this.getLoot(); - if (j > 0 && this.getSize() > 1) { - int k = this.random.nextInt(4) - 2; + if (item != null && this.getSize() > 1) { + int j = this.random.nextInt(4) - 2; if (i > 0) { - k += this.random.nextInt(i + 1); + j += this.random.nextInt(i + 1); } - if (k > 0) { - loot.add(new org.bukkit.inventory.ItemStack(j, k)); + if (j > 0) { + loot.add(new org.bukkit.inventory.ItemStack(org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(item), j)); } } @@ -61,46 +61,38 @@ public class EntityMagmaCube extends EntitySlime { return false; } - protected int bL() { - return super.bL() * 4; + protected int bP() { + return super.bP() * 4; } - protected void bM() { + protected void bQ() { this.h *= 0.9F; } - protected void be() { + protected void bj() { this.motY = (double) (0.42F + (float) this.getSize() * 0.1F); - this.an = true; + this.am = true; } protected void b(float f) {} - protected boolean bN() { + protected boolean bR() { return true; } - protected int bO() { - return super.bO() + 2; + protected int bS() { + return super.bS() + 2; } - protected String aO() { - return "mob.slime." + (this.getSize() > 1 ? "big" : "small"); - } - - protected String aP() { - return "mob.slime." + (this.getSize() > 1 ? "big" : "small"); - } - - protected String bP() { + protected String bT() { return this.getSize() > 1 ? "mob.magmacube.big" : "mob.magmacube.small"; } - public boolean J() { + public boolean P() { return false; } - protected boolean bQ() { + protected boolean bU() { return true; } } |