diff options
author | Erik Broes <erikbroes@grum.nl> | 2011-11-20 00:01:14 -0800 |
---|---|---|
committer | Erik Broes <erikbroes@ripe.net> | 2011-11-20 00:01:33 -0800 |
commit | 345ea36c7bb3383c6e4825355d0043a646194eaa (patch) | |
tree | df116b57d92315c0a13c2fdc87d792b031c7239a /src/main/java/net/minecraft/server/EntitySheep.java | |
parent | 589f66bd1b766dc1fdd737ee885304196a2ed86a (diff) | |
download | craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.tar craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.tar.gz craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.tar.lz craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.tar.xz craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.zip |
Update for 1.0.0
Diffstat (limited to 'src/main/java/net/minecraft/server/EntitySheep.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntitySheep.java | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/src/main/java/net/minecraft/server/EntitySheep.java b/src/main/java/net/minecraft/server/EntitySheep.java index 64bce954..02ca25d6 100644 --- a/src/main/java/net/minecraft/server/EntitySheep.java +++ b/src/main/java/net/minecraft/server/EntitySheep.java @@ -13,12 +13,16 @@ public class EntitySheep extends EntityAnimal { this.b(0.9F, 1.3F); } + public int getMaxHealth() { + return 8; + } + protected void b() { super.b(); this.datawatcher.a(16, new Byte((byte) 0)); } - protected void a(boolean flag) { + protected void a(boolean flag, int i) { // CraftBukkit start - whole method java.util.List<org.bukkit.inventory.ItemStack> loot = new java.util.ArrayList<org.bukkit.inventory.ItemStack>(); @@ -30,7 +34,7 @@ public class EntitySheep extends EntityAnimal { // CraftBukkit end } - protected int k() { + protected int e() { return Block.WOOL.id; } @@ -54,7 +58,7 @@ public class EntitySheep extends EntityAnimal { itemstack.damage(1, entityhuman); } - return false; + return super.b(entityhuman); } public void b(NBTTagCompound nbttagcompound) { @@ -65,19 +69,19 @@ public class EntitySheep extends EntityAnimal { public void a(NBTTagCompound nbttagcompound) { super.a(nbttagcompound); - this.setSheared(nbttagcompound.m("Sheared")); - this.setColor(nbttagcompound.c("Color")); + this.setSheared(nbttagcompound.n("Sheared")); + this.setColor(nbttagcompound.d("Color")); } - protected String h() { + protected String c_() { return "mob.sheep"; } - protected String i() { + protected String m() { return "mob.sheep"; } - protected String j() { + protected String n() { return "mob.sheep"; } @@ -110,4 +114,17 @@ public class EntitySheep extends EntityAnimal { return i < 5 ? 15 : (i < 10 ? 7 : (i < 15 ? 8 : (i < 18 ? 12 : (random.nextInt(500) == 0 ? 6 : 0)))); } + + protected EntityAnimal createChild(EntityAnimal entityanimal) { + EntitySheep entitysheep = (EntitySheep) entityanimal; + EntitySheep entitysheep1 = new EntitySheep(this.world); + + if (this.random.nextBoolean()) { + entitysheep1.setColor(this.getColor()); + } else { + entitysheep1.setColor(entitysheep.getColor()); + } + + return entitysheep1; + } } |