summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/EntitySilverfish.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/minecraft/server/EntitySilverfish.java')
-rw-r--r--src/main/java/net/minecraft/server/EntitySilverfish.java28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/main/java/net/minecraft/server/EntitySilverfish.java b/src/main/java/net/minecraft/server/EntitySilverfish.java
index 802169c6..1dab71b6 100644
--- a/src/main/java/net/minecraft/server/EntitySilverfish.java
+++ b/src/main/java/net/minecraft/server/EntitySilverfish.java
@@ -10,7 +10,7 @@ public class EntitySilverfish extends EntityMonster {
super(world);
this.texture = "/mob/silverfish.png";
this.a(0.3F, 0.7F);
- this.bI = 0.6F;
+ this.bG = 0.6F;
}
public int getMaxHealth() {
@@ -27,24 +27,28 @@ public class EntitySilverfish extends EntityMonster {
return this.world.findNearbyVulnerablePlayer(this, d0);
}
- protected String aW() {
+ protected String aY() {
return "mob.silverfish.say";
}
- protected String aX() {
+ protected String aZ() {
return "mob.silverfish.hit";
}
- protected String aY() {
+ protected String ba() {
return "mob.silverfish.kill";
}
public boolean damageEntity(DamageSource damagesource, int i) {
- if (this.d <= 0 && (damagesource instanceof EntityDamageSource || damagesource == DamageSource.MAGIC)) {
- this.d = 20;
- }
+ if (this.isInvulnerable()) {
+ return false;
+ } else {
+ if (this.d <= 0 && (damagesource instanceof EntityDamageSource || damagesource == DamageSource.MAGIC)) {
+ this.d = 20;
+ }
- return super.damageEntity(damagesource, i);
+ return super.damageEntity(damagesource, i);
+ }
}
protected void a(Entity entity, float f) {
@@ -55,7 +59,7 @@ public class EntitySilverfish extends EntityMonster {
}
protected void a(int i, int j, int k, int l) {
- this.world.makeSound(this, "mob.silverfish.step", 0.15F, 1.0F);
+ this.makeSound("mob.silverfish.step", 0.15F, 1.0F);
}
protected int getLootId() {
@@ -67,8 +71,8 @@ public class EntitySilverfish extends EntityMonster {
super.j_();
}
- protected void bk() {
- super.bk();
+ protected void bn() {
+ super.bn();
if (!this.world.isStatic) {
int i;
int j;
@@ -124,7 +128,7 @@ public class EntitySilverfish extends EntityMonster {
// CraftBukkit end
this.world.setTypeIdAndData(i + Facing.b[l1], j + Facing.c[l1], k + Facing.d[l1], Block.MONSTER_EGGS.id, BlockMonsterEggs.f(l));
- this.aQ();
+ this.aR();
this.die();
} else {
this.i();