Port to new mc-dev format.

This commit is contained in:
Erik Broes
2011-01-29 22:50:29 +01:00
parent d0cd8c6cc7
commit df69047324
96 changed files with 8809 additions and 9406 deletions

View File

@@ -5,30 +5,31 @@ import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.entity.CraftPig;
// CraftBukkit end
public class EntityPig extends EntityAnimals {
public class EntityPig extends EntityAnimal {
public EntityPig(World world) {
super(world);
aP = "/mob/pig.png";
a(0.9F, 0.9F);
this.texture = "/mob/pig.png";
this.a(0.9F, 0.9F);
// CraftBukkit start
CraftServer server = ((WorldServer) this.l).getServer();
CraftServer server = ((WorldServer) this.world).getServer();
this.bukkitEntity = new CraftPig(server, this);
// CraftBukkit end
}
protected void a() {
af.a(16, ((Byte.valueOf((byte) 0))));
this.datawatcher.a(16, Byte.valueOf((byte) 0));
}
public void a(NBTTagCompound nbttagcompound) {
super.a(nbttagcompound);
nbttagcompound.a("Saddle", K());
nbttagcompound.a("Saddle", this.K());
}
public void b(NBTTagCompound nbttagcompound) {
super.b(nbttagcompound);
a(nbttagcompound.l("Saddle"));
this.a(nbttagcompound.l("Saddle"));
}
protected String e() {
@@ -43,9 +44,9 @@ public class EntityPig extends EntityAnimals {
return "mob.pigdeath";
}
public boolean a(EntityPlayer entityplayer) {
if (K() && !l.z && (j == null || j == entityplayer)) {
entityplayer.e(((Entity) (this)));
public boolean a(EntityHuman entityhuman) {
if (this.K() && !this.world.isStatic && (this.passenger == null || this.passenger == entityhuman)) {
entityhuman.e(this);
return true;
} else {
return false;
@@ -53,18 +54,18 @@ public class EntityPig extends EntityAnimals {
}
protected int h() {
return Item.ao.ba;
return Item.PORK.id;
}
public boolean K() {
return (af.a(16) & 1) != 0;
return (this.datawatcher.a(16) & 1) != 0;
}
public void a(boolean flag) {
if (flag) {
af.b(16, ((Byte.valueOf((byte) 1))));
this.datawatcher.b(16, Byte.valueOf((byte) 1));
} else {
af.b(16, ((Byte.valueOf((byte) 0))));
this.datawatcher.b(16, Byte.valueOf((byte) 0));
}
}
}