summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/EntityCreeper.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityCreeper.java')
-rw-r--r--src/main/java/net/minecraft/server/EntityCreeper.java42
1 files changed, 28 insertions, 14 deletions
diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java
index cc6a97a6..e7c2bfe2 100644
--- a/src/main/java/net/minecraft/server/EntityCreeper.java
+++ b/src/main/java/net/minecraft/server/EntityCreeper.java
@@ -16,23 +16,28 @@ public class EntityCreeper extends EntityMonster {
this.texture = "/mob/creeper.png";
}
- protected void a() {
- super.a();
+ protected void b() {
+ super.b();
this.datawatcher.a(16, Byte.valueOf((byte) -1));
- }
-
- public void a(NBTTagCompound nbttagcompound) {
- super.a(nbttagcompound);
+ this.datawatcher.a(17, Byte.valueOf((byte) 0));
}
public void b(NBTTagCompound nbttagcompound) {
super.b(nbttagcompound);
+ if (this.datawatcher.a(17) == 1) {
+ nbttagcompound.a("powered", true);
+ }
}
- public void f_() {
+ public void a(NBTTagCompound nbttagcompound) {
+ super.a(nbttagcompound);
+ this.datawatcher.b(17, Byte.valueOf((byte) (nbttagcompound.m("powered") ? 1 : 0)));
+ }
+
+ public void p_() {
this.b = this.fuseTicks;
if (this.world.isStatic) {
- int i = this.v();
+ int i = this.x();
if (i > 0 && this.fuseTicks == 0) {
this.world.makeSound(this, "random.fuse", 1.0F, 0.5F);
@@ -48,14 +53,14 @@ public class EntityCreeper extends EntityMonster {
}
}
- super.f_();
+ super.p_();
}
- protected String f() {
+ protected String h() {
return "mob.creeper";
}
- protected String g() {
+ protected String i() {
return "mob.creeperdeath";
}
@@ -67,7 +72,7 @@ public class EntityCreeper extends EntityMonster {
}
protected void a(Entity entity, float f) {
- int i = this.v();
+ int i = this.x();
if ((i > 0 || f >= 3.0F) && (i <= 0 || f >= 7.0F)) {
this.e(-1);
@@ -102,15 +107,24 @@ public class EntityCreeper extends EntityMonster {
}
}
- protected int h() {
+ public boolean t() {
+ return this.datawatcher.a(17) == 1;
+ }
+
+ protected int j() {
return Item.SULPHUR.id;
}
- private int v() {
+ private int x() {
return this.datawatcher.a(16);
}
private void e(int i) {
this.datawatcher.b(16, Byte.valueOf((byte) i));
}
+
+ public void a(EntityWeatherStorm entityweatherstorm) {
+ super.a(entityweatherstorm);
+ this.datawatcher.b(17, Byte.valueOf((byte) 1));
+ }
}