diff options
author | Erik Broes <erikbroes@grum.nl> | 2011-01-30 16:15:17 +0100 |
---|---|---|
committer | Erik Broes <erikbroes@grum.nl> | 2011-01-30 16:15:24 +0100 |
commit | b2a0c5a2ae216b1e778d5e03fd97dd9ebaf112a1 (patch) | |
tree | 6fd5368cbcc0f2b922570827034d3f57a994b66f /src/main/java/net/minecraft/server/EntityCreeper.java | |
parent | 75ba9a0f2570798d9012e4f4377d903cd2904785 (diff) | |
download | craftbukkit-b2a0c5a2ae216b1e778d5e03fd97dd9ebaf112a1.tar craftbukkit-b2a0c5a2ae216b1e778d5e03fd97dd9ebaf112a1.tar.gz craftbukkit-b2a0c5a2ae216b1e778d5e03fd97dd9ebaf112a1.tar.lz craftbukkit-b2a0c5a2ae216b1e778d5e03fd97dd9ebaf112a1.tar.xz craftbukkit-b2a0c5a2ae216b1e778d5e03fd97dd9ebaf112a1.zip |
Reworked getEntity; Hi instanceof, bay 16 classes
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityCreeper.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityCreeper.java | 110 |
1 files changed, 0 insertions, 110 deletions
diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java deleted file mode 100644 index fed190f9..00000000 --- a/src/main/java/net/minecraft/server/EntityCreeper.java +++ /dev/null @@ -1,110 +0,0 @@ -package net.minecraft.server; - -// CraftBukkit start -import org.bukkit.craftbukkit.CraftServer; -import org.bukkit.craftbukkit.entity.CraftCreeper; -// CraftBukkit end - - -public class EntityCreeper extends EntityMonster { - - int a; - int b; - - public EntityCreeper(World world) { - super(world); - this.texture = "/mob/creeper.png"; - - // CraftBukkit start - CraftServer server = ((WorldServer) this.world).getServer(); - this.bukkitEntity = new CraftCreeper(server, this); - // CraftBukkit end - } - - protected void a() { - super.a(); - this.datawatcher.a(16, Byte.valueOf((byte) -1)); - } - - public void a(NBTTagCompound nbttagcompound) { - super.a(nbttagcompound); - } - - public void b(NBTTagCompound nbttagcompound) { - super.b(nbttagcompound); - } - - public void b_() { - this.b = this.a; - if (this.world.isStatic) { - int i = this.K(); - - if (i > 0 && this.a == 0) { - this.world.a(this, "random.fuse", 1.0F, 0.5F); - } - - this.a += i; - if (this.a < 0) { - this.a = 0; - } - - if (this.a >= 30) { - this.a = 30; - } - } - - super.b_(); - } - - protected String f() { - return "mob.creeper"; - } - - protected String g() { - return "mob.creeperdeath"; - } - - public void f(Entity entity) { - super.f(entity); - if (entity instanceof EntitySkeleton) { - this.a(Item.GOLD_RECORD.id + this.random.nextInt(2), 1); - } - } - - protected void a(Entity entity, float f) { - int i = this.K(); - - if ((i > 0 || f >= 3.0F) && (i <= 0 || f >= 7.0F)) { - this.a(-1); - --this.a; - if (this.a < 0) { - this.a = 0; - } - } else { - if (this.a == 0) { - this.world.a(this, "random.fuse", 1.0F, 0.5F); - } - - this.a(1); - ++this.a; - if (this.a >= 30) { - this.world.a(this, this.locX, this.locY, this.locZ, 3.0F); - this.q(); - } - - this.e = true; - } - } - - protected int h() { - return Item.SULPHUR.id; - } - - private int K() { - return this.datawatcher.a(16); - } - - private void a(int i) { - this.datawatcher.b(16, Byte.valueOf((byte) i)); - } -} |