Updated to Minecraft version 1.4

This commit is contained in:
Dinnerbone
2011-03-31 21:40:00 +01:00
parent 0635f7c1b8
commit 87c36febeb
84 changed files with 1024 additions and 793 deletions

View File

@@ -20,24 +20,24 @@ public class EntityMonster extends EntityCreature implements IMonster {
this.health = 20;
}
public void q() {
public void r() {
float f = this.c(1.0F);
if (f > 0.5F) {
this.at += 2;
}
super.q();
super.r();
}
public void f_() {
super.f_();
if (this.world.j == 0) {
this.C();
this.D();
}
}
protected Entity l() {
protected Entity m() {
EntityHuman entityhuman = this.world.a(this, 16.0D);
return entityhuman != null && this.e(entityhuman) ? entityhuman : null;
@@ -77,7 +77,7 @@ public class EntityMonster extends EntityCreature implements IMonster {
}
protected void a(Entity entity, float f) {
if ((double) f < 1.5D && entity.boundingBox.e > this.boundingBox.b && entity.boundingBox.b < this.boundingBox.e) {
if (this.attackTicks <= 0 && f < 2.0F && entity.boundingBox.e > this.boundingBox.b && entity.boundingBox.b < this.boundingBox.e) {
this.attackTicks = 20;
// CraftBukkit start - this is still duplicated here and EntityHuman because it's possible for an EntityMonster
// to damage another EntityMonster, and we want to catch those events.
@@ -91,7 +91,7 @@ public class EntityMonster extends EntityCreature implements IMonster {
EntityDamageByEntityEvent event = new EntityDamageByEntityEvent(damager, damagee, damageType, this.c);
server.getPluginManager().callEvent(event);
if (!event.isCancelled()) {
if (!event.isCancelled() && event.getDamage() != 0) {
entity.a(this, event.getDamage());
}
return;