summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/EntityMonster.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityMonster.java')
-rw-r--r--src/main/java/net/minecraft/server/EntityMonster.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java
index f1c1a1fa..c4c19800 100644
--- a/src/main/java/net/minecraft/server/EntityMonster.java
+++ b/src/main/java/net/minecraft/server/EntityMonster.java
@@ -14,21 +14,21 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
public EntityMonster(World world) {
super(world);
- this.az = 5;
+ this.aA = 5;
}
public void d() {
float f = this.a(1.0F);
if (f > 0.5F) {
- this.aS += 2;
+ this.aV += 2;
}
super.d();
}
- public void w_() {
- super.w_();
+ public void y_() {
+ super.y_();
if (!this.world.isStatic && this.world.difficulty == 0) {
this.die();
}
@@ -55,8 +55,10 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
if (!event.isCancelled()) {
if (event.getTarget() == null) {
this.target = null;
+ this.aI = null;
} else {
this.target = ((CraftEntity) event.getTarget()).getHandle();
+ this.aI = this.target instanceof EntityLiving ? (EntityLiving) this.target : null;
}
}
// CraftBukkit end
@@ -71,7 +73,7 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
}
}
- protected boolean d(Entity entity) {
+ public boolean d(Entity entity) {
int i = this.damage;
if (this.hasEffect(MobEffectList.INCREASE_DAMAGE)) {
@@ -110,7 +112,7 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
}
}
- protected float a(int i, int j, int k) {
+ public float a(int i, int j, int k) {
return 0.5F - this.world.m(i, j, k);
}
@@ -122,7 +124,7 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
super.a(nbttagcompound);
}
- protected boolean y() {
+ protected boolean z() {
int i = MathHelper.floor(this.locX);
int j = MathHelper.floor(this.boundingBox.b);
int k = MathHelper.floor(this.locZ);
@@ -145,6 +147,6 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
}
public boolean g() {
- return this.y() && super.g();
+ return this.z() && super.g();
}
}