mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-17 05:03:55 -07:00
Updated to Minecraft 1.1
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user