mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-16 20:53:54 -07:00
Updated to Minecraft version 1.4
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user