Update CraftBukkit to Minecraft 1.7.2
This commit is contained in:
@@ -24,8 +24,8 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
this.setSize(i);
|
||||
}
|
||||
|
||||
protected void a() {
|
||||
super.a();
|
||||
protected void c() {
|
||||
super.c();
|
||||
this.datawatcher.a(16, new Byte((byte) 1));
|
||||
}
|
||||
|
||||
@@ -53,16 +53,16 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
this.setSize(nbttagcompound.getInt("Size") + 1);
|
||||
}
|
||||
|
||||
protected String bJ() {
|
||||
protected String bN() {
|
||||
return "slime";
|
||||
}
|
||||
|
||||
protected String bP() {
|
||||
protected String bT() {
|
||||
return "mob.slime." + (this.getSize() > 1 ? "big" : "small");
|
||||
}
|
||||
|
||||
public void l_() {
|
||||
if (!this.world.isStatic && this.world.difficulty == 0 && this.getSize() > 0) {
|
||||
public void h() {
|
||||
if (!this.world.isStatic && this.world.difficulty == EnumDifficulty.PEACEFUL && this.getSize() > 0) {
|
||||
this.dead = true;
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
this.j = this.i;
|
||||
boolean flag = this.onGround;
|
||||
|
||||
super.l_();
|
||||
super.h();
|
||||
int i;
|
||||
|
||||
if (this.onGround && !flag) {
|
||||
@@ -82,11 +82,11 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
float f2 = MathHelper.sin(f) * (float) i * 0.5F * f1;
|
||||
float f3 = MathHelper.cos(f) * (float) i * 0.5F * f1;
|
||||
|
||||
this.world.addParticle(this.bJ(), this.locX + (double) f2, this.boundingBox.b, this.locZ + (double) f3, 0.0D, 0.0D, 0.0D);
|
||||
this.world.addParticle(this.bN(), this.locX + (double) f2, this.boundingBox.b, this.locZ + (double) f3, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
|
||||
if (this.bQ()) {
|
||||
this.makeSound(this.bP(), this.ba(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) / 0.8F);
|
||||
if (this.bU()) {
|
||||
this.makeSound(this.bT(), this.bf(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) / 0.8F);
|
||||
}
|
||||
|
||||
this.h = -0.5F;
|
||||
@@ -94,15 +94,15 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
this.h = 1.0F;
|
||||
}
|
||||
|
||||
this.bM();
|
||||
this.bQ();
|
||||
if (this.world.isStatic) {
|
||||
i = this.getSize();
|
||||
this.a(0.6F * (float) i, 0.6F * (float) i);
|
||||
}
|
||||
}
|
||||
|
||||
protected void bl() {
|
||||
this.u();
|
||||
protected void bq() {
|
||||
this.w();
|
||||
// CraftBukkit start
|
||||
Entity entityhuman = this.world.findNearbyVulnerablePlayer(this, 16.0D); // EntityHuman -> Entity
|
||||
EntityTargetEvent event = null;
|
||||
@@ -125,14 +125,14 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
}
|
||||
|
||||
if (this.onGround && this.jumpDelay-- <= 0) {
|
||||
this.jumpDelay = this.bL();
|
||||
this.jumpDelay = this.bP();
|
||||
if (entityhuman != null) {
|
||||
this.jumpDelay /= 3;
|
||||
}
|
||||
|
||||
this.bd = true;
|
||||
if (this.bS()) {
|
||||
this.makeSound(this.bP(), this.ba(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 0.8F);
|
||||
if (this.bW()) {
|
||||
this.makeSound(this.bT(), this.bf(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 0.8F);
|
||||
}
|
||||
|
||||
this.be = 1.0F - this.random.nextFloat() * 2.0F;
|
||||
@@ -145,15 +145,15 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
}
|
||||
}
|
||||
|
||||
protected void bM() {
|
||||
protected void bQ() {
|
||||
this.h *= 0.6F;
|
||||
}
|
||||
|
||||
protected int bL() {
|
||||
protected int bP() {
|
||||
return this.random.nextInt(20) + 10;
|
||||
}
|
||||
|
||||
protected EntitySlime bK() {
|
||||
protected EntitySlime bO() {
|
||||
return new EntitySlime(this.world);
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
for (int k = 0; k < j; ++k) {
|
||||
float f = ((float) (k % 2) - 0.5F) * (float) i / 4.0F;
|
||||
float f1 = ((float) (k / 2) - 0.5F) * (float) i / 4.0F;
|
||||
EntitySlime entityslime = this.bK();
|
||||
EntitySlime entityslime = this.bO();
|
||||
|
||||
entityslime.setSize(i / 2);
|
||||
entityslime.setPositionRotation(this.locX + (double) f, this.locY + 0.5D, this.locZ + (double) f1, this.random.nextFloat() * 360.0F, 0.0F);
|
||||
@@ -190,33 +190,33 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
}
|
||||
|
||||
public void b_(EntityHuman entityhuman) {
|
||||
if (this.bN()) {
|
||||
if (this.bR()) {
|
||||
int i = this.getSize();
|
||||
|
||||
if (this.o(entityhuman) && this.e(entityhuman) < 0.6D * (double) i * 0.6D * (double) i && entityhuman.damageEntity(DamageSource.mobAttack(this), (float) this.bO())) {
|
||||
if (this.o(entityhuman) && this.e(entityhuman) < 0.6D * (double) i * 0.6D * (double) i && entityhuman.damageEntity(DamageSource.mobAttack(this), (float) this.bS())) {
|
||||
this.makeSound("mob.attack", 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean bN() {
|
||||
protected boolean bR() {
|
||||
return this.getSize() > 1;
|
||||
}
|
||||
|
||||
protected int bO() {
|
||||
protected int bS() {
|
||||
return this.getSize();
|
||||
}
|
||||
|
||||
protected String aO() {
|
||||
protected String aT() {
|
||||
return "mob.slime." + (this.getSize() > 1 ? "big" : "small");
|
||||
}
|
||||
|
||||
protected String aP() {
|
||||
protected String aU() {
|
||||
return "mob.slime." + (this.getSize() > 1 ? "big" : "small");
|
||||
}
|
||||
|
||||
protected int getLootId() {
|
||||
return this.getSize() == 1 ? Item.SLIME_BALL.id : 0;
|
||||
protected Item getLoot() {
|
||||
return this.getSize() == 1 ? Items.SLIME_BALL : Item.d(0);
|
||||
}
|
||||
|
||||
public boolean canSpawn() {
|
||||
@@ -225,7 +225,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
if (this.world.getWorldData().getType() == WorldType.FLAT && this.random.nextInt(4) != 1) {
|
||||
return false;
|
||||
} else {
|
||||
if (this.getSize() == 1 || this.world.difficulty > 0) {
|
||||
if (this.getSize() == 1 || this.world.difficulty != EnumDifficulty.PEACEFUL) {
|
||||
BiomeBase biomebase = this.world.getBiome(MathHelper.floor(this.locX), MathHelper.floor(this.locZ));
|
||||
|
||||
if (biomebase == BiomeBase.SWAMPLAND && this.locY > 50.0D && this.locY < 70.0D && this.random.nextFloat() < 0.5F && this.random.nextFloat() < this.world.x() && this.world.getLightLevel(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ)) <= this.random.nextInt(8)) {
|
||||
@@ -241,19 +241,19 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
}
|
||||
}
|
||||
|
||||
protected float ba() {
|
||||
protected float bf() {
|
||||
return 0.4F * (float) this.getSize();
|
||||
}
|
||||
|
||||
public int bp() {
|
||||
public int x() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected boolean bS() {
|
||||
protected boolean bW() {
|
||||
return this.getSize() > 0;
|
||||
}
|
||||
|
||||
protected boolean bQ() {
|
||||
protected boolean bU() {
|
||||
return this.getSize() > 2;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user