Update CraftBukkit to Minecraft 1.4.4.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -16,18 +15,18 @@ public class EntityPigZombie extends EntityZombie {
|
||||
public EntityPigZombie(World world) {
|
||||
super(world);
|
||||
this.texture = "/mob/pigzombie.png";
|
||||
this.bI = 0.5F;
|
||||
this.bG = 0.5F;
|
||||
this.fireProof = true;
|
||||
}
|
||||
|
||||
protected boolean bb() {
|
||||
protected boolean be() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void j_() {
|
||||
this.bI = this.target != null ? 0.95F : 0.5F;
|
||||
this.bG = this.target != null ? 0.95F : 0.5F;
|
||||
if (this.soundDelay > 0 && --this.soundDelay == 0) {
|
||||
this.world.makeSound(this, "mob.zombiepig.zpigangry", this.aV() * 2.0F, ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 1.8F);
|
||||
this.makeSound("mob.zombiepig.zpigangry", this.aX() * 2.0F, ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 1.8F);
|
||||
}
|
||||
|
||||
super.j_();
|
||||
@@ -52,29 +51,32 @@ public class EntityPigZombie extends EntityZombie {
|
||||
}
|
||||
|
||||
public boolean damageEntity(DamageSource damagesource, int i) {
|
||||
Entity entity = damagesource.getEntity();
|
||||
if (this.isInvulnerable()) {
|
||||
return false;
|
||||
} else {
|
||||
Entity entity = damagesource.getEntity();
|
||||
|
||||
if (entity instanceof EntityHuman) {
|
||||
List list = this.world.getEntities(this, this.boundingBox.grow(32.0D, 32.0D, 32.0D));
|
||||
Iterator iterator = list.iterator();
|
||||
if (entity instanceof EntityHuman) {
|
||||
List list = this.world.getEntities(this, this.boundingBox.grow(32.0D, 32.0D, 32.0D));
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
Entity entity1 = (Entity) iterator.next();
|
||||
for (int j = 0; j < list.size(); ++j) {
|
||||
Entity entity1 = (Entity) list.get(j);
|
||||
|
||||
if (entity1 instanceof EntityPigZombie) {
|
||||
EntityPigZombie entitypigzombie = (EntityPigZombie) entity1;
|
||||
if (entity1 instanceof EntityPigZombie) {
|
||||
EntityPigZombie entitypigzombie = (EntityPigZombie) entity1;
|
||||
|
||||
entitypigzombie.o(entity);
|
||||
entitypigzombie.p(entity);
|
||||
}
|
||||
}
|
||||
|
||||
this.p(entity);
|
||||
}
|
||||
|
||||
this.o(entity);
|
||||
return super.damageEntity(damagesource, i);
|
||||
}
|
||||
|
||||
return super.damageEntity(damagesource, i);
|
||||
}
|
||||
|
||||
private void o(Entity entity) {
|
||||
private void p(Entity entity) {
|
||||
// CraftBukkit start
|
||||
org.bukkit.entity.Entity bukkitTarget = entity == null ? null : entity.getBukkitEntity();
|
||||
|
||||
@@ -97,15 +99,15 @@ public class EntityPigZombie extends EntityZombie {
|
||||
this.soundDelay = this.random.nextInt(40);
|
||||
}
|
||||
|
||||
protected String aW() {
|
||||
protected String aY() {
|
||||
return "mob.zombiepig.zpig";
|
||||
}
|
||||
|
||||
protected String aX() {
|
||||
protected String aZ() {
|
||||
return "mob.zombiepig.zpighurt";
|
||||
}
|
||||
|
||||
protected String aY() {
|
||||
protected String ba() {
|
||||
return "mob.zombiepig.zpigdeath";
|
||||
}
|
||||
|
||||
@@ -140,7 +142,7 @@ public class EntityPigZombie extends EntityZombie {
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
public boolean c(EntityHuman entityhuman) {
|
||||
public boolean a(EntityHuman entityhuman) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -153,17 +155,17 @@ public class EntityPigZombie extends EntityZombie {
|
||||
return Item.ROTTEN_FLESH.id;
|
||||
}
|
||||
|
||||
protected void bB() {
|
||||
protected void bE() {
|
||||
this.setEquipment(0, new ItemStack(Item.GOLD_SWORD));
|
||||
}
|
||||
|
||||
public void bD() {
|
||||
super.bD();
|
||||
public void bG() {
|
||||
super.bG();
|
||||
this.setVillager(false);
|
||||
}
|
||||
|
||||
public int c(Entity entity) {
|
||||
ItemStack itemstack = this.bA();
|
||||
ItemStack itemstack = this.bD();
|
||||
int i = 5;
|
||||
|
||||
if (itemstack != null) {
|
||||
|
||||
Reference in New Issue
Block a user