Update CraftBukkit to 1.6.2
Dieser Commit ist enthalten in:
Ursprung
2d9a9d8cea
Commit
f6a0b1e426
6
pom.xml
6
pom.xml
@ -4,7 +4,7 @@
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>craftbukkit</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.6.1-R0.1-SNAPSHOT</version>
|
||||
<version>1.6.2-R0.1-SNAPSHOT</version>
|
||||
<name>CraftBukkit</name>
|
||||
<url>http://www.bukkit.org</url>
|
||||
|
||||
@ -12,8 +12,8 @@
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<api.version>unknown</api.version>
|
||||
<junit.version>4.11</junit.version>
|
||||
<minecraft.version>1.6.1</minecraft.version>
|
||||
<minecraft_version>1_6_R1</minecraft_version>
|
||||
<minecraft.version>1.6.2</minecraft.version>
|
||||
<minecraft_version>1_6_R2</minecraft_version>
|
||||
</properties>
|
||||
|
||||
<scm>
|
||||
|
@ -178,7 +178,7 @@ public class BlockLeaves extends BlockTransparant {
|
||||
}
|
||||
|
||||
public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
|
||||
if (!world.isStatic && entityhuman.bt() != null && entityhuman.bt().id == Item.SHEARS.id) {
|
||||
if (!world.isStatic && entityhuman.bx() != null && entityhuman.bx().id == Item.SHEARS.id) {
|
||||
entityhuman.a(StatisticList.C[this.id], 1);
|
||||
this.b(world, i, j, k, new ItemStack(Block.LEAVES.id, 1, l & 3));
|
||||
} else {
|
||||
|
@ -11,6 +11,19 @@ public class BlockPistonExtension extends Block {
|
||||
this.c(0.5F);
|
||||
}
|
||||
|
||||
public void a(World world, int i, int j, int k, int l, EntityHuman entityhuman) {
|
||||
if (entityhuman.abilities.canInstantlyBuild) {
|
||||
int i1 = d(l);
|
||||
int j1 = world.getTypeId(i - Facing.b[i1], j - Facing.c[i1], k - Facing.d[i1]);
|
||||
|
||||
if (j1 == Block.PISTON.id || j1 == Block.PISTON_STICKY.id) {
|
||||
world.setAir(i - Facing.b[i1], j - Facing.c[i1], k - Facing.d[i1]);
|
||||
}
|
||||
}
|
||||
|
||||
super.a(world, i, j, k, l, entityhuman);
|
||||
}
|
||||
|
||||
public void remove(World world, int i, int j, int k, int l, int i1) {
|
||||
super.remove(world, i, j, k, l, i1);
|
||||
if ((i1 & 7) >= Facing.OPPOSITE_FACING.length) return; // CraftBukkit - fix a piston AIOOBE issue
|
||||
|
@ -27,7 +27,7 @@ public class BlockPortal extends BlockHalfTransparant {
|
||||
Entity entity = ItemMonsterEgg.a(world, 57, (double) i + 0.5D, (double) l + 1.1D, (double) k + 0.5D);
|
||||
|
||||
if (entity != null) {
|
||||
entity.portalCooldown = entity.aa();
|
||||
entity.portalCooldown = entity.ab();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -185,7 +185,7 @@ public class BlockPortal extends BlockHalfTransparant {
|
||||
world.getServer().getPluginManager().callEvent(event);
|
||||
// CraftBukkit end
|
||||
|
||||
entity.Z();
|
||||
entity.aa();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ public class BlockPressurePlateBinary extends BlockPressurePlateAbstract {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
if (!entity.as()) {
|
||||
if (!entity.at()) {
|
||||
return 15;
|
||||
}
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ public class BlockSkull extends BlockContainer {
|
||||
entitywither = new EntityWither(world);
|
||||
entitywither.setPositionRotation((double) i + 0.5D, (double) j - 1.45D, (double) (k + i1) + 1.5D, 90.0F, 0.0F);
|
||||
entitywither.aN = 90.0F;
|
||||
entitywither.bP();
|
||||
entitywither.bT();
|
||||
|
||||
if (world.addEntity(entitywither, SpawnReason.BUILD_WITHER)) {
|
||||
blockList.updateList();
|
||||
@ -191,7 +191,7 @@ public class BlockSkull extends BlockContainer {
|
||||
if (!world.isStatic) {
|
||||
entitywither = new EntityWither(world);
|
||||
entitywither.setPositionRotation((double) (i + i1) + 1.5D, (double) j - 1.45D, (double) k + 0.5D, 0.0F, 0.0F);
|
||||
entitywither.bP();
|
||||
entitywither.bT();
|
||||
|
||||
if (world.addEntity(entitywither, SpawnReason.BUILD_WITHER)) {
|
||||
blockList.updateList();
|
||||
|
@ -76,7 +76,7 @@ public class BlockTripwire extends Block {
|
||||
|
||||
public void a(World world, int i, int j, int k, int l, EntityHuman entityhuman) {
|
||||
if (!world.isStatic) {
|
||||
if (entityhuman.bt() != null && entityhuman.bt().id == Item.SHEARS.id) {
|
||||
if (entityhuman.bx() != null && entityhuman.bx().id == Item.SHEARS.id) {
|
||||
world.setData(i, j, k, l | 8, 4);
|
||||
}
|
||||
}
|
||||
@ -140,7 +140,7 @@ public class BlockTripwire extends Block {
|
||||
while (iterator.hasNext()) {
|
||||
Entity entity = (Entity) iterator.next();
|
||||
|
||||
if (!entity.as()) {
|
||||
if (!entity.at()) {
|
||||
flag1 = true;
|
||||
break;
|
||||
}
|
||||
|
@ -301,7 +301,7 @@ public class BlockVine extends Block {
|
||||
}
|
||||
|
||||
public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
|
||||
if (!world.isStatic && entityhuman.bt() != null && entityhuman.bt().id == Item.SHEARS.id) {
|
||||
if (!world.isStatic && entityhuman.bx() != null && entityhuman.bx().id == Item.SHEARS.id) {
|
||||
entityhuman.a(StatisticList.C[this.id], 1);
|
||||
this.b(world, i, j, k, new ItemStack(Block.VINE, 1, 0));
|
||||
} else {
|
||||
|
@ -658,7 +658,7 @@ public class Chunk {
|
||||
while (iterator.hasNext()) {
|
||||
Entity entity = (Entity) iterator.next();
|
||||
|
||||
entity.P();
|
||||
entity.Q();
|
||||
}
|
||||
|
||||
this.world.a(this.entitySlices[i]);
|
||||
@ -719,7 +719,7 @@ public class Chunk {
|
||||
|
||||
if (entity1 != entity && entity1.boundingBox.b(axisalignedbb) && (ientityselector == null || ientityselector.a(entity1))) {
|
||||
list.add(entity1);
|
||||
Entity[] aentity = entity1.am();
|
||||
Entity[] aentity = entity1.an();
|
||||
|
||||
if (aentity != null) {
|
||||
for (int i1 = 0; i1 < aentity.length; ++i1) {
|
||||
|
@ -40,7 +40,7 @@ public class ContainerHorse extends Container {
|
||||
int j;
|
||||
int k;
|
||||
|
||||
if (entityhorse.ca()) {
|
||||
if (entityhorse.hasChest()) {
|
||||
for (j = 0; j < b0; ++j) {
|
||||
for (k = 0; k < 5; ++k) {
|
||||
this.a(new Slot(iinventory1, 2 + k + j * 5, 80 + k * 18, 18 + j * 18));
|
||||
@ -60,7 +60,7 @@ public class ContainerHorse extends Container {
|
||||
}
|
||||
|
||||
public boolean a(EntityHuman entityhuman) {
|
||||
return this.a.a(entityhuman) && this.f.isAlive() && this.f.d(entityhuman) < 8.0F; // CraftBukkit - add isAlive as a validator
|
||||
return this.a.a(entityhuman) && this.f.isAlive() && this.f.d(entityhuman) < 8.0F;
|
||||
}
|
||||
|
||||
public ItemStack b(EntityHuman entityhuman, int i) {
|
||||
@ -75,7 +75,7 @@ public class ContainerHorse extends Container {
|
||||
if (!this.a(itemstack1, this.a.getSize(), this.c.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else if (this.getSlot(1).isAllowed(itemstack1)) {
|
||||
} else if (this.getSlot(1).isAllowed(itemstack1) && !this.getSlot(1).e()) {
|
||||
if (!this.a(itemstack1, 1, 2, false)) {
|
||||
return null;
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ public class ControllerMove {
|
||||
float f = (float) (org.bukkit.craftbukkit.TrigMath.atan2(d1, d0) * 180.0D / 3.1415927410125732D) - 90.0F;
|
||||
|
||||
this.a.yaw = this.a(this.a.yaw, f, 30.0F);
|
||||
this.a.i((float) (this.e * this.a.a(GenericAttributes.d).e()));
|
||||
this.a.i((float) (this.e * this.a.getAttributeInstance(GenericAttributes.d).getValue()));
|
||||
if (d2 > 0.0D && d0 * d0 + d1 * d1 < 1.0D) {
|
||||
this.a.getControllerJump().a();
|
||||
}
|
||||
|
@ -43,7 +43,6 @@ public class CraftingManager {
|
||||
this.registerShapedRecipe(new ItemStack(Block.FENCE_GATE, 1), new Object[] { "#W#", "#W#", Character.valueOf('#'), Item.STICK, Character.valueOf('W'), Block.WOOD});
|
||||
this.registerShapedRecipe(new ItemStack(Block.JUKEBOX, 1), new Object[] { "###", "#X#", "###", Character.valueOf('#'), Block.WOOD, Character.valueOf('X'), Item.DIAMOND});
|
||||
this.registerShapedRecipe(new ItemStack(Item.LEASH, 2), new Object[] { "~~ ", "~O ", " ~", Character.valueOf('~'), Item.STRING, Character.valueOf('O'), Item.SLIME_BALL});
|
||||
this.registerShapedRecipe(new ItemStack(Block.HAY_BLOCK, 1), new Object[] { "###", "###", "###", Character.valueOf('#'), Item.WHEAT});
|
||||
this.registerShapedRecipe(new ItemStack(Block.NOTE_BLOCK, 1), new Object[] { "###", "#X#", "###", Character.valueOf('#'), Block.WOOD, Character.valueOf('X'), Item.REDSTONE});
|
||||
this.registerShapedRecipe(new ItemStack(Block.BOOKSHELF, 1), new Object[] { "###", "XXX", "###", Character.valueOf('#'), Block.WOOD, Character.valueOf('X'), Item.BOOK});
|
||||
this.registerShapedRecipe(new ItemStack(Block.SNOW_BLOCK, 1), new Object[] { "##", "##", Character.valueOf('#'), Item.SNOW_BALL});
|
||||
|
@ -48,7 +48,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
System.setErr(new PrintStream(new LoggerOutputStream(this.getLogger().getLogger(), Level.SEVERE), true));
|
||||
// CraftBukkit end
|
||||
|
||||
this.getLogger().info("Starting minecraft server version 1.6.1");
|
||||
this.getLogger().info("Starting minecraft server version 1.6.2");
|
||||
if (Runtime.getRuntime().maxMemory() / 1024L / 1024L < 512L) {
|
||||
this.getLogger().warning("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ public class DedicatedServerConnectionThread extends Thread {
|
||||
PendingConnection pendingconnection = (PendingConnection) this.a.get(i);
|
||||
|
||||
try {
|
||||
pendingconnection.c();
|
||||
pendingconnection.d();
|
||||
} catch (Exception exception) {
|
||||
pendingconnection.disconnect("Internal server error");
|
||||
this.e.d().getLogger().warning("Failed to handle packet for " + pendingconnection.getName() + ": " + exception, (Throwable) exception);
|
||||
|
@ -154,16 +154,21 @@ public abstract class Entity {
|
||||
}
|
||||
|
||||
protected void a(float f, float f1) {
|
||||
float f2;
|
||||
|
||||
if (f != this.width || f1 != this.length) {
|
||||
f2 = this.width;
|
||||
this.width = f;
|
||||
this.length = f1;
|
||||
this.boundingBox.d = this.boundingBox.a + (double) this.width;
|
||||
this.boundingBox.f = this.boundingBox.c + (double) this.width;
|
||||
this.boundingBox.e = this.boundingBox.b + (double) this.length;
|
||||
if (this.width > f2 && !this.justCreated && !this.world.isStatic) {
|
||||
this.move((double) (f2 - this.width), 0.0D, (double) (f2 - this.width));
|
||||
}
|
||||
}
|
||||
|
||||
float f2 = f % 2.0F;
|
||||
|
||||
f2 = f % 2.0F;
|
||||
if ((double) f2 < 0.375D) {
|
||||
this.at = EnumEntitySize.SIZE_1;
|
||||
} else if ((double) f2 < 0.75D) {
|
||||
@ -248,7 +253,7 @@ public abstract class Entity {
|
||||
if (true || minecraftserver.getAllowNether()) { // CraftBukkit
|
||||
if (this.vehicle == null && this.aq++ >= i) {
|
||||
this.aq = i;
|
||||
this.portalCooldown = this.aa();
|
||||
this.portalCooldown = this.ab();
|
||||
byte b0;
|
||||
|
||||
if (this.world.worldProvider.dimension == -1) {
|
||||
@ -1032,7 +1037,7 @@ public abstract class Entity {
|
||||
public void b(Entity entity, int i) {}
|
||||
|
||||
public boolean c(NBTTagCompound nbttagcompound) {
|
||||
String s = this.O();
|
||||
String s = this.P();
|
||||
|
||||
if (!this.dead && s != null) {
|
||||
nbttagcompound.setString("id", s);
|
||||
@ -1044,7 +1049,7 @@ public abstract class Entity {
|
||||
}
|
||||
|
||||
public boolean d(NBTTagCompound nbttagcompound) {
|
||||
String s = this.O();
|
||||
String s = this.P();
|
||||
|
||||
if (!this.dead && s != null && this.passenger == null) {
|
||||
nbttagcompound.setString("id", s);
|
||||
@ -1145,6 +1150,9 @@ public abstract class Entity {
|
||||
this.setPosition(this.locX, this.locY, this.locZ);
|
||||
this.b(this.yaw, this.pitch);
|
||||
this.a(nbttagcompound);
|
||||
if (this.O()) {
|
||||
this.setPosition(this.locX, this.locY, this.locZ);
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
if (this instanceof EntityLiving) {
|
||||
@ -1206,7 +1214,11 @@ public abstract class Entity {
|
||||
}
|
||||
}
|
||||
|
||||
protected final String O() {
|
||||
protected boolean O() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected final String P() {
|
||||
return EntityTypes.b(this);
|
||||
}
|
||||
|
||||
@ -1214,7 +1226,7 @@ public abstract class Entity {
|
||||
|
||||
protected abstract void b(NBTTagCompound nbttagcompound);
|
||||
|
||||
public void P() {}
|
||||
public void Q() {}
|
||||
|
||||
protected NBTTagList a(double... adouble) {
|
||||
NBTTagList nbttaglist = new NBTTagList();
|
||||
@ -1293,7 +1305,7 @@ public abstract class Entity {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void T() {
|
||||
public void U() {
|
||||
if (this.vehicle.dead) {
|
||||
this.vehicle = null;
|
||||
} else {
|
||||
@ -1302,7 +1314,7 @@ public abstract class Entity {
|
||||
this.motZ = 0.0D;
|
||||
this.l_();
|
||||
if (this.vehicle != null) {
|
||||
this.vehicle.U();
|
||||
this.vehicle.V();
|
||||
this.g += (double) (this.vehicle.yaw - this.vehicle.lastYaw);
|
||||
|
||||
for (this.f += (double) (this.vehicle.pitch - this.vehicle.lastPitch); this.g >= 180.0D; this.g -= 360.0D) {
|
||||
@ -1343,23 +1355,21 @@ public abstract class Entity {
|
||||
|
||||
this.g -= d0;
|
||||
this.f -= d1;
|
||||
this.yaw = (float) ((double) this.yaw + d0);
|
||||
this.pitch = (float) ((double) this.pitch + d1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void U() {
|
||||
public void V() {
|
||||
if (this.passenger != null) {
|
||||
this.passenger.setPosition(this.locX, this.locY + this.W() + this.passenger.V(), this.locZ);
|
||||
this.passenger.setPosition(this.locX, this.locY + this.X() + this.passenger.W(), this.locZ);
|
||||
}
|
||||
}
|
||||
|
||||
public double V() {
|
||||
public double W() {
|
||||
return (double) this.height;
|
||||
}
|
||||
|
||||
public double W() {
|
||||
public double X() {
|
||||
return (double) this.length * 0.75D;
|
||||
}
|
||||
|
||||
@ -1421,17 +1431,17 @@ public abstract class Entity {
|
||||
}
|
||||
}
|
||||
|
||||
public float X() {
|
||||
public float Y() {
|
||||
return 0.1F;
|
||||
}
|
||||
|
||||
public Vec3D Y() {
|
||||
public Vec3D Z() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void Z() {
|
||||
public void aa() {
|
||||
if (this.portalCooldown > 0) {
|
||||
this.portalCooldown = this.aa();
|
||||
this.portalCooldown = this.ab();
|
||||
} else {
|
||||
double d0 = this.lastX - this.locX;
|
||||
double d1 = this.lastZ - this.locZ;
|
||||
@ -1444,7 +1454,7 @@ public abstract class Entity {
|
||||
}
|
||||
}
|
||||
|
||||
public int aa() {
|
||||
public int ab() {
|
||||
return 900;
|
||||
}
|
||||
|
||||
@ -1458,7 +1468,7 @@ public abstract class Entity {
|
||||
return !this.fireProof && (this.fireTicks > 0 || this.f(0));
|
||||
}
|
||||
|
||||
public boolean ae() {
|
||||
public boolean af() {
|
||||
return this.vehicle != null;
|
||||
}
|
||||
|
||||
@ -1625,7 +1635,7 @@ public abstract class Entity {
|
||||
}
|
||||
}
|
||||
|
||||
public void ak() {
|
||||
public void al() {
|
||||
this.K = true;
|
||||
this.fallDistance = 0.0F;
|
||||
}
|
||||
@ -1640,7 +1650,7 @@ public abstract class Entity {
|
||||
return LocaleI18n.get("entity." + s + ".name");
|
||||
}
|
||||
|
||||
public Entity[] am() {
|
||||
public Entity[] an() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -1652,7 +1662,7 @@ public abstract class Entity {
|
||||
return 0.0F;
|
||||
}
|
||||
|
||||
public boolean ao() {
|
||||
public boolean ap() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1774,15 +1784,15 @@ public abstract class Entity {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int aq() {
|
||||
public int ar() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
public int ar() {
|
||||
public int as() {
|
||||
return this.as;
|
||||
}
|
||||
|
||||
public boolean as() {
|
||||
public boolean at() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1799,7 +1809,7 @@ public abstract class Entity {
|
||||
return this.uniqueID;
|
||||
}
|
||||
|
||||
public boolean av() {
|
||||
public boolean aw() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -242,7 +242,7 @@ public class EntityArrow extends Entity implements IProjectile {
|
||||
EntityLiving entityliving = (EntityLiving) movingobjectposition.entity;
|
||||
|
||||
if (!this.world.isStatic) {
|
||||
entityliving.m(entityliving.aQ() + 1);
|
||||
entityliving.m(entityliving.aT() + 1);
|
||||
}
|
||||
|
||||
if (this.aw > 0) {
|
||||
@ -425,7 +425,7 @@ public class EntityArrow extends Entity implements IProjectile {
|
||||
this.aw = i;
|
||||
}
|
||||
|
||||
public boolean ao() {
|
||||
public boolean ap() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -12,9 +12,9 @@ public class EntityBlaze extends EntityMonster {
|
||||
this.b = 10;
|
||||
}
|
||||
|
||||
protected void ax() {
|
||||
super.ax();
|
||||
this.a(GenericAttributes.e).a(6.0D);
|
||||
protected void ay() {
|
||||
super.ay();
|
||||
this.getAttributeInstance(GenericAttributes.e).setValue(6.0D);
|
||||
}
|
||||
|
||||
protected void a() {
|
||||
@ -26,11 +26,11 @@ public class EntityBlaze extends EntityMonster {
|
||||
return "mob.blaze.breathe";
|
||||
}
|
||||
|
||||
protected String aK() {
|
||||
protected String aN() {
|
||||
return "mob.blaze.hit";
|
||||
}
|
||||
|
||||
protected String aL() {
|
||||
protected String aO() {
|
||||
return "mob.blaze.death";
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ public class EntityBlaze extends EntityMonster {
|
||||
this.bp = 0.5F + (float) this.random.nextGaussian() * 3.0F;
|
||||
}
|
||||
|
||||
if (this.bJ() != null && this.bJ().locY + (double) this.bJ().getHeadHeight() > this.locY + (double) this.getHeadHeight() + (double) this.bp) {
|
||||
if (this.bN() != null && this.bN().locY + (double) this.bN().getHeadHeight() > this.locY + (double) this.getHeadHeight() + (double) this.bp) {
|
||||
this.motY += (0.30000001192092896D - this.motY) * 0.30000001192092896D;
|
||||
}
|
||||
}
|
||||
@ -118,7 +118,7 @@ public class EntityBlaze extends EntityMonster {
|
||||
}
|
||||
|
||||
public boolean isBurning() {
|
||||
return this.bP();
|
||||
return this.bT();
|
||||
}
|
||||
|
||||
protected void dropDeathLoot(boolean flag, int i) {
|
||||
@ -136,7 +136,7 @@ public class EntityBlaze extends EntityMonster {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean bP() {
|
||||
public boolean bT() {
|
||||
return (this.datawatcher.getByte(16) & 1) != 0;
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,7 @@ public class EntityBoat extends Entity {
|
||||
this.world.getServer().getPluginManager().callEvent(new org.bukkit.event.vehicle.VehicleCreateEvent((Vehicle) this.getBukkitEntity())); // CraftBukkit
|
||||
}
|
||||
|
||||
public double W() {
|
||||
public double X() {
|
||||
return (double) this.length * 0.0D - 0.30000001192092896D;
|
||||
}
|
||||
|
||||
@ -412,12 +412,12 @@ public class EntityBoat extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
public void U() {
|
||||
public void V() {
|
||||
if (this.passenger != null) {
|
||||
double d0 = Math.cos((double) this.yaw * 3.141592653589793D / 180.0D) * 0.4D;
|
||||
double d1 = Math.sin((double) this.yaw * 3.141592653589793D / 180.0D) * 0.4D;
|
||||
|
||||
this.passenger.setPosition(this.locX + d0, this.locY + this.W() + this.passenger.V(), this.locZ + d1);
|
||||
this.passenger.setPosition(this.locX + d0, this.locY + this.X() + this.passenger.W(), this.locZ + d1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,14 +23,14 @@ public class EntityChicken extends EntityAnimal {
|
||||
this.goalSelector.a(7, new PathfinderGoalRandomLookaround(this));
|
||||
}
|
||||
|
||||
public boolean bb() {
|
||||
public boolean be() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void ax() {
|
||||
super.ax();
|
||||
this.a(GenericAttributes.a).a(4.0D);
|
||||
this.a(GenericAttributes.d).a(0.25D);
|
||||
protected void ay() {
|
||||
super.ay();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(4.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.25D);
|
||||
}
|
||||
|
||||
public void c() {
|
||||
@ -69,11 +69,11 @@ public class EntityChicken extends EntityAnimal {
|
||||
return "mob.chicken.say";
|
||||
}
|
||||
|
||||
protected String aK() {
|
||||
protected String aN() {
|
||||
return "mob.chicken.hurt";
|
||||
}
|
||||
|
||||
protected String aL() {
|
||||
protected String aO() {
|
||||
return "mob.chicken.hurt";
|
||||
}
|
||||
|
||||
|
@ -21,25 +21,25 @@ public class EntityCow extends EntityAnimal {
|
||||
this.goalSelector.a(7, new PathfinderGoalRandomLookaround(this));
|
||||
}
|
||||
|
||||
public boolean bb() {
|
||||
public boolean be() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void ax() {
|
||||
super.ax();
|
||||
this.a(GenericAttributes.a).a(10.0D);
|
||||
this.a(GenericAttributes.d).a(0.20000000298023224D);
|
||||
protected void ay() {
|
||||
super.ay();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(10.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.20000000298023224D);
|
||||
}
|
||||
|
||||
protected String r() {
|
||||
return "mob.cow.say";
|
||||
}
|
||||
|
||||
protected String aK() {
|
||||
protected String aN() {
|
||||
return "mob.cow.hurt";
|
||||
}
|
||||
|
||||
protected String aL() {
|
||||
protected String aO() {
|
||||
return "mob.cow.hurt";
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ public class EntityCow extends EntityAnimal {
|
||||
this.makeSound("mob.cow.step", 0.15F, 1.0F);
|
||||
}
|
||||
|
||||
protected float aW() {
|
||||
protected float aZ() {
|
||||
return 0.4F;
|
||||
}
|
||||
|
||||
|
@ -24,19 +24,19 @@ public abstract class EntityCreature extends EntityInsentient {
|
||||
super(world);
|
||||
}
|
||||
|
||||
protected boolean bF() {
|
||||
protected boolean bJ() {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void bh() {
|
||||
protected void bk() {
|
||||
this.world.methodProfiler.a("ai");
|
||||
if (this.bo > 0 && --this.bo == 0) {
|
||||
AttributeInstance attributeinstance = this.a(GenericAttributes.d);
|
||||
AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.d);
|
||||
|
||||
attributeinstance.b(i);
|
||||
}
|
||||
|
||||
this.bn = this.bF();
|
||||
this.bn = this.bJ();
|
||||
float f11 = 16.0F;
|
||||
|
||||
if (this.target == null) {
|
||||
@ -84,7 +84,7 @@ public abstract class EntityCreature extends EntityInsentient {
|
||||
if (!this.bn && this.target != null && (this.pathEntity == null || this.random.nextInt(20) == 0)) {
|
||||
this.pathEntity = this.world.findPath(this, this.target, f11, true, false, false, true);
|
||||
} else if (!this.bn && (this.pathEntity == null && this.random.nextInt(180) == 0 || this.random.nextInt(120) == 0 || this.bo > 0) && this.aV < 100) {
|
||||
this.bG();
|
||||
this.bK();
|
||||
}
|
||||
|
||||
int i = MathHelper.floor(this.boundingBox.b + 0.5D);
|
||||
@ -116,7 +116,7 @@ public abstract class EntityCreature extends EntityInsentient {
|
||||
float f2 = (float) (org.bukkit.craftbukkit.TrigMath.atan2(d2, d1) * 180.0D / 3.1415927410125732D) - 90.0F;
|
||||
float f3 = MathHelper.g(f2 - this.yaw);
|
||||
|
||||
this.bf = (float) this.a(GenericAttributes.d).e();
|
||||
this.bf = (float) this.getAttributeInstance(GenericAttributes.d).getValue();
|
||||
if (f3 > 30.0F) {
|
||||
f3 = 30.0F;
|
||||
}
|
||||
@ -146,7 +146,7 @@ public abstract class EntityCreature extends EntityInsentient {
|
||||
this.a(this.target, 30.0F, 30.0F);
|
||||
}
|
||||
|
||||
if (this.positionChanged && !this.bI()) {
|
||||
if (this.positionChanged && !this.bM()) {
|
||||
this.bd = true;
|
||||
}
|
||||
|
||||
@ -156,12 +156,12 @@ public abstract class EntityCreature extends EntityInsentient {
|
||||
|
||||
this.world.methodProfiler.b();
|
||||
} else {
|
||||
super.bh();
|
||||
super.bk();
|
||||
this.pathEntity = null;
|
||||
}
|
||||
}
|
||||
|
||||
protected void bG() {
|
||||
protected void bK() {
|
||||
this.world.methodProfiler.a("stroll");
|
||||
boolean flag = false;
|
||||
int i = -1;
|
||||
@ -209,7 +209,7 @@ public abstract class EntityCreature extends EntityInsentient {
|
||||
return super.canSpawn() && this.a(i, j, k) >= 0.0F;
|
||||
}
|
||||
|
||||
public boolean bI() {
|
||||
public boolean bM() {
|
||||
return this.pathEntity != null;
|
||||
}
|
||||
|
||||
@ -217,7 +217,7 @@ public abstract class EntityCreature extends EntityInsentient {
|
||||
this.pathEntity = pathentity;
|
||||
}
|
||||
|
||||
public Entity bJ() {
|
||||
public Entity bN() {
|
||||
return this.target;
|
||||
}
|
||||
|
||||
@ -225,7 +225,7 @@ public abstract class EntityCreature extends EntityInsentient {
|
||||
this.target = entity;
|
||||
}
|
||||
|
||||
public boolean bK() {
|
||||
public boolean bO() {
|
||||
return this.b(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ));
|
||||
}
|
||||
|
||||
@ -238,33 +238,33 @@ public abstract class EntityCreature extends EntityInsentient {
|
||||
this.br = (float) l;
|
||||
}
|
||||
|
||||
public ChunkCoordinates bL() {
|
||||
public ChunkCoordinates bP() {
|
||||
return this.bq;
|
||||
}
|
||||
|
||||
public float bM() {
|
||||
public float bQ() {
|
||||
return this.br;
|
||||
}
|
||||
|
||||
public void bN() {
|
||||
public void bR() {
|
||||
this.br = -1.0F;
|
||||
}
|
||||
|
||||
public boolean bO() {
|
||||
public boolean bS() {
|
||||
return this.br != -1.0F;
|
||||
}
|
||||
|
||||
protected void bB() {
|
||||
super.bB();
|
||||
if (this.bD() && this.bE() != null && this.bE().world == this.world) {
|
||||
Entity entity = this.bE();
|
||||
protected void bF() {
|
||||
super.bF();
|
||||
if (this.bH() && this.bI() != null && this.bI().world == this.world) {
|
||||
Entity entity = this.bI();
|
||||
|
||||
this.b((int) entity.locX, (int) entity.locY, (int) entity.locZ, 5);
|
||||
float f = this.d(entity);
|
||||
|
||||
if (this instanceof EntityTameableAnimal && ((EntityTameableAnimal) this).isSitting()) {
|
||||
if (f > 10.0F) {
|
||||
this.i(true);
|
||||
this.a(true, true);
|
||||
}
|
||||
|
||||
return;
|
||||
@ -276,6 +276,7 @@ public abstract class EntityCreature extends EntityInsentient {
|
||||
this.bt = true;
|
||||
}
|
||||
|
||||
this.o(f);
|
||||
if (f > 4.0F) {
|
||||
this.getNavigation().a(entity, 1.0D);
|
||||
}
|
||||
@ -291,13 +292,15 @@ public abstract class EntityCreature extends EntityInsentient {
|
||||
}
|
||||
|
||||
if (f > 10.0F) {
|
||||
this.i(true);
|
||||
this.a(true, true);
|
||||
}
|
||||
} else if (!this.bD() && this.bt) {
|
||||
} else if (!this.bH() && this.bt) {
|
||||
this.bt = false;
|
||||
this.goalSelector.a(this.bs);
|
||||
this.getNavigation().a(true);
|
||||
this.bN();
|
||||
this.bR();
|
||||
}
|
||||
}
|
||||
|
||||
protected void o(float f) {}
|
||||
}
|
||||
|
@ -26,16 +26,16 @@ public class EntityCreeper extends EntityMonster {
|
||||
this.targetSelector.a(2, new PathfinderGoalHurtByTarget(this, false));
|
||||
}
|
||||
|
||||
protected void ax() {
|
||||
super.ax();
|
||||
this.a(GenericAttributes.d).a(0.25D);
|
||||
protected void ay() {
|
||||
super.ay();
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.25D);
|
||||
}
|
||||
|
||||
public boolean bb() {
|
||||
public boolean be() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int aq() {
|
||||
public int ar() {
|
||||
return this.getGoalTarget() == null ? 3 : 3 + (int) (this.getHealth() - 1.0F);
|
||||
}
|
||||
|
||||
@ -78,7 +78,7 @@ public class EntityCreeper extends EntityMonster {
|
||||
public void l_() {
|
||||
if (this.isAlive()) {
|
||||
this.bp = this.fuseTicks;
|
||||
int i = this.bR();
|
||||
int i = this.bV();
|
||||
|
||||
if (i > 0 && this.fuseTicks == 0) {
|
||||
this.makeSound("random.fuse", 1.0F, 0.5F);
|
||||
@ -112,11 +112,11 @@ public class EntityCreeper extends EntityMonster {
|
||||
super.l_();
|
||||
}
|
||||
|
||||
protected String aK() {
|
||||
protected String aN() {
|
||||
return "mob.creeper.say";
|
||||
}
|
||||
|
||||
protected String aL() {
|
||||
protected String aO() {
|
||||
return "mob.creeper.death";
|
||||
}
|
||||
|
||||
@ -173,7 +173,7 @@ public class EntityCreeper extends EntityMonster {
|
||||
return Item.SULPHUR.id;
|
||||
}
|
||||
|
||||
public int bR() {
|
||||
public int bV() {
|
||||
return this.datawatcher.getByte(16);
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ public class EntityDamageSourceIndirect extends EntityDamageSource {
|
||||
|
||||
public ChatMessage getLocalizedDeathMessage(EntityLiving entityliving) {
|
||||
String s = this.owner == null ? this.p.getScoreboardDisplayName() : this.owner.getScoreboardDisplayName();
|
||||
ItemStack itemstack = this.owner instanceof EntityLiving ? ((EntityLiving) this.owner).aV() : null;
|
||||
ItemStack itemstack = this.owner instanceof EntityLiving ? ((EntityLiving) this.owner).aY() : null;
|
||||
String s1 = "death.attack." + this.translationIndex;
|
||||
String s2 = s1 + ".item";
|
||||
|
||||
|
@ -47,9 +47,9 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
|
||||
this.am = true;
|
||||
}
|
||||
|
||||
protected void ax() {
|
||||
super.ax();
|
||||
this.a(GenericAttributes.a).a(200.0D);
|
||||
protected void ay() {
|
||||
super.ay();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(200.0D);
|
||||
}
|
||||
|
||||
protected void a() {
|
||||
@ -97,7 +97,7 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
|
||||
f2 = (this.random.nextFloat() - 0.5F) * 8.0F;
|
||||
this.world.addParticle("largeexplode", this.locX + (double) f, this.locY + 2.0D + (double) f1, this.locZ + (double) f2, 0.0D, 0.0D, 0.0D);
|
||||
} else {
|
||||
this.bF();
|
||||
this.bJ();
|
||||
f = 0.2F / (MathHelper.sqrt(this.motX * this.motX + this.motZ * this.motZ) * 10.0F + 1.0F);
|
||||
f *= (float) Math.pow(2.0D, this.motY);
|
||||
if (this.bA) {
|
||||
@ -162,7 +162,7 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
|
||||
}
|
||||
|
||||
if (this.bz || d3 < 100.0D || d3 > 22500.0D || this.positionChanged || this.H) {
|
||||
this.bG();
|
||||
this.bK();
|
||||
}
|
||||
|
||||
d1 /= (double) MathHelper.sqrt(d0 * d0 + d2 * d2);
|
||||
@ -296,7 +296,7 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
|
||||
}
|
||||
}
|
||||
|
||||
private void bF() {
|
||||
private void bJ() {
|
||||
if (this.bC != null) {
|
||||
if (this.bC.dead) {
|
||||
if (!this.world.isStatic) {
|
||||
@ -365,7 +365,7 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
|
||||
}
|
||||
}
|
||||
|
||||
private void bG() {
|
||||
private void bK() {
|
||||
this.bz = false;
|
||||
if (this.random.nextInt(2) == 0 && !this.world.players.isEmpty()) {
|
||||
this.bD = (Entity) this.world.players.get(this.random.nextInt(this.world.players.size()));
|
||||
@ -502,7 +502,7 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
|
||||
return super.damageEntity(damagesource, f);
|
||||
}
|
||||
|
||||
protected void az() {
|
||||
protected void aA() {
|
||||
++this.bB;
|
||||
if (this.bB >= 180 && this.bB <= 200) {
|
||||
float f = (this.random.nextFloat() - 0.5F) * 8.0F;
|
||||
@ -613,9 +613,9 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
|
||||
BlockEnderPortal.a = false;
|
||||
}
|
||||
|
||||
protected void bk() {}
|
||||
protected void bo() {}
|
||||
|
||||
public Entity[] am() {
|
||||
public Entity[] an() {
|
||||
return this.children;
|
||||
}
|
||||
|
||||
@ -631,11 +631,11 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
|
||||
return "mob.enderdragon.growl";
|
||||
}
|
||||
|
||||
protected String aK() {
|
||||
protected String aN() {
|
||||
return "mob.enderdragon.hit";
|
||||
}
|
||||
|
||||
protected float aW() {
|
||||
protected float aZ() {
|
||||
return 5.0F;
|
||||
}
|
||||
|
||||
|
@ -24,11 +24,11 @@ public class EntityEnderman extends EntityMonster {
|
||||
this.Y = 1.0F;
|
||||
}
|
||||
|
||||
protected void ax() {
|
||||
super.ax();
|
||||
this.a(GenericAttributes.a).a(40.0D);
|
||||
this.a(GenericAttributes.d).a(0.30000001192092896D);
|
||||
this.a(GenericAttributes.e).a(7.0D);
|
||||
protected void ay() {
|
||||
super.ay();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(40.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.30000001192092896D);
|
||||
this.getAttributeInstance(GenericAttributes.e).setValue(7.0D);
|
||||
}
|
||||
|
||||
protected void a() {
|
||||
@ -96,7 +96,7 @@ public class EntityEnderman extends EntityMonster {
|
||||
}
|
||||
|
||||
if (this.bu != this.target) {
|
||||
AttributeInstance attributeinstance = this.a(GenericAttributes.d);
|
||||
AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.d);
|
||||
|
||||
attributeinstance.b(bq);
|
||||
if (this.target != null) {
|
||||
@ -157,7 +157,7 @@ public class EntityEnderman extends EntityMonster {
|
||||
this.target = null;
|
||||
this.a(false);
|
||||
this.bv = false;
|
||||
this.bP();
|
||||
this.bT();
|
||||
}
|
||||
}
|
||||
|
||||
@ -165,10 +165,10 @@ public class EntityEnderman extends EntityMonster {
|
||||
this.target = null;
|
||||
this.a(false);
|
||||
this.bv = false;
|
||||
this.bP();
|
||||
this.bT();
|
||||
}
|
||||
|
||||
if (this.bT() && !this.bv && this.random.nextInt(100) == 0) {
|
||||
if (this.bX() && !this.bv && this.random.nextInt(100) == 0) {
|
||||
this.a(false);
|
||||
}
|
||||
|
||||
@ -181,7 +181,7 @@ public class EntityEnderman extends EntityMonster {
|
||||
if (this.target != null) {
|
||||
if (this.target instanceof EntityHuman && this.f((EntityHuman) this.target)) {
|
||||
if (this.target.e((Entity) this) < 16.0D) {
|
||||
this.bP();
|
||||
this.bT();
|
||||
}
|
||||
|
||||
this.bs = 0;
|
||||
@ -197,7 +197,7 @@ public class EntityEnderman extends EntityMonster {
|
||||
super.c();
|
||||
}
|
||||
|
||||
protected boolean bP() {
|
||||
protected boolean bT() {
|
||||
double d0 = this.locX + (this.random.nextDouble() - 0.5D) * 64.0D;
|
||||
double d1 = this.locY + (double) (this.random.nextInt(64) - 32);
|
||||
double d2 = this.locZ + (this.random.nextDouble() - 0.5D) * 64.0D;
|
||||
@ -287,14 +287,14 @@ public class EntityEnderman extends EntityMonster {
|
||||
}
|
||||
|
||||
protected String r() {
|
||||
return this.bT() ? "mob.endermen.scream" : "mob.endermen.idle";
|
||||
return this.bX() ? "mob.endermen.scream" : "mob.endermen.idle";
|
||||
}
|
||||
|
||||
protected String aK() {
|
||||
protected String aN() {
|
||||
return "mob.endermen.hit";
|
||||
}
|
||||
|
||||
protected String aL() {
|
||||
protected String aO() {
|
||||
return "mob.endermen.death";
|
||||
}
|
||||
|
||||
@ -348,7 +348,7 @@ public class EntityEnderman extends EntityMonster {
|
||||
this.bv = false;
|
||||
|
||||
for (int i = 0; i < 64; ++i) {
|
||||
if (this.bP()) {
|
||||
if (this.bT()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -360,7 +360,7 @@ public class EntityEnderman extends EntityMonster {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean bT() {
|
||||
public boolean bX() {
|
||||
return this.datawatcher.getByte(18) > 0;
|
||||
}
|
||||
|
||||
|
@ -187,7 +187,7 @@ public class EntityExperienceOrb extends Entity {
|
||||
return i >= 2477 ? 2477 : (i >= 1237 ? 1237 : (i >= 617 ? 617 : (i >= 307 ? 307 : (i >= 149 ? 149 : (i >= 73 ? 73 : (i >= 37 ? 37 : (i >= 17 ? 17 : (i >= 7 ? 7 : (i >= 3 ? 3 : 1)))))))));
|
||||
}
|
||||
|
||||
public boolean ao() {
|
||||
public boolean ap() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ public abstract class EntityFireball extends Entity {
|
||||
return true;
|
||||
}
|
||||
|
||||
public float X() {
|
||||
public float Y() {
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
@ -233,7 +233,7 @@ public abstract class EntityFireball extends Entity {
|
||||
} else {
|
||||
this.J();
|
||||
if (damagesource.getEntity() != null) {
|
||||
Vec3D vec3d = damagesource.getEntity().Y();
|
||||
Vec3D vec3d = damagesource.getEntity().Z();
|
||||
|
||||
if (vec3d != null) {
|
||||
this.motX = vec3d.c;
|
||||
|
@ -115,7 +115,7 @@ public class EntityFireworks extends Entity {
|
||||
return super.d(f);
|
||||
}
|
||||
|
||||
public boolean ao() {
|
||||
public boolean ap() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ public class EntityFishingHook extends Entity {
|
||||
this.b(this.yaw, this.pitch);
|
||||
} else {
|
||||
if (!this.world.isStatic) {
|
||||
ItemStack itemstack = this.owner.bt();
|
||||
ItemStack itemstack = this.owner.bx();
|
||||
|
||||
if (this.owner.dead || !this.owner.isAlive() || itemstack == null || itemstack.getItem() != Item.FISHING_ROD || this.e(this.owner) > 1024.0D) {
|
||||
this.die();
|
||||
|
@ -42,17 +42,17 @@ public class EntityGhast extends EntityFlying implements IMonster {
|
||||
this.datawatcher.a(16, Byte.valueOf((byte) 0));
|
||||
}
|
||||
|
||||
protected void ax() {
|
||||
super.ax();
|
||||
this.a(GenericAttributes.a).a(10.0D);
|
||||
protected void ay() {
|
||||
super.ay();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(10.0D);
|
||||
}
|
||||
|
||||
protected void bh() {
|
||||
protected void bk() {
|
||||
if (!this.world.isStatic && this.world.difficulty == 0) {
|
||||
this.die();
|
||||
}
|
||||
|
||||
this.bk();
|
||||
this.bo();
|
||||
this.bo = this.bp;
|
||||
double d0 = this.i - this.locX;
|
||||
double d1 = this.j - this.locY;
|
||||
@ -185,11 +185,11 @@ public class EntityGhast extends EntityFlying implements IMonster {
|
||||
return "mob.ghast.moan";
|
||||
}
|
||||
|
||||
protected String aK() {
|
||||
protected String aN() {
|
||||
return "mob.ghast.scream";
|
||||
}
|
||||
|
||||
protected String aL() {
|
||||
protected String aO() {
|
||||
return "mob.ghast.death";
|
||||
}
|
||||
|
||||
@ -218,7 +218,7 @@ public class EntityGhast extends EntityFlying implements IMonster {
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
protected float aW() {
|
||||
protected float aZ() {
|
||||
return 10.0F;
|
||||
}
|
||||
|
||||
@ -226,7 +226,7 @@ public class EntityGhast extends EntityFlying implements IMonster {
|
||||
return this.random.nextInt(20) == 0 && super.canSpawn() && this.world.difficulty > 0;
|
||||
}
|
||||
|
||||
public int br() {
|
||||
public int bv() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -318,5 +318,9 @@ public abstract class EntityHanging extends Entity {
|
||||
|
||||
public abstract int e();
|
||||
|
||||
protected boolean O() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public abstract void b(Entity entity);
|
||||
}
|
||||
|
Datei-Diff unterdrückt, da er zu groß ist
Diff laden
@ -77,9 +77,9 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
this.maxFireTicks = 20;
|
||||
}
|
||||
|
||||
protected void ax() {
|
||||
super.ax();
|
||||
this.aT().b(GenericAttributes.e).a(1.0D);
|
||||
protected void ay() {
|
||||
super.ay();
|
||||
this.aW().b(GenericAttributes.e).setValue(1.0D);
|
||||
}
|
||||
|
||||
protected void a() {
|
||||
@ -89,19 +89,19 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
this.datawatcher.a(18, Integer.valueOf(0));
|
||||
}
|
||||
|
||||
public boolean bm() {
|
||||
public boolean bq() {
|
||||
return this.f != null;
|
||||
}
|
||||
|
||||
public void bo() {
|
||||
public void bs() {
|
||||
if (this.f != null) {
|
||||
this.f.b(this.world, this, this.g);
|
||||
}
|
||||
|
||||
this.bp();
|
||||
this.bt();
|
||||
}
|
||||
|
||||
public void bp() {
|
||||
public void bt() {
|
||||
this.f = null;
|
||||
this.g = 0;
|
||||
if (!this.world.isStatic) {
|
||||
@ -110,7 +110,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
}
|
||||
|
||||
public boolean isBlocking() {
|
||||
return this.bm() && Item.byId[this.f.id].c_(this.f) == EnumAnimation.BLOCK;
|
||||
return this.bq() && Item.byId[this.f.id].c_(this.f) == EnumAnimation.BLOCK;
|
||||
}
|
||||
|
||||
public void l_() {
|
||||
@ -126,7 +126,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
this.n();
|
||||
}
|
||||
} else {
|
||||
this.bp();
|
||||
this.bt();
|
||||
}
|
||||
}
|
||||
|
||||
@ -213,7 +213,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
return this.abilities.isInvulnerable ? 0 : 80;
|
||||
}
|
||||
|
||||
public int aa() {
|
||||
public int ab() {
|
||||
return 10;
|
||||
}
|
||||
|
||||
@ -283,11 +283,11 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
}
|
||||
}
|
||||
|
||||
this.bp();
|
||||
this.bt();
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean aY() {
|
||||
protected boolean bb() {
|
||||
return this.getHealth() <= 0.0F || this.isSleeping();
|
||||
}
|
||||
|
||||
@ -318,7 +318,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
}
|
||||
}
|
||||
|
||||
public void T() {
|
||||
public void U() {
|
||||
if (!this.world.isStatic && this.isSneaking()) {
|
||||
this.mount((Entity) null);
|
||||
this.setSneaking(false);
|
||||
@ -329,7 +329,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
float f = this.yaw;
|
||||
float f1 = this.pitch;
|
||||
|
||||
super.T();
|
||||
super.U();
|
||||
this.bs = this.bt;
|
||||
this.bt = 0.0F;
|
||||
this.k(this.locX - d0, this.locY - d1, this.locZ - d2);
|
||||
@ -341,9 +341,9 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
}
|
||||
}
|
||||
|
||||
protected void bh() {
|
||||
super.bh();
|
||||
this.aS();
|
||||
protected void bk() {
|
||||
super.bk();
|
||||
this.aV();
|
||||
}
|
||||
|
||||
public void c() {
|
||||
@ -359,10 +359,10 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
this.inventory.k();
|
||||
this.bs = this.bt;
|
||||
super.c();
|
||||
AttributeInstance attributeinstance = this.a(GenericAttributes.d);
|
||||
AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.d);
|
||||
|
||||
if (!this.world.isStatic) {
|
||||
attributeinstance.a((double) this.abilities.b());
|
||||
attributeinstance.setValue((double) this.abilities.b());
|
||||
}
|
||||
|
||||
this.aR = this.bL;
|
||||
@ -370,7 +370,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
this.aR = (float) ((double) this.aR + (double) this.bL * 0.3D);
|
||||
}
|
||||
|
||||
this.i((float) attributeinstance.e());
|
||||
this.i((float) attributeinstance.getValue());
|
||||
float f = MathHelper.sqrt(this.motX * this.motX + this.motZ * this.motZ);
|
||||
// CraftBukkit - Math -> TrigMath
|
||||
float f1 = (float) org.bukkit.craftbukkit.TrigMath.atan(-this.motY * 0.20000000298023224D) * 15.0F;
|
||||
@ -700,10 +700,6 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
entity = ((EntityArrow) entity).shooter;
|
||||
}
|
||||
|
||||
if (entity instanceof EntityLiving) {
|
||||
this.a((EntityLiving) entity, false);
|
||||
}
|
||||
|
||||
this.a(StatisticList.x, Math.round(f * 10.0F));
|
||||
return super.damageEntity(damagesource, f);
|
||||
}
|
||||
@ -737,43 +733,15 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
protected void a(EntityLiving entityliving, boolean flag) {
|
||||
if (!(entityliving instanceof EntityCreeper) && !(entityliving instanceof EntityGhast)) {
|
||||
if (entityliving instanceof EntityWolf) {
|
||||
EntityWolf entitywolf = (EntityWolf) entityliving;
|
||||
|
||||
if (entitywolf.isTamed() && this.name.equals(entitywolf.getOwnerName())) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(entityliving instanceof EntityHuman) || this.a((EntityHuman) entityliving)) {
|
||||
if (!(entityliving instanceof EntityHorse) || !((EntityHorse) entityliving).bS()) {
|
||||
List list = this.world.a(EntityWolf.class, AxisAlignedBB.a().a(this.locX, this.locY, this.locZ, this.locX + 1.0D, this.locY + 1.0D, this.locZ + 1.0D).grow(16.0D, 4.0D, 16.0D));
|
||||
Iterator iterator = list.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
EntityWolf entitywolf1 = (EntityWolf) iterator.next();
|
||||
|
||||
if (entitywolf1.isTamed() && entitywolf1.bJ() == null && this.name.equals(entitywolf1.getOwnerName()) && (!flag || !entitywolf1.isSitting())) {
|
||||
entitywolf1.setSitting(false);
|
||||
entitywolf1.setTarget(entityliving);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void h(float f) {
|
||||
this.inventory.a(f);
|
||||
}
|
||||
|
||||
public int aM() {
|
||||
public int aP() {
|
||||
return this.inventory.l();
|
||||
}
|
||||
|
||||
public float bs() {
|
||||
public float bw() {
|
||||
int i = 0;
|
||||
ItemStack[] aitemstack = this.inventory.armor;
|
||||
int j = aitemstack.length;
|
||||
@ -799,14 +767,14 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
f = this.c(damagesource, f);
|
||||
float f1 = f;
|
||||
|
||||
f = Math.max(f - this.bj(), 0.0F);
|
||||
this.m(this.bj() - (f1 - f));
|
||||
f = Math.max(f - this.bm(), 0.0F);
|
||||
this.m(this.bm() - (f1 - f));
|
||||
if (f != 0.0F) {
|
||||
this.a(damagesource.f());
|
||||
float f2 = this.getHealth();
|
||||
|
||||
this.setHealth(this.getHealth() - f);
|
||||
this.aN().a(damagesource, f2, f);
|
||||
this.aQ().a(damagesource, f2, f);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -826,7 +794,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
public void c(ItemStack itemstack) {}
|
||||
|
||||
public boolean p(Entity entity) {
|
||||
ItemStack itemstack = this.bt();
|
||||
ItemStack itemstack = this.bx();
|
||||
ItemStack itemstack1 = itemstack != null ? itemstack.cloneItemStack() : null;
|
||||
|
||||
if (!entity.c(this)) {
|
||||
@ -838,7 +806,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
if (itemstack.a(this, (EntityLiving) entity)) {
|
||||
// CraftBukkit - bypass infinite items; <= 0 -> == 0
|
||||
if (itemstack.count == 0 && !this.abilities.canInstantlyBuild) {
|
||||
this.bu();
|
||||
this.by();
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -847,9 +815,9 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
|
||||
return false;
|
||||
} else {
|
||||
if (itemstack != null && itemstack == this.bt()) {
|
||||
if (itemstack != null && itemstack == this.bx()) {
|
||||
if (itemstack.count <= 0 && !this.abilities.canInstantlyBuild) {
|
||||
this.bu();
|
||||
this.by();
|
||||
} else if (itemstack.count < itemstack1.count && this.abilities.canInstantlyBuild) {
|
||||
itemstack.count = itemstack1.count;
|
||||
}
|
||||
@ -859,22 +827,22 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
}
|
||||
}
|
||||
|
||||
public ItemStack bt() {
|
||||
public ItemStack bx() {
|
||||
return this.inventory.getItemInHand();
|
||||
}
|
||||
|
||||
public void bu() {
|
||||
public void by() {
|
||||
this.inventory.setItem(this.inventory.itemInHandIndex, (ItemStack) null);
|
||||
}
|
||||
|
||||
public double V() {
|
||||
public double W() {
|
||||
return (double) (this.height - 0.5F);
|
||||
}
|
||||
|
||||
public void attack(Entity entity) {
|
||||
if (entity.ao()) {
|
||||
if (entity.ap()) {
|
||||
if (!entity.i(this)) {
|
||||
float f = (float) this.a(GenericAttributes.e).e();
|
||||
float f = (float) this.getAttributeInstance(GenericAttributes.e).getValue();
|
||||
int i = 0;
|
||||
float f1 = 0.0F;
|
||||
|
||||
@ -940,7 +908,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
}
|
||||
}
|
||||
|
||||
ItemStack itemstack = this.bt();
|
||||
ItemStack itemstack = this.bx();
|
||||
Object object = entity;
|
||||
|
||||
if (entity instanceof EntityComplexPart) {
|
||||
@ -955,15 +923,11 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
itemstack.a((EntityLiving) object, this);
|
||||
// CraftBukkit - bypass infinite items; <= 0 -> == 0
|
||||
if (itemstack.count == 0) {
|
||||
this.bu();
|
||||
this.by();
|
||||
}
|
||||
}
|
||||
|
||||
if (entity instanceof EntityLiving) {
|
||||
if (entity.isAlive()) {
|
||||
this.a((EntityLiving) entity, true);
|
||||
}
|
||||
|
||||
this.a(StatisticList.w, Math.round(f * 10.0F));
|
||||
if (j > 0 && flag2) {
|
||||
// CraftBukkit start - Call a combust event when somebody hits with a fire enchanted item
|
||||
@ -1028,7 +992,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
}
|
||||
}
|
||||
|
||||
if (this.ae()) {
|
||||
if (this.af()) {
|
||||
this.mount((Entity) null);
|
||||
}
|
||||
|
||||
@ -1228,8 +1192,8 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
|
||||
public void a(Statistic statistic, int i) {}
|
||||
|
||||
protected void ba() {
|
||||
super.ba();
|
||||
protected void bd() {
|
||||
super.bd();
|
||||
this.a(StatisticList.u, 1);
|
||||
if (this.isSprinting()) {
|
||||
this.a(0.8F);
|
||||
@ -1258,8 +1222,8 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
this.checkMovement(this.locX - d0, this.locY - d1, this.locZ - d2);
|
||||
}
|
||||
|
||||
public float bc() {
|
||||
return (float) this.a(GenericAttributes.d).e();
|
||||
public float bf() {
|
||||
return (float) this.getAttributeInstance(GenericAttributes.d).getValue();
|
||||
}
|
||||
|
||||
public void checkMovement(double d0, double d1, double d2) {
|
||||
@ -1338,9 +1302,9 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
}
|
||||
}
|
||||
|
||||
public void ak() {
|
||||
public void al() {
|
||||
if (!this.abilities.isFlying) {
|
||||
super.ak();
|
||||
super.al();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1400,7 +1364,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
return (flag || this.foodData.c()) && !this.abilities.isInvulnerable;
|
||||
}
|
||||
|
||||
public boolean bE() {
|
||||
public boolean bI() {
|
||||
return this.getHealth() > 0.0F && this.getHealth() < this.getMaxHealth();
|
||||
}
|
||||
|
||||
@ -1427,8 +1391,8 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
return true;
|
||||
}
|
||||
|
||||
if (this.bt() != null) {
|
||||
ItemStack itemstack = this.bt();
|
||||
if (this.bx() != null) {
|
||||
ItemStack itemstack = this.bx();
|
||||
|
||||
if (itemstack.b(block) || itemstack.a(block) > 1.0F) {
|
||||
return true;
|
||||
@ -1507,7 +1471,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
return i == 0 ? this.inventory.getItemInHand() : this.inventory.armor[i - 1];
|
||||
}
|
||||
|
||||
public ItemStack aV() {
|
||||
public ItemStack aY() {
|
||||
return this.inventory.getItemInHand();
|
||||
}
|
||||
|
||||
@ -1519,7 +1483,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
return this.inventory.armor;
|
||||
}
|
||||
|
||||
public boolean av() {
|
||||
public boolean aw() {
|
||||
return !this.abilities.isFlying;
|
||||
}
|
||||
|
||||
@ -1527,7 +1491,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
return this.world.getScoreboard();
|
||||
}
|
||||
|
||||
public ScoreboardTeam getScoreboardTeam() {
|
||||
public ScoreboardTeamBase getScoreboardTeam() {
|
||||
return this.getScoreboard().getPlayerTeam(this.name);
|
||||
}
|
||||
|
||||
@ -1544,7 +1508,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
this.getDataWatcher().watch(17, Float.valueOf(f));
|
||||
}
|
||||
|
||||
public float bj() {
|
||||
public float bm() {
|
||||
return this.getDataWatcher().getFloat(17);
|
||||
}
|
||||
}
|
||||
|
@ -47,9 +47,9 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
}
|
||||
}
|
||||
|
||||
protected void ax() {
|
||||
super.ax();
|
||||
this.aT().b(GenericAttributes.b).a(16.0D);
|
||||
protected void ay() {
|
||||
super.ay();
|
||||
this.aW().b(GenericAttributes.b).setValue(16.0D);
|
||||
}
|
||||
|
||||
public ControllerLook getControllerLook() {
|
||||
@ -100,7 +100,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
String s = this.r();
|
||||
|
||||
if (s != null) {
|
||||
this.makeSound(s, this.aW(), this.aX());
|
||||
this.makeSound(s, this.aZ(), this.ba());
|
||||
}
|
||||
}
|
||||
|
||||
@ -146,12 +146,12 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
public void l_() {
|
||||
super.l_();
|
||||
if (!this.world.isStatic) {
|
||||
this.bB();
|
||||
this.bF();
|
||||
}
|
||||
}
|
||||
|
||||
protected float f(float f, float f1) {
|
||||
if (this.bb()) {
|
||||
if (this.be()) {
|
||||
this.bn.a();
|
||||
return f1;
|
||||
} else {
|
||||
@ -202,7 +202,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
|
||||
public void b(NBTTagCompound nbttagcompound) {
|
||||
super.b(nbttagcompound);
|
||||
nbttagcompound.setBoolean("CanPickUpLoot", this.bz());
|
||||
nbttagcompound.setBoolean("CanPickUpLoot", this.bD());
|
||||
nbttagcompound.setBoolean("PersistenceRequired", this.persistent);
|
||||
NBTTagList nbttaglist = new NBTTagList();
|
||||
|
||||
@ -247,8 +247,6 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
|
||||
public void a(NBTTagCompound nbttagcompound) {
|
||||
super.a(nbttagcompound);
|
||||
this.h(nbttagcompound.getBoolean("CanPickUpLoot"));
|
||||
this.persistent = nbttagcompound.getBoolean("PersistenceRequired");
|
||||
|
||||
// CraftBukkit start - If looting or persistence is false only use it if it was set after we started using it
|
||||
boolean data = nbttagcompound.getBoolean("CanPickUpLoot");
|
||||
@ -304,7 +302,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
public void c() {
|
||||
super.c();
|
||||
this.world.methodProfiler.a("looting");
|
||||
if (!this.world.isStatic && this.bz() && !this.aU && this.world.getGameRules().getBoolean("mobGriefing")) {
|
||||
if (!this.world.isStatic && this.bD() && !this.aU && this.world.getGameRules().getBoolean("mobGriefing")) {
|
||||
List list = this.world.a(EntityItem.class, this.boundingBox.grow(1.0D, 0.0D, 1.0D));
|
||||
Iterator iterator = list.iterator();
|
||||
|
||||
@ -370,7 +368,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
this.world.methodProfiler.b();
|
||||
}
|
||||
|
||||
protected boolean bb() {
|
||||
protected boolean be() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -378,7 +376,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void bk() {
|
||||
protected void bo() {
|
||||
if (this.persistent) {
|
||||
this.aV = 0;
|
||||
} else {
|
||||
@ -403,10 +401,10 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
}
|
||||
}
|
||||
|
||||
protected void be() {
|
||||
protected void bh() {
|
||||
++this.aV;
|
||||
this.world.methodProfiler.a("checkDespawn");
|
||||
this.bk();
|
||||
this.bo();
|
||||
this.world.methodProfiler.b();
|
||||
this.world.methodProfiler.a("sensing");
|
||||
this.bq.a();
|
||||
@ -421,7 +419,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
this.navigation.f();
|
||||
this.world.methodProfiler.b();
|
||||
this.world.methodProfiler.a("mob tick");
|
||||
this.bg();
|
||||
this.bj();
|
||||
this.world.methodProfiler.b();
|
||||
this.world.methodProfiler.a("controls");
|
||||
this.world.methodProfiler.a("move");
|
||||
@ -434,11 +432,11 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
this.world.methodProfiler.b();
|
||||
}
|
||||
|
||||
protected void bh() {
|
||||
super.bh();
|
||||
protected void bk() {
|
||||
super.bk();
|
||||
this.be = 0.0F;
|
||||
this.bf = 0.0F;
|
||||
this.bk();
|
||||
this.bo();
|
||||
float f = 8.0F;
|
||||
|
||||
if (this.random.nextFloat() < 0.02F) {
|
||||
@ -453,7 +451,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
}
|
||||
|
||||
if (this.bu != null) {
|
||||
this.a(this.bu, 10.0F, (float) this.bl());
|
||||
this.a(this.bu, 10.0F, (float) this.bp());
|
||||
if (this.g-- <= 0 || this.bu.dead || this.bu.e((Entity) this) > (double) (f * f)) {
|
||||
this.bu = null;
|
||||
}
|
||||
@ -474,7 +472,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
}
|
||||
}
|
||||
|
||||
public int bl() {
|
||||
public int bp() {
|
||||
return 40;
|
||||
}
|
||||
|
||||
@ -517,11 +515,11 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
return this.world.b(this.boundingBox) && this.world.getCubes(this, this.boundingBox).isEmpty() && !this.world.containsLiquid(this.boundingBox);
|
||||
}
|
||||
|
||||
public int br() {
|
||||
public int bv() {
|
||||
return 4;
|
||||
}
|
||||
|
||||
public int aq() {
|
||||
public int ar() {
|
||||
if (this.getGoalTarget() == null) {
|
||||
return 3;
|
||||
} else {
|
||||
@ -536,7 +534,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
}
|
||||
}
|
||||
|
||||
public ItemStack aV() {
|
||||
public ItemStack aY() {
|
||||
return this.equipment[0];
|
||||
}
|
||||
|
||||
@ -582,7 +580,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
}
|
||||
}
|
||||
|
||||
protected void bs() {
|
||||
protected void bw() {
|
||||
if (this.random.nextFloat() < 0.15F * this.world.b(this.locX, this.locY, this.locZ)) {
|
||||
int i = this.random.nextInt(2);
|
||||
float f = this.world.difficulty == 3 ? 0.1F : 0.25F;
|
||||
@ -700,11 +698,11 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
}
|
||||
}
|
||||
|
||||
protected void bt() {
|
||||
protected void bx() {
|
||||
float f = this.world.b(this.locX, this.locY, this.locZ);
|
||||
|
||||
if (this.aV() != null && this.random.nextFloat() < 0.25F * f) {
|
||||
EnchantmentManager.a(this.random, this.aV(), (int) (5.0F + f * (float) this.random.nextInt(18)));
|
||||
if (this.aY() != null && this.random.nextFloat() < 0.25F * f) {
|
||||
EnchantmentManager.a(this.random, this.aY(), (int) (5.0F + f * (float) this.random.nextInt(18)));
|
||||
}
|
||||
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
@ -717,11 +715,11 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
}
|
||||
|
||||
public GroupDataEntity a(GroupDataEntity groupdataentity) {
|
||||
this.a(GenericAttributes.b).a(new AttributeModifier("Random spawn bonus", this.random.nextGaussian() * 0.05D, 1));
|
||||
this.getAttributeInstance(GenericAttributes.b).a(new AttributeModifier("Random spawn bonus", this.random.nextGaussian() * 0.05D, 1));
|
||||
return groupdataentity;
|
||||
}
|
||||
|
||||
public boolean bu() {
|
||||
public boolean by() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -729,7 +727,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
return this.hasCustomName() ? this.getCustomName() : super.getLocalizedName();
|
||||
}
|
||||
|
||||
public void bv() {
|
||||
public void bz() {
|
||||
this.persistent = true;
|
||||
}
|
||||
|
||||
@ -757,7 +755,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
this.dropChances[i] = f;
|
||||
}
|
||||
|
||||
public boolean bz() {
|
||||
public boolean bD() {
|
||||
return this.canPickUpLoot;
|
||||
}
|
||||
|
||||
@ -765,18 +763,18 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
this.canPickUpLoot = flag;
|
||||
}
|
||||
|
||||
public boolean bA() {
|
||||
public boolean isPersistent() {
|
||||
return this.persistent;
|
||||
}
|
||||
|
||||
public final boolean c(EntityHuman entityhuman) {
|
||||
if (this.bD() && this.bE() == entityhuman) {
|
||||
this.i(true);
|
||||
if (this.bH() && this.bI() == entityhuman) {
|
||||
this.a(true, !entityhuman.abilities.canInstantlyBuild);
|
||||
return true;
|
||||
} else {
|
||||
ItemStack itemstack = entityhuman.inventory.getItemInHand();
|
||||
|
||||
if (itemstack != null && itemstack.id == Item.LEASH.id && this.bC()) {
|
||||
if (itemstack != null && itemstack.id == Item.LEASH.id && this.bG()) {
|
||||
if (!(this instanceof EntityTameableAnimal) || !((EntityTameableAnimal) this).isTamed()) {
|
||||
this.b(entityhuman, true);
|
||||
--itemstack.count;
|
||||
@ -798,23 +796,23 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void bB() {
|
||||
protected void bF() {
|
||||
if (this.bx != null) {
|
||||
this.bF();
|
||||
this.bJ();
|
||||
}
|
||||
|
||||
if (this.bv) {
|
||||
if (this.bw == null || this.bw.dead) {
|
||||
this.i(true);
|
||||
this.a(true, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void i(boolean flag) {
|
||||
public void a(boolean flag, boolean flag1) {
|
||||
if (this.bv) {
|
||||
this.bv = false;
|
||||
this.bw = null;
|
||||
if (!this.world.isStatic) {
|
||||
if (!this.world.isStatic && flag1) {
|
||||
this.b(Item.LEASH.id, 1);
|
||||
}
|
||||
|
||||
@ -824,15 +822,15 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean bC() {
|
||||
return !this.bD() && !(this instanceof IMonster);
|
||||
public boolean bG() {
|
||||
return !this.bH() && !(this instanceof IMonster);
|
||||
}
|
||||
|
||||
public boolean bD() {
|
||||
public boolean bH() {
|
||||
return this.bv;
|
||||
}
|
||||
|
||||
public Entity bE() {
|
||||
public Entity bI() {
|
||||
return this.bw;
|
||||
}
|
||||
|
||||
@ -844,7 +842,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
}
|
||||
}
|
||||
|
||||
private void bF() {
|
||||
private void bJ() {
|
||||
if (this.bv && this.bx != null) {
|
||||
if (this.bx.hasKey("UUIDMost") && this.bx.hasKey("UUIDLeast")) {
|
||||
UUID uuid = new UUID(this.bx.getLong("UUIDMost"), this.bx.getLong("UUIDLeast"));
|
||||
@ -871,7 +869,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
|
||||
this.bw = entityleash;
|
||||
} else {
|
||||
this.i(false);
|
||||
this.a(false, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,16 +31,16 @@ public class EntityIronGolem extends EntityGolem {
|
||||
this.datawatcher.a(16, Byte.valueOf((byte) 0));
|
||||
}
|
||||
|
||||
public boolean bb() {
|
||||
public boolean be() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void bg() {
|
||||
protected void bj() {
|
||||
if (--this.bq <= 0) {
|
||||
this.bq = 70 + this.random.nextInt(50);
|
||||
this.bp = this.world.villages.getClosestVillage(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ), 32);
|
||||
if (this.bp == null) {
|
||||
this.bN();
|
||||
this.bR();
|
||||
} else {
|
||||
ChunkCoordinates chunkcoordinates = this.bp.getCenter();
|
||||
|
||||
@ -48,13 +48,13 @@ public class EntityIronGolem extends EntityGolem {
|
||||
}
|
||||
}
|
||||
|
||||
super.bg();
|
||||
super.bj();
|
||||
}
|
||||
|
||||
protected void ax() {
|
||||
super.ax();
|
||||
this.a(GenericAttributes.a).a(100.0D);
|
||||
this.a(GenericAttributes.d).a(0.25D);
|
||||
protected void ay() {
|
||||
super.ay();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(100.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.25D);
|
||||
}
|
||||
|
||||
protected int h(int i) {
|
||||
@ -62,7 +62,7 @@ public class EntityIronGolem extends EntityGolem {
|
||||
}
|
||||
|
||||
protected void n(Entity entity) {
|
||||
if (entity instanceof IMonster && this.aB().nextInt(20) == 0) {
|
||||
if (entity instanceof IMonster && this.aC().nextInt(20) == 0) {
|
||||
this.setGoalTarget((EntityLiving) entity);
|
||||
}
|
||||
|
||||
@ -92,12 +92,12 @@ public class EntityIronGolem extends EntityGolem {
|
||||
}
|
||||
|
||||
public boolean a(Class oclass) {
|
||||
return this.bS() && EntityHuman.class.isAssignableFrom(oclass) ? false : super.a(oclass);
|
||||
return this.bW() && EntityHuman.class.isAssignableFrom(oclass) ? false : super.a(oclass);
|
||||
}
|
||||
|
||||
public void b(NBTTagCompound nbttagcompound) {
|
||||
super.b(nbttagcompound);
|
||||
nbttagcompound.setBoolean("PlayerCreated", this.bS());
|
||||
nbttagcompound.setBoolean("PlayerCreated", this.bW());
|
||||
}
|
||||
|
||||
public void a(NBTTagCompound nbttagcompound) {
|
||||
@ -118,7 +118,7 @@ public class EntityIronGolem extends EntityGolem {
|
||||
return flag;
|
||||
}
|
||||
|
||||
public Village bP() {
|
||||
public Village bT() {
|
||||
return this.bp;
|
||||
}
|
||||
|
||||
@ -131,11 +131,11 @@ public class EntityIronGolem extends EntityGolem {
|
||||
return "none";
|
||||
}
|
||||
|
||||
protected String aK() {
|
||||
protected String aN() {
|
||||
return "mob.irongolem.hit";
|
||||
}
|
||||
|
||||
protected String aL() {
|
||||
protected String aO() {
|
||||
return "mob.irongolem.death";
|
||||
}
|
||||
|
||||
@ -164,11 +164,11 @@ public class EntityIronGolem extends EntityGolem {
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
public int bR() {
|
||||
public int bV() {
|
||||
return this.bs;
|
||||
}
|
||||
|
||||
public boolean bS() {
|
||||
public boolean bW() {
|
||||
return (this.datawatcher.getByte(16) & 1) != 0;
|
||||
}
|
||||
|
||||
@ -183,7 +183,7 @@ public class EntityIronGolem extends EntityGolem {
|
||||
}
|
||||
|
||||
public void die(DamageSource damagesource) {
|
||||
if (!this.bS() && this.killer != null && this.bp != null) {
|
||||
if (!this.bW() && this.killer != null && this.bp != null) {
|
||||
this.bp.a(this.killer.getName(), -5);
|
||||
}
|
||||
|
||||
|
@ -266,7 +266,7 @@ public class EntityItem extends Entity {
|
||||
return LocaleI18n.get("item." + this.getItemStack().a());
|
||||
}
|
||||
|
||||
public boolean ao() {
|
||||
public boolean ap() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -70,9 +70,10 @@ public abstract class EntityLiving extends Entity {
|
||||
public EntityLiving lastDamager; // CraftBukkit - private -> public
|
||||
private int j;
|
||||
private EntityLiving bn;
|
||||
private float bo;
|
||||
private int bp;
|
||||
private float bq;
|
||||
private int bo;
|
||||
private float bp;
|
||||
private int bq;
|
||||
private float br;
|
||||
// CraftBukkit start
|
||||
public int expToDrop;
|
||||
public int maxAirTicks = 300;
|
||||
@ -80,7 +81,7 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
public EntityLiving(World world) {
|
||||
super(world);
|
||||
this.ax();
|
||||
this.ay();
|
||||
this.setHealth(this.getMaxHealth());
|
||||
this.m = true;
|
||||
this.aM = (float) (Math.random() + 1.0D) * 0.01F;
|
||||
@ -98,12 +99,12 @@ public abstract class EntityLiving extends Entity {
|
||||
this.datawatcher.a(6, Float.valueOf(1.0F));
|
||||
}
|
||||
|
||||
protected void ax() {
|
||||
this.aT().b(GenericAttributes.a);
|
||||
this.aT().b(GenericAttributes.c);
|
||||
this.aT().b(GenericAttributes.d);
|
||||
if (!this.bb()) {
|
||||
this.a(GenericAttributes.d).a(0.10000000149011612D);
|
||||
protected void ay() {
|
||||
this.aW().b(GenericAttributes.a);
|
||||
this.aW().b(GenericAttributes.c);
|
||||
this.aW().b(GenericAttributes.d);
|
||||
if (!this.be()) {
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.10000000149011612D);
|
||||
}
|
||||
}
|
||||
|
||||
@ -134,7 +135,7 @@ public abstract class EntityLiving extends Entity {
|
||||
super.a(d0, flag);
|
||||
}
|
||||
|
||||
public boolean ay() {
|
||||
public boolean az() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -153,7 +154,7 @@ public abstract class EntityLiving extends Entity {
|
||||
boolean flag = this instanceof EntityHuman && ((EntityHuman) this).abilities.isInvulnerable;
|
||||
|
||||
if (this.isAlive() && this.a(Material.WATER)) {
|
||||
if (!this.ay() && !this.hasEffect(MobEffectList.WATER_BREATHING.id) && !flag) {
|
||||
if (!this.az() && !this.hasEffect(MobEffectList.WATER_BREATHING.id) && !flag) {
|
||||
this.setAirTicks(this.h(this.getAirTicks()));
|
||||
if (this.getAirTicks() == -20) {
|
||||
this.setAirTicks(0);
|
||||
@ -171,7 +172,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
|
||||
this.extinguish();
|
||||
if (!this.world.isStatic && this.ae() && this.vehicle instanceof EntityLiving) {
|
||||
if (!this.world.isStatic && this.af() && this.vehicle instanceof EntityLiving) {
|
||||
this.mount((Entity) null);
|
||||
}
|
||||
} else {
|
||||
@ -196,7 +197,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
|
||||
if (this.getHealth() <= 0.0F) {
|
||||
this.az();
|
||||
this.aA();
|
||||
}
|
||||
|
||||
if (this.lastDamageByPlayerTime > 0) {
|
||||
@ -209,17 +210,11 @@ public abstract class EntityLiving extends Entity {
|
||||
this.bn = null;
|
||||
}
|
||||
|
||||
if (this.lastDamager != null) {
|
||||
if (!this.lastDamager.isAlive()) {
|
||||
this.b((EntityLiving) null);
|
||||
} else if (this.j > 0) {
|
||||
--this.j;
|
||||
} else {
|
||||
this.b((EntityLiving) null);
|
||||
}
|
||||
if (this.lastDamager != null && !this.lastDamager.isAlive()) {
|
||||
this.b((EntityLiving) null);
|
||||
}
|
||||
|
||||
this.aF();
|
||||
this.aI();
|
||||
this.aZ = this.aY;
|
||||
this.aO = this.aN;
|
||||
this.aQ = this.aP;
|
||||
@ -244,7 +239,7 @@ public abstract class EntityLiving extends Entity {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void az() {
|
||||
protected void aA() {
|
||||
++this.deathTicks;
|
||||
if (this.deathTicks >= 20 && !this.dead) { // CraftBukkit - (this.deathTicks == 20) -> (this.deathTicks >= 20 && !this.dead)
|
||||
int i;
|
||||
@ -286,7 +281,7 @@ public abstract class EntityLiving extends Entity {
|
||||
return false;
|
||||
}
|
||||
|
||||
public Random aB() {
|
||||
public Random aC() {
|
||||
return this.random;
|
||||
}
|
||||
|
||||
@ -294,22 +289,34 @@ public abstract class EntityLiving extends Entity {
|
||||
return this.lastDamager;
|
||||
}
|
||||
|
||||
public void b(EntityLiving entityliving) {
|
||||
this.lastDamager = entityliving;
|
||||
this.j = this.lastDamager != null ? 100 : 0;
|
||||
public int aE() {
|
||||
return this.j;
|
||||
}
|
||||
|
||||
public EntityLiving aD() {
|
||||
public void b(EntityLiving entityliving) {
|
||||
this.lastDamager = entityliving;
|
||||
this.j = this.ticksLived;
|
||||
}
|
||||
|
||||
public EntityLiving aF() {
|
||||
return this.bn;
|
||||
}
|
||||
|
||||
public int aG() {
|
||||
return this.bo;
|
||||
}
|
||||
|
||||
public void k(Entity entity) {
|
||||
if (entity instanceof EntityLiving) {
|
||||
this.bn = (EntityLiving) entity;
|
||||
} else {
|
||||
this.bn = null;
|
||||
}
|
||||
|
||||
this.bo = this.ticksLived;
|
||||
}
|
||||
|
||||
public int aE() {
|
||||
public int aH() {
|
||||
return this.aV;
|
||||
}
|
||||
|
||||
@ -319,7 +326,7 @@ public abstract class EntityLiving extends Entity {
|
||||
nbttagcompound.setShort("HurtTime", (short) this.hurtTicks);
|
||||
nbttagcompound.setShort("DeathTime", (short) this.deathTicks);
|
||||
nbttagcompound.setShort("AttackTime", (short) this.attackTicks);
|
||||
nbttagcompound.setFloat("AbsorptionAmount", this.bj());
|
||||
nbttagcompound.setFloat("AbsorptionAmount", this.bm());
|
||||
ItemStack[] aitemstack = this.getEquipment();
|
||||
int i = aitemstack.length;
|
||||
|
||||
@ -333,7 +340,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
nbttagcompound.set("Attributes", GenericAttributes.a(this.aT()));
|
||||
nbttagcompound.set("Attributes", GenericAttributes.a(this.aW()));
|
||||
aitemstack = this.getEquipment();
|
||||
i = aitemstack.length;
|
||||
|
||||
@ -361,7 +368,7 @@ public abstract class EntityLiving extends Entity {
|
||||
public void a(NBTTagCompound nbttagcompound) {
|
||||
this.m(nbttagcompound.getFloat("AbsorptionAmount"));
|
||||
if (nbttagcompound.hasKey("Attributes") && this.world != null && !this.world.isStatic) {
|
||||
GenericAttributes.a(this.aT(), nbttagcompound.getList("Attributes"), this.world == null ? null : this.world.getLogger());
|
||||
GenericAttributes.a(this.aW(), nbttagcompound.getList("Attributes"), this.world == null ? null : this.world.getLogger());
|
||||
}
|
||||
|
||||
if (nbttagcompound.hasKey("ActiveEffects")) {
|
||||
@ -379,9 +386,9 @@ public abstract class EntityLiving extends Entity {
|
||||
if (nbttagcompound.hasKey("Bukkit.MaxHealth")) {
|
||||
NBTBase nbtbase = nbttagcompound.get("Bukkit.MaxHealth");
|
||||
if (nbtbase.getTypeId() == 5) {
|
||||
this.a(GenericAttributes.a).a((double) ((NBTTagFloat) nbtbase).data);
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue((double) ((NBTTagFloat) nbtbase).data);
|
||||
} else if (nbtbase.getTypeId() == 3) {
|
||||
this.a(GenericAttributes.a).a((double) ((NBTTagInt) nbtbase).data);
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue((double) ((NBTTagInt) nbtbase).data);
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -405,7 +412,7 @@ public abstract class EntityLiving extends Entity {
|
||||
this.attackTicks = nbttagcompound.getShort("AttackTime");
|
||||
}
|
||||
|
||||
protected void aF() {
|
||||
protected void aI() {
|
||||
Iterator iterator = this.effects.keySet().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@ -415,10 +422,10 @@ public abstract class EntityLiving extends Entity {
|
||||
if (!mobeffect.tick(this)) {
|
||||
if (!this.world.isStatic) {
|
||||
iterator.remove();
|
||||
this.c(mobeffect);
|
||||
this.b(mobeffect);
|
||||
}
|
||||
} else if (mobeffect.getDuration() % 600 == 0) {
|
||||
this.b(mobeffect);
|
||||
this.a(mobeffect, false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -467,7 +474,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
public void aG() {
|
||||
public void aJ() {
|
||||
Iterator iterator = this.effects.keySet().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@ -476,7 +483,7 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
if (!this.world.isStatic) {
|
||||
iterator.remove();
|
||||
this.c(mobeffect);
|
||||
this.b(mobeffect);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -500,10 +507,10 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
|
||||
public void addEffect(MobEffect mobeffect) {
|
||||
if (this.e(mobeffect)) {
|
||||
if (this.d(mobeffect)) {
|
||||
if (this.effects.containsKey(Integer.valueOf(mobeffect.getEffectId()))) {
|
||||
((MobEffect) this.effects.get(Integer.valueOf(mobeffect.getEffectId()))).a(mobeffect);
|
||||
this.b((MobEffect) this.effects.get(Integer.valueOf(mobeffect.getEffectId())));
|
||||
this.a((MobEffect) this.effects.get(Integer.valueOf(mobeffect.getEffectId())), true);
|
||||
} else {
|
||||
this.effects.put(Integer.valueOf(mobeffect.getEffectId()), mobeffect);
|
||||
this.a(mobeffect);
|
||||
@ -511,7 +518,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean e(MobEffect mobeffect) {
|
||||
public boolean d(MobEffect mobeffect) {
|
||||
if (this.getMonsterType() == EnumMonsterType.UNDEAD) {
|
||||
int i = mobeffect.getEffectId();
|
||||
|
||||
@ -523,7 +530,7 @@ public abstract class EntityLiving extends Entity {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean aI() {
|
||||
public boolean aL() {
|
||||
return this.getMonsterType() == EnumMonsterType.UNDEAD;
|
||||
}
|
||||
|
||||
@ -531,32 +538,29 @@ public abstract class EntityLiving extends Entity {
|
||||
MobEffect mobeffect = (MobEffect) this.effects.remove(Integer.valueOf(i));
|
||||
|
||||
if (mobeffect != null) {
|
||||
this.c(mobeffect);
|
||||
this.b(mobeffect);
|
||||
}
|
||||
}
|
||||
|
||||
protected void a(MobEffect mobeffect) {
|
||||
this.updateEffects = true;
|
||||
if (!this.world.isStatic) {
|
||||
MobEffectList.byId[mobeffect.getEffectId()].b(this, this.aT(), mobeffect.getAmplifier());
|
||||
MobEffectList.byId[mobeffect.getEffectId()].b(this, this.aW(), mobeffect.getAmplifier());
|
||||
}
|
||||
}
|
||||
|
||||
protected void a(MobEffect mobeffect, boolean flag) {
|
||||
this.updateEffects = true;
|
||||
if (flag && !this.world.isStatic) {
|
||||
MobEffectList.byId[mobeffect.getEffectId()].a(this, this.aW(), mobeffect.getAmplifier());
|
||||
MobEffectList.byId[mobeffect.getEffectId()].b(this, this.aW(), mobeffect.getAmplifier());
|
||||
}
|
||||
}
|
||||
|
||||
protected void b(MobEffect mobeffect) {
|
||||
this.updateEffects = true;
|
||||
if (!this.world.isStatic) {
|
||||
MobEffectList.byId[mobeffect.getEffectId()].a(this, this.aT(), mobeffect.getAmplifier());
|
||||
}
|
||||
|
||||
if (!this.world.isStatic) {
|
||||
MobEffectList.byId[mobeffect.getEffectId()].b(this, this.aT(), mobeffect.getAmplifier());
|
||||
}
|
||||
}
|
||||
|
||||
protected void c(MobEffect mobeffect) {
|
||||
this.updateEffects = true;
|
||||
if (!this.world.isStatic) {
|
||||
MobEffectList.byId[mobeffect.getEffectId()].a(this, this.aT(), mobeffect.getAmplifier());
|
||||
MobEffectList.byId[mobeffect.getEffectId()].a(this, this.aW(), mobeffect.getAmplifier());
|
||||
}
|
||||
}
|
||||
|
||||
@ -677,12 +681,12 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
if (this.getHealth() <= 0.0F) {
|
||||
if (flag) {
|
||||
this.makeSound(this.aL(), this.aW(), this.aX());
|
||||
this.makeSound(this.aO(), this.aZ(), this.ba());
|
||||
}
|
||||
|
||||
this.die(damagesource);
|
||||
} else if (flag) {
|
||||
this.makeSound(this.aK(), this.aW(), this.aX());
|
||||
this.makeSound(this.aN(), this.aZ(), this.ba());
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -709,7 +713,7 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
public void die(DamageSource damagesource) {
|
||||
Entity entity = damagesource.getEntity();
|
||||
EntityLiving entityliving = this.aO();
|
||||
EntityLiving entityliving = this.aR();
|
||||
|
||||
if (this.bb >= 0 && entityliving != null) {
|
||||
entityliving.b(this, this.bb);
|
||||
@ -748,7 +752,7 @@ public abstract class EntityLiving extends Entity {
|
||||
protected void dropEquipment(boolean flag, int i) {}
|
||||
|
||||
public void a(Entity entity, float f, double d0, double d1) {
|
||||
if (this.random.nextDouble() >= this.a(GenericAttributes.c).e()) {
|
||||
if (this.random.nextDouble() >= this.getAttributeInstance(GenericAttributes.c).getValue()) {
|
||||
this.an = true;
|
||||
float f1 = MathHelper.sqrt(d0 * d0 + d1 * d1);
|
||||
float f2 = 0.4F;
|
||||
@ -765,11 +769,11 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
protected String aK() {
|
||||
protected String aN() {
|
||||
return "damage.hit";
|
||||
}
|
||||
|
||||
protected String aL() {
|
||||
protected String aO() {
|
||||
return "damage.hit";
|
||||
}
|
||||
|
||||
@ -832,7 +836,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
public int aM() {
|
||||
public int aP() {
|
||||
int i = 0;
|
||||
ItemStack[] aitemstack = this.getEquipment();
|
||||
int j = aitemstack.length;
|
||||
@ -854,7 +858,7 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
protected float b(DamageSource damagesource, float f) {
|
||||
if (!damagesource.ignoresArmor()) {
|
||||
int i = 25 - this.aM();
|
||||
int i = 25 - this.aP();
|
||||
float f1 = f * (float) i;
|
||||
|
||||
this.h(f);
|
||||
@ -904,31 +908,31 @@ public abstract class EntityLiving extends Entity {
|
||||
f = this.c(damagesource, f);
|
||||
float f1 = f;
|
||||
|
||||
f = Math.max(f - this.bj(), 0.0F);
|
||||
this.m(this.bj() - (f1 - f));
|
||||
f = Math.max(f - this.bm(), 0.0F);
|
||||
this.m(this.bm() - (f1 - f));
|
||||
if (f != 0.0F) {
|
||||
float f2 = this.getHealth();
|
||||
|
||||
this.setHealth(f2 - f);
|
||||
this.aN().a(damagesource, f2, f);
|
||||
this.m(this.bj() - f);
|
||||
this.aQ().a(damagesource, f2, f);
|
||||
this.m(this.bm() - f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public CombatTracker aN() {
|
||||
public CombatTracker aQ() {
|
||||
return this.combatTracker;
|
||||
}
|
||||
|
||||
public EntityLiving aO() {
|
||||
public EntityLiving aR() {
|
||||
return (EntityLiving) (this.combatTracker.c() != null ? this.combatTracker.c() : (this.killer != null ? this.killer : (this.lastDamager != null ? this.lastDamager : null)));
|
||||
}
|
||||
|
||||
public final float getMaxHealth() {
|
||||
return (float) this.a(GenericAttributes.a).e();
|
||||
return (float) this.getAttributeInstance(GenericAttributes.a).getValue();
|
||||
}
|
||||
|
||||
public final int aQ() {
|
||||
public final int aT() {
|
||||
return this.datawatcher.getByte(9);
|
||||
}
|
||||
|
||||
@ -940,7 +944,7 @@ public abstract class EntityLiving extends Entity {
|
||||
return this.hasEffect(MobEffectList.FASTER_DIG) ? 6 - (1 + this.getEffect(MobEffectList.FASTER_DIG).getAmplifier()) * 1 : (this.hasEffect(MobEffectList.SLOWER_DIG) ? 6 + (1 + this.getEffect(MobEffectList.SLOWER_DIG).getAmplifier()) * 2 : 6);
|
||||
}
|
||||
|
||||
public void aR() {
|
||||
public void aU() {
|
||||
if (!this.au || this.av >= this.h() / 2 || this.av < 0) {
|
||||
this.av = -1;
|
||||
this.au = true;
|
||||
@ -954,7 +958,7 @@ public abstract class EntityLiving extends Entity {
|
||||
this.damageEntity(DamageSource.OUT_OF_WORLD, 4.0F);
|
||||
}
|
||||
|
||||
protected void aS() {
|
||||
protected void aV() {
|
||||
int i = this.h();
|
||||
|
||||
if (this.au) {
|
||||
@ -970,17 +974,13 @@ public abstract class EntityLiving extends Entity {
|
||||
this.aE = (float) this.av / (float) i;
|
||||
}
|
||||
|
||||
public AttributeInstance a(IAttribute iattribute) {
|
||||
return this.aT().a(iattribute);
|
||||
public AttributeInstance getAttributeInstance(IAttribute iattribute) {
|
||||
return this.aW().a(iattribute);
|
||||
}
|
||||
|
||||
public AttributeMapBase aT() {
|
||||
public AttributeMapBase aW() {
|
||||
if (this.d == null) {
|
||||
if (this.world != null && !this.world.isStatic) {
|
||||
this.d = new AttributeMapServer();
|
||||
} else {
|
||||
this.d = new AttributeMapClient();
|
||||
}
|
||||
this.d = new AttributeMapServer();
|
||||
}
|
||||
|
||||
return this.d;
|
||||
@ -990,7 +990,7 @@ public abstract class EntityLiving extends Entity {
|
||||
return EnumMonsterType.UNDEFINED;
|
||||
}
|
||||
|
||||
public abstract ItemStack aV();
|
||||
public abstract ItemStack aY();
|
||||
|
||||
public abstract ItemStack getEquipment(int i);
|
||||
|
||||
@ -998,27 +998,28 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
public void setSprinting(boolean flag) {
|
||||
super.setSprinting(flag);
|
||||
if (!this.world.isStatic) {
|
||||
AttributeInstance attributeinstance = this.a(GenericAttributes.d);
|
||||
AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.d);
|
||||
|
||||
if (attributeinstance.a(b) != null) {
|
||||
attributeinstance.b(c);
|
||||
if (flag) {
|
||||
attributeinstance.a(c);
|
||||
}
|
||||
}
|
||||
|
||||
if (flag) {
|
||||
attributeinstance.a(c);
|
||||
}
|
||||
}
|
||||
|
||||
public abstract ItemStack[] getEquipment();
|
||||
|
||||
protected float aW() {
|
||||
protected float aZ() {
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
protected float aX() {
|
||||
protected float ba() {
|
||||
return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F;
|
||||
}
|
||||
|
||||
protected boolean aY() {
|
||||
protected boolean bb() {
|
||||
return this.getHealth() <= 0.0F;
|
||||
}
|
||||
|
||||
@ -1057,7 +1058,7 @@ public abstract class EntityLiving extends Entity {
|
||||
this.enderTeleportTo(d0, d1, d2);
|
||||
}
|
||||
|
||||
protected void ba() {
|
||||
protected void bd() {
|
||||
this.motY = 0.41999998688697815D;
|
||||
if (this.hasEffect(MobEffectList.JUMP)) {
|
||||
this.motY += (double) ((float) (this.getEffect(MobEffectList.JUMP).getAmplifier() + 1) * 0.1F);
|
||||
@ -1078,7 +1079,7 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
if (this.G() && (!(this instanceof EntityHuman) || !((EntityHuman) this).abilities.isFlying)) {
|
||||
d0 = this.locY;
|
||||
this.a(f, f1, this.bb() ? 0.04F : 0.02F);
|
||||
this.a(f, f1, this.be() ? 0.04F : 0.02F);
|
||||
this.move(this.motX, this.motY, this.motZ);
|
||||
this.motX *= 0.800000011920929D;
|
||||
this.motY *= 0.800000011920929D;
|
||||
@ -1114,7 +1115,7 @@ public abstract class EntityLiving extends Entity {
|
||||
float f4;
|
||||
|
||||
if (this.onGround) {
|
||||
f4 = this.bc() * f3;
|
||||
f4 = this.bf() * f3;
|
||||
} else {
|
||||
f4 = this.aR;
|
||||
}
|
||||
@ -1194,16 +1195,16 @@ public abstract class EntityLiving extends Entity {
|
||||
this.aH += this.aG;
|
||||
}
|
||||
|
||||
protected boolean bb() {
|
||||
protected boolean be() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public float bc() {
|
||||
return this.bb() ? this.bo : 0.1F;
|
||||
public float bf() {
|
||||
return this.be() ? this.bp : 0.1F;
|
||||
}
|
||||
|
||||
public void i(float f) {
|
||||
this.bo = f;
|
||||
this.bp = f;
|
||||
}
|
||||
|
||||
public boolean m(Entity entity) {
|
||||
@ -1218,7 +1219,7 @@ public abstract class EntityLiving extends Entity {
|
||||
public void l_() {
|
||||
super.l_();
|
||||
if (!this.world.isStatic) {
|
||||
int i = this.aQ();
|
||||
int i = this.aT();
|
||||
|
||||
if (i > 0) {
|
||||
if (this.aw <= 0) {
|
||||
@ -1345,8 +1346,8 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
|
||||
public void c() {
|
||||
if (this.bp > 0) {
|
||||
--this.bp;
|
||||
if (this.bq > 0) {
|
||||
--this.bq;
|
||||
}
|
||||
|
||||
if (this.bh > 0) {
|
||||
@ -1360,7 +1361,7 @@ public abstract class EntityLiving extends Entity {
|
||||
--this.bh;
|
||||
this.setPosition(d0, d1, d2);
|
||||
this.b(this.yaw, this.pitch);
|
||||
} else if (!this.bi()) {
|
||||
} else if (!this.bl()) {
|
||||
this.motX *= 0.98D;
|
||||
this.motY *= 0.98D;
|
||||
this.motZ *= 0.98D;
|
||||
@ -1379,19 +1380,19 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
|
||||
this.world.methodProfiler.a("ai");
|
||||
if (this.aY()) {
|
||||
if (this.bb()) {
|
||||
this.bd = false;
|
||||
this.be = 0.0F;
|
||||
this.bf = 0.0F;
|
||||
this.bg = 0.0F;
|
||||
} else if (this.bi()) {
|
||||
if (this.bb()) {
|
||||
} else if (this.bl()) {
|
||||
if (this.be()) {
|
||||
this.world.methodProfiler.a("newAi");
|
||||
this.be();
|
||||
this.bh();
|
||||
this.world.methodProfiler.b();
|
||||
} else {
|
||||
this.world.methodProfiler.a("oldAi");
|
||||
this.bh();
|
||||
this.bk();
|
||||
this.world.methodProfiler.b();
|
||||
this.aP = this.yaw;
|
||||
}
|
||||
@ -1401,15 +1402,15 @@ public abstract class EntityLiving extends Entity {
|
||||
this.world.methodProfiler.a("jump");
|
||||
if (this.bd) {
|
||||
if (!this.G() && !this.I()) {
|
||||
if (this.onGround && this.bp == 0) {
|
||||
this.ba();
|
||||
this.bp = 10;
|
||||
if (this.onGround && this.bq == 0) {
|
||||
this.bd();
|
||||
this.bq = 10;
|
||||
}
|
||||
} else {
|
||||
this.motY += 0.03999999910593033D;
|
||||
}
|
||||
} else {
|
||||
this.bp = 0;
|
||||
this.bq = 0;
|
||||
}
|
||||
|
||||
this.world.methodProfiler.b();
|
||||
@ -1421,15 +1422,15 @@ public abstract class EntityLiving extends Entity {
|
||||
this.world.methodProfiler.b();
|
||||
this.world.methodProfiler.a("push");
|
||||
if (!this.world.isStatic) {
|
||||
this.bf();
|
||||
this.bi();
|
||||
}
|
||||
|
||||
this.world.methodProfiler.b();
|
||||
}
|
||||
|
||||
protected void be() {}
|
||||
protected void bh() {}
|
||||
|
||||
protected void bf() {
|
||||
protected void bi() {
|
||||
List list = this.world.getEntities(this, this.boundingBox.grow(0.20000000298023224D, 0.0D, 0.20000000298023224D));
|
||||
|
||||
if (list != null && !list.isEmpty()) {
|
||||
@ -1454,16 +1455,16 @@ public abstract class EntityLiving extends Entity {
|
||||
entity.collide(this);
|
||||
}
|
||||
|
||||
public void T() {
|
||||
super.T();
|
||||
public void U() {
|
||||
super.U();
|
||||
this.aW = this.aX;
|
||||
this.aX = 0.0F;
|
||||
this.fallDistance = 0.0F;
|
||||
}
|
||||
|
||||
protected void bg() {}
|
||||
protected void bj() {}
|
||||
|
||||
protected void bh() {
|
||||
protected void bk() {
|
||||
++this.aV;
|
||||
}
|
||||
|
||||
@ -1493,7 +1494,7 @@ public abstract class EntityLiving extends Entity {
|
||||
return this.world.a(this.world.getVec3DPool().create(this.locX, this.locY + (double) this.getHeadHeight(), this.locZ), this.world.getVec3DPool().create(entity.locX, entity.locY + (double) entity.getHeadHeight(), entity.locZ)) == null;
|
||||
}
|
||||
|
||||
public Vec3D Y() {
|
||||
public Vec3D Z() {
|
||||
return this.j(1.0F);
|
||||
}
|
||||
|
||||
@ -1521,7 +1522,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean bi() {
|
||||
public boolean bl() {
|
||||
return !this.world.isStatic;
|
||||
}
|
||||
|
||||
@ -1538,15 +1539,15 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
|
||||
protected void J() {
|
||||
this.velocityChanged = this.random.nextDouble() >= this.a(GenericAttributes.c).e();
|
||||
this.velocityChanged = this.random.nextDouble() >= this.getAttributeInstance(GenericAttributes.c).getValue();
|
||||
}
|
||||
|
||||
public float getHeadRotation() {
|
||||
return this.aP;
|
||||
}
|
||||
|
||||
public float bj() {
|
||||
return this.bq;
|
||||
public float bm() {
|
||||
return this.br;
|
||||
}
|
||||
|
||||
public void m(float f) {
|
||||
@ -1554,6 +1555,18 @@ public abstract class EntityLiving extends Entity {
|
||||
f = 0.0F;
|
||||
}
|
||||
|
||||
this.bq = f;
|
||||
this.br = f;
|
||||
}
|
||||
|
||||
public ScoreboardTeamBase getScoreboardTeam() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean c(EntityLiving entityliving) {
|
||||
return this.a(entityliving.getScoreboardTeam());
|
||||
}
|
||||
|
||||
public boolean a(ScoreboardTeamBase scoreboardteambase) {
|
||||
return this.getScoreboardTeam() != null ? this.getScoreboardTeam().isAlly(scoreboardteambase) : false;
|
||||
}
|
||||
}
|
||||
|
@ -7,16 +7,16 @@ public class EntityMagmaCube extends EntitySlime {
|
||||
this.fireProof = true;
|
||||
}
|
||||
|
||||
protected void ax() {
|
||||
super.ax();
|
||||
this.a(GenericAttributes.d).a(0.20000000298023224D);
|
||||
protected void ay() {
|
||||
super.ay();
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.20000000298023224D);
|
||||
}
|
||||
|
||||
public boolean canSpawn() {
|
||||
return this.world.difficulty > 0 && this.world.b(this.boundingBox) && this.world.getCubes(this, this.boundingBox).isEmpty() && !this.world.containsLiquid(this.boundingBox);
|
||||
}
|
||||
|
||||
public int aM() {
|
||||
public int aP() {
|
||||
return this.getSize() * 3;
|
||||
}
|
||||
|
||||
@ -24,11 +24,11 @@ public class EntityMagmaCube extends EntitySlime {
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
protected String bF() {
|
||||
protected String bJ() {
|
||||
return "flame";
|
||||
}
|
||||
|
||||
protected EntitySlime bG() {
|
||||
protected EntitySlime bK() {
|
||||
return new EntityMagmaCube(this.world);
|
||||
}
|
||||
|
||||
@ -61,38 +61,38 @@ public class EntityMagmaCube extends EntitySlime {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected int bH() {
|
||||
return super.bH() * 4;
|
||||
protected int bL() {
|
||||
return super.bL() * 4;
|
||||
}
|
||||
|
||||
protected void bI() {
|
||||
protected void bM() {
|
||||
this.h *= 0.9F;
|
||||
}
|
||||
|
||||
protected void ba() {
|
||||
protected void bd() {
|
||||
this.motY = (double) (0.42F + (float) this.getSize() * 0.1F);
|
||||
this.an = true;
|
||||
}
|
||||
|
||||
protected void b(float f) {}
|
||||
|
||||
protected boolean bJ() {
|
||||
protected boolean bN() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected int bK() {
|
||||
return super.bK() + 2;
|
||||
protected int bO() {
|
||||
return super.bO() + 2;
|
||||
}
|
||||
|
||||
protected String aK() {
|
||||
protected String aN() {
|
||||
return "mob.slime." + (this.getSize() > 1 ? "big" : "small");
|
||||
}
|
||||
|
||||
protected String aL() {
|
||||
protected String aO() {
|
||||
return "mob.slime." + (this.getSize() > 1 ? "big" : "small");
|
||||
}
|
||||
|
||||
protected String bL() {
|
||||
protected String bP() {
|
||||
return this.getSize() > 1 ? "mob.magmacube.big" : "mob.magmacube.small";
|
||||
}
|
||||
|
||||
@ -100,7 +100,7 @@ public class EntityMagmaCube extends EntitySlime {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected boolean bM() {
|
||||
protected boolean bQ() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ public abstract class EntityMinecartAbstract extends Entity {
|
||||
this.world.getServer().getPluginManager().callEvent(new org.bukkit.event.vehicle.VehicleCreateEvent((Vehicle) this.getBukkitEntity())); // CraftBukkit
|
||||
}
|
||||
|
||||
public double W() {
|
||||
public double X() {
|
||||
return (double) this.length * 0.0D - 0.30000001192092896D;
|
||||
}
|
||||
|
||||
@ -219,7 +219,7 @@ public abstract class EntityMinecartAbstract extends Entity {
|
||||
if (true || minecraftserver.getAllowNether()) { // CraftBukkit - multi-world should still allow teleport even if default vanilla nether disabled
|
||||
if (this.vehicle == null && this.aq++ >= i) {
|
||||
this.aq = i;
|
||||
this.portalCooldown = this.aa();
|
||||
this.portalCooldown = this.ab();
|
||||
byte b0;
|
||||
|
||||
if (this.world.worldProvider.dimension == -1) {
|
||||
|
@ -10,7 +10,7 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
|
||||
}
|
||||
|
||||
public void c() {
|
||||
this.aS();
|
||||
this.aV();
|
||||
float f = this.d(1.0F);
|
||||
|
||||
if (f > 0.5F) {
|
||||
@ -68,7 +68,7 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
|
||||
}
|
||||
|
||||
public boolean m(Entity entity) {
|
||||
float f = (float) this.a(GenericAttributes.e).e();
|
||||
float f = (float) this.getAttributeInstance(GenericAttributes.e).getValue();
|
||||
int i = 0;
|
||||
|
||||
if (entity instanceof EntityLiving) {
|
||||
@ -136,8 +136,8 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
|
||||
return this.world.difficulty > 0 && this.i_() && super.canSpawn();
|
||||
}
|
||||
|
||||
protected void ax() {
|
||||
super.ax();
|
||||
this.aT().b(GenericAttributes.e);
|
||||
protected void ay() {
|
||||
super.ay();
|
||||
this.aW().b(GenericAttributes.e);
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ public class EntityOcelot extends EntityTameableAnimal {
|
||||
this.datawatcher.a(18, Byte.valueOf((byte) 0));
|
||||
}
|
||||
|
||||
public void bg() {
|
||||
public void bj() {
|
||||
if (this.getControllerMove().a()) {
|
||||
double d0 = this.getControllerMove().b();
|
||||
|
||||
@ -51,14 +51,14 @@ public class EntityOcelot extends EntityTameableAnimal {
|
||||
return !this.isTamed() && this.ticksLived > 2400;
|
||||
}
|
||||
|
||||
public boolean bb() {
|
||||
public boolean be() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void ax() {
|
||||
super.ax();
|
||||
this.a(GenericAttributes.a).a(10.0D);
|
||||
this.a(GenericAttributes.d).a(0.30000001192092896D);
|
||||
protected void ay() {
|
||||
super.ay();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(10.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.30000001192092896D);
|
||||
}
|
||||
|
||||
protected void b(float f) {}
|
||||
@ -74,18 +74,18 @@ public class EntityOcelot extends EntityTameableAnimal {
|
||||
}
|
||||
|
||||
protected String r() {
|
||||
return this.isTamed() ? (this.bU() ? "mob.cat.purr" : (this.random.nextInt(4) == 0 ? "mob.cat.purreow" : "mob.cat.meow")) : "";
|
||||
return this.isTamed() ? (this.bY() ? "mob.cat.purr" : (this.random.nextInt(4) == 0 ? "mob.cat.purreow" : "mob.cat.meow")) : "";
|
||||
}
|
||||
|
||||
protected String aK() {
|
||||
protected String aN() {
|
||||
return "mob.cat.hitt";
|
||||
}
|
||||
|
||||
protected String aL() {
|
||||
protected String aO() {
|
||||
return "mob.cat.hitt";
|
||||
}
|
||||
|
||||
protected float aW() {
|
||||
protected float aZ() {
|
||||
return 0.4F;
|
||||
}
|
||||
|
||||
@ -132,11 +132,11 @@ public class EntityOcelot extends EntityTameableAnimal {
|
||||
this.setTamed(true);
|
||||
this.setCatType(1 + this.world.random.nextInt(3));
|
||||
this.setOwnerName(entityhuman.getName());
|
||||
this.j(true);
|
||||
this.i(true);
|
||||
this.bp.setSitting(true);
|
||||
this.world.broadcastEntityEffect(this, (byte) 7);
|
||||
} else {
|
||||
this.j(false);
|
||||
this.i(false);
|
||||
this.world.broadcastEntityEffect(this, (byte) 6);
|
||||
}
|
||||
}
|
||||
@ -173,7 +173,7 @@ public class EntityOcelot extends EntityTameableAnimal {
|
||||
} else {
|
||||
EntityOcelot entityocelot = (EntityOcelot) entityanimal;
|
||||
|
||||
return !entityocelot.isTamed() ? false : this.bU() && entityocelot.bU();
|
||||
return !entityocelot.isTamed() ? false : this.bY() && entityocelot.bY();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,22 +22,22 @@ public class EntityPig extends EntityAnimal {
|
||||
this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this));
|
||||
}
|
||||
|
||||
public boolean bb() {
|
||||
public boolean be() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void ax() {
|
||||
super.ax();
|
||||
this.a(GenericAttributes.a).a(10.0D);
|
||||
this.a(GenericAttributes.d).a(0.25D);
|
||||
protected void ay() {
|
||||
super.ay();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(10.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.25D);
|
||||
}
|
||||
|
||||
protected void be() {
|
||||
super.be();
|
||||
protected void bh() {
|
||||
super.bh();
|
||||
}
|
||||
|
||||
public boolean bu() {
|
||||
ItemStack itemstack = ((EntityHuman) this.passenger).aV();
|
||||
public boolean by() {
|
||||
ItemStack itemstack = ((EntityHuman) this.passenger).aY();
|
||||
|
||||
return itemstack != null && itemstack.id == Item.CARROT_STICK.id;
|
||||
}
|
||||
@ -61,11 +61,11 @@ public class EntityPig extends EntityAnimal {
|
||||
return "mob.pig.say";
|
||||
}
|
||||
|
||||
protected String aK() {
|
||||
protected String aN() {
|
||||
return "mob.pig.say";
|
||||
}
|
||||
|
||||
protected String aL() {
|
||||
protected String aO() {
|
||||
return "mob.pig.death";
|
||||
}
|
||||
|
||||
@ -153,7 +153,7 @@ public class EntityPig extends EntityAnimal {
|
||||
return itemstack != null && itemstack.id == Item.CARROT.id;
|
||||
}
|
||||
|
||||
public PathfinderGoalPassengerCarrotStick bQ() {
|
||||
public PathfinderGoalPassengerCarrotStick bU() {
|
||||
return this.bp;
|
||||
}
|
||||
|
||||
|
@ -21,20 +21,20 @@ public class EntityPigZombie extends EntityZombie {
|
||||
this.fireProof = true;
|
||||
}
|
||||
|
||||
protected void ax() {
|
||||
super.ax();
|
||||
this.a(bp).a(0.0D);
|
||||
this.a(GenericAttributes.d).a(0.5D);
|
||||
this.a(GenericAttributes.e).a(5.0D);
|
||||
protected void ay() {
|
||||
super.ay();
|
||||
this.getAttributeInstance(bp).setValue(0.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.5D);
|
||||
this.getAttributeInstance(GenericAttributes.e).setValue(5.0D);
|
||||
}
|
||||
|
||||
protected boolean bb() {
|
||||
protected boolean be() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void l_() {
|
||||
if (this.bu != this.target && !this.world.isStatic) {
|
||||
AttributeInstance attributeinstance = this.a(GenericAttributes.d);
|
||||
AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.d);
|
||||
|
||||
attributeinstance.b(br);
|
||||
if (this.target != null) {
|
||||
@ -44,7 +44,7 @@ public class EntityPigZombie extends EntityZombie {
|
||||
|
||||
this.bu = this.target;
|
||||
if (this.soundDelay > 0 && --this.soundDelay == 0) {
|
||||
this.makeSound("mob.zombiepig.zpigangry", this.aW() * 2.0F, ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 1.8F);
|
||||
this.makeSound("mob.zombiepig.zpigangry", this.aZ() * 2.0F, ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 1.8F);
|
||||
}
|
||||
|
||||
super.l_();
|
||||
@ -121,11 +121,11 @@ public class EntityPigZombie extends EntityZombie {
|
||||
return "mob.zombiepig.zpig";
|
||||
}
|
||||
|
||||
protected String aK() {
|
||||
protected String aN() {
|
||||
return "mob.zombiepig.zpighurt";
|
||||
}
|
||||
|
||||
protected String aL() {
|
||||
protected String aO() {
|
||||
return "mob.zombiepig.zpigdeath";
|
||||
}
|
||||
|
||||
@ -174,7 +174,7 @@ public class EntityPigZombie extends EntityZombie {
|
||||
return Item.ROTTEN_FLESH.id;
|
||||
}
|
||||
|
||||
protected void bs() {
|
||||
protected void bw() {
|
||||
this.setEquipment(0, new ItemStack(Item.GOLD_SWORD));
|
||||
}
|
||||
|
||||
|
@ -240,8 +240,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
this.bR = this.foodData.e() == 0.0F;
|
||||
}
|
||||
|
||||
if (this.getHealth() + this.bj() != this.bO) {
|
||||
this.bO = this.getHealth() + this.bj();
|
||||
if (this.getHealth() + this.bm() != this.bO) {
|
||||
this.bO = this.getHealth() + this.bm();
|
||||
// CraftBukkit - Update ALL the scores!
|
||||
this.world.getServer().getScoreboardManager().updateAllScoresForList(IScoreboardCriteria.f, this.getLocalizedName(), com.google.common.collect.ImmutableList.of(this));
|
||||
}
|
||||
@ -293,7 +293,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
}
|
||||
}
|
||||
|
||||
ChatMessage chatmessage = this.aN().b();
|
||||
ChatMessage chatmessage = this.aQ().b();
|
||||
|
||||
String deathmessage = chatmessage.toString();
|
||||
org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, deathmessage);
|
||||
@ -332,7 +332,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
scoreboardscore.incrementScore();
|
||||
}
|
||||
|
||||
EntityLiving entityliving = this.aO();
|
||||
EntityLiving entityliving = this.aR();
|
||||
|
||||
if (entityliving != null) {
|
||||
entityliving.b(this, this.bb);
|
||||
@ -475,6 +475,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
super.a(d0, flag);
|
||||
}
|
||||
|
||||
public void a(TileEntity tileentity) {
|
||||
if (tileentity instanceof TileEntitySign) {
|
||||
((TileEntitySign) tileentity).a((EntityHuman) this);
|
||||
this.playerConnection.sendPacket(new Packet133OpenTileEntity(0, tileentity.x, tileentity.y, tileentity.z));
|
||||
}
|
||||
}
|
||||
|
||||
public int nextContainerCounter() { // CraftBukkit - private void -> public int
|
||||
this.containerCounter = this.containerCounter % 100 + 1;
|
||||
return this.containerCounter; // CraftBukkit
|
||||
@ -770,13 +777,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
this.playerConnection.sendPacket(new Packet41MobEffect(this.id, mobeffect));
|
||||
}
|
||||
|
||||
protected void b(MobEffect mobeffect) {
|
||||
super.b(mobeffect);
|
||||
protected void a(MobEffect mobeffect, boolean flag) {
|
||||
super.a(mobeffect, flag);
|
||||
this.playerConnection.sendPacket(new Packet41MobEffect(this.id, mobeffect));
|
||||
}
|
||||
|
||||
protected void c(MobEffect mobeffect) {
|
||||
super.c(mobeffect);
|
||||
protected void b(MobEffect mobeffect) {
|
||||
super.b(mobeffect);
|
||||
this.playerConnection.sendPacket(new Packet42RemoveMobEffect(this.id, mobeffect));
|
||||
}
|
||||
|
||||
|
@ -151,7 +151,7 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
|
||||
|
||||
if (movingobjectposition != null) {
|
||||
if (movingobjectposition.type == EnumMovingObjectType.TILE && this.world.getTypeId(movingobjectposition.b, movingobjectposition.c, movingobjectposition.d) == Block.PORTAL.id) {
|
||||
this.Z();
|
||||
this.aa();
|
||||
} else {
|
||||
this.a(movingobjectposition);
|
||||
// CraftBukkit start
|
||||
|
@ -32,13 +32,13 @@ public class EntitySheep extends EntityAnimal {
|
||||
this.bq.resultInventory = new InventoryCraftResult(); // CraftBukkit - add result slot for event
|
||||
}
|
||||
|
||||
protected boolean bb() {
|
||||
protected boolean be() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void be() {
|
||||
protected void bh() {
|
||||
this.br = this.bs.f();
|
||||
super.be();
|
||||
super.bh();
|
||||
}
|
||||
|
||||
public void c() {
|
||||
@ -49,10 +49,10 @@ public class EntitySheep extends EntityAnimal {
|
||||
super.c();
|
||||
}
|
||||
|
||||
protected void ax() {
|
||||
super.ax();
|
||||
this.a(GenericAttributes.a).a(8.0D);
|
||||
this.a(GenericAttributes.d).a(0.23000000417232513D);
|
||||
protected void ay() {
|
||||
super.ay();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(8.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.23000000417232513D);
|
||||
}
|
||||
|
||||
protected void a() {
|
||||
@ -125,11 +125,11 @@ public class EntitySheep extends EntityAnimal {
|
||||
return "mob.sheep.say";
|
||||
}
|
||||
|
||||
protected String aK() {
|
||||
protected String aN() {
|
||||
return "mob.sheep.say";
|
||||
}
|
||||
|
||||
protected String aL() {
|
||||
protected String aO() {
|
||||
return "mob.sheep.say";
|
||||
}
|
||||
|
||||
|
@ -11,11 +11,11 @@ public class EntitySilverfish extends EntityMonster {
|
||||
this.a(0.3F, 0.7F);
|
||||
}
|
||||
|
||||
protected void ax() {
|
||||
super.ax();
|
||||
this.a(GenericAttributes.a).a(8.0D);
|
||||
this.a(GenericAttributes.d).a(0.6000000238418579D);
|
||||
this.a(GenericAttributes.e).a(1.0D);
|
||||
protected void ay() {
|
||||
super.ay();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(8.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.6000000238418579D);
|
||||
this.getAttributeInstance(GenericAttributes.e).setValue(1.0D);
|
||||
}
|
||||
|
||||
protected boolean e_() {
|
||||
@ -32,11 +32,11 @@ public class EntitySilverfish extends EntityMonster {
|
||||
return "mob.silverfish.say";
|
||||
}
|
||||
|
||||
protected String aK() {
|
||||
protected String aN() {
|
||||
return "mob.silverfish.hit";
|
||||
}
|
||||
|
||||
protected String aL() {
|
||||
protected String aO() {
|
||||
return "mob.silverfish.kill";
|
||||
}
|
||||
|
||||
@ -72,8 +72,8 @@ public class EntitySilverfish extends EntityMonster {
|
||||
super.l_();
|
||||
}
|
||||
|
||||
protected void bh() {
|
||||
super.bh();
|
||||
protected void bk() {
|
||||
super.bk();
|
||||
if (!this.world.isStatic) {
|
||||
int i;
|
||||
int j;
|
||||
@ -129,7 +129,7 @@ public class EntitySilverfish extends EntityMonster {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.target == null && !this.bI()) {
|
||||
if (this.target == null && !this.bM()) {
|
||||
i = MathHelper.floor(this.locX);
|
||||
j = MathHelper.floor(this.locY + 0.5D);
|
||||
k = MathHelper.floor(this.locZ);
|
||||
@ -147,9 +147,9 @@ public class EntitySilverfish extends EntityMonster {
|
||||
this.q();
|
||||
this.die();
|
||||
} else {
|
||||
this.bG();
|
||||
this.bK();
|
||||
}
|
||||
} else if (this.target != null && !this.bI()) {
|
||||
} else if (this.target != null && !this.bM()) {
|
||||
this.target = null;
|
||||
}
|
||||
}
|
||||
|
@ -20,13 +20,13 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
|
||||
this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, false));
|
||||
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityHuman.class, 0, true));
|
||||
if (world != null && !world.isStatic) {
|
||||
this.bP();
|
||||
this.bT();
|
||||
}
|
||||
}
|
||||
|
||||
protected void ax() {
|
||||
super.ax();
|
||||
this.a(GenericAttributes.d).a(0.25D);
|
||||
protected void ay() {
|
||||
super.ay();
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.25D);
|
||||
}
|
||||
|
||||
protected void a() {
|
||||
@ -34,7 +34,7 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
|
||||
this.datawatcher.a(13, new Byte((byte) 0));
|
||||
}
|
||||
|
||||
public boolean bb() {
|
||||
public boolean be() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -42,11 +42,11 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
|
||||
return "mob.skeleton.say";
|
||||
}
|
||||
|
||||
protected String aK() {
|
||||
protected String aN() {
|
||||
return "mob.skeleton.hurt";
|
||||
}
|
||||
|
||||
protected String aL() {
|
||||
protected String aO() {
|
||||
return "mob.skeleton.death";
|
||||
}
|
||||
|
||||
@ -110,8 +110,8 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
|
||||
super.c();
|
||||
}
|
||||
|
||||
public void T() {
|
||||
super.T();
|
||||
public void U() {
|
||||
super.U();
|
||||
if (this.vehicle instanceof EntityCreature) {
|
||||
EntityCreature entitycreature = (EntityCreature) this.vehicle;
|
||||
|
||||
@ -182,22 +182,22 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
|
||||
return null; // CraftBukkit
|
||||
}
|
||||
|
||||
protected void bs() {
|
||||
super.bs();
|
||||
protected void bw() {
|
||||
super.bw();
|
||||
this.setEquipment(0, new ItemStack(Item.BOW));
|
||||
}
|
||||
|
||||
public GroupDataEntity a(GroupDataEntity groupdataentity) {
|
||||
groupdataentity = super.a(groupdataentity);
|
||||
if (this.world.worldProvider instanceof WorldProviderHell && this.aB().nextInt(5) > 0) {
|
||||
if (this.world.worldProvider instanceof WorldProviderHell && this.aC().nextInt(5) > 0) {
|
||||
this.goalSelector.a(4, this.bq);
|
||||
this.setSkeletonType(1);
|
||||
this.setEquipment(0, new ItemStack(Item.STONE_SWORD));
|
||||
this.a(GenericAttributes.e).a(4.0D);
|
||||
this.getAttributeInstance(GenericAttributes.e).setValue(4.0D);
|
||||
} else {
|
||||
this.goalSelector.a(4, this.bp);
|
||||
this.bs();
|
||||
this.bt();
|
||||
this.bw();
|
||||
this.bx();
|
||||
}
|
||||
|
||||
this.h(this.random.nextFloat() < 0.55F * this.world.b(this.locX, this.locY, this.locZ));
|
||||
@ -213,10 +213,10 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
|
||||
return groupdataentity;
|
||||
}
|
||||
|
||||
public void bP() {
|
||||
public void bT() {
|
||||
this.goalSelector.a((PathfinderGoal) this.bq);
|
||||
this.goalSelector.a((PathfinderGoal) this.bp);
|
||||
ItemStack itemstack = this.aV();
|
||||
ItemStack itemstack = this.aY();
|
||||
|
||||
if (itemstack != null && itemstack.id == Item.BOW.id) {
|
||||
this.goalSelector.a(4, this.bp);
|
||||
@ -227,8 +227,8 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
|
||||
|
||||
public void a(EntityLiving entityliving, float f) {
|
||||
EntityArrow entityarrow = new EntityArrow(this.world, this, entityliving, 1.6F, (float) (14 - this.world.difficulty * 4));
|
||||
int i = EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_DAMAGE.id, this.aV());
|
||||
int j = EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_KNOCKBACK.id, this.aV());
|
||||
int i = EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_DAMAGE.id, this.aY());
|
||||
int j = EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_KNOCKBACK.id, this.aY());
|
||||
|
||||
entityarrow.b((double) (f * 2.0F) + this.random.nextGaussian() * 0.25D + (double) ((float) this.world.difficulty * 0.11F));
|
||||
if (i > 0) {
|
||||
@ -239,11 +239,11 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
|
||||
entityarrow.a(j);
|
||||
}
|
||||
|
||||
if (EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_FIRE.id, this.aV()) > 0 || this.getSkeletonType() == 1) {
|
||||
if (EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_FIRE.id, this.aY()) > 0 || this.getSkeletonType() == 1) {
|
||||
entityarrow.setOnFire(100);
|
||||
}
|
||||
|
||||
this.makeSound("random.bow", 1.0F, 1.0F / (this.aB().nextFloat() * 0.4F + 0.8F));
|
||||
this.makeSound("random.bow", 1.0F, 1.0F / (this.aC().nextFloat() * 0.4F + 0.8F));
|
||||
this.world.addEntity(entityarrow);
|
||||
}
|
||||
|
||||
@ -269,7 +269,7 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
|
||||
this.setSkeletonType(b0);
|
||||
}
|
||||
|
||||
this.bP();
|
||||
this.bT();
|
||||
}
|
||||
|
||||
public void b(NBTTagCompound nbttagcompound) {
|
||||
@ -280,11 +280,11 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
|
||||
public void setEquipment(int i, ItemStack itemstack) {
|
||||
super.setEquipment(i, itemstack);
|
||||
if (!this.world.isStatic && i == 0) {
|
||||
this.bP();
|
||||
this.bT();
|
||||
}
|
||||
}
|
||||
|
||||
public double V() {
|
||||
return super.V() - 0.5D;
|
||||
public double W() {
|
||||
return super.W() - 0.5D;
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
this.datawatcher.watch(16, new Byte((byte) i));
|
||||
this.a(0.6F * (float) i, 0.6F * (float) i);
|
||||
this.setPosition(this.locX, this.locY, this.locZ);
|
||||
this.a(GenericAttributes.a).a((double) (i * i));
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue((double) (i * i));
|
||||
this.setHealth(this.getMaxHealth());
|
||||
this.b = i;
|
||||
}
|
||||
@ -53,11 +53,11 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
this.setSize(nbttagcompound.getInt("Size") + 1);
|
||||
}
|
||||
|
||||
protected String bF() {
|
||||
protected String bJ() {
|
||||
return "slime";
|
||||
}
|
||||
|
||||
protected String bL() {
|
||||
protected String bP() {
|
||||
return "mob.slime." + (this.getSize() > 1 ? "big" : "small");
|
||||
}
|
||||
|
||||
@ -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.bF(), this.locX + (double) f2, this.boundingBox.b, this.locZ + (double) f3, 0.0D, 0.0D, 0.0D);
|
||||
this.world.addParticle(this.bJ(), this.locX + (double) f2, this.boundingBox.b, this.locZ + (double) f3, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
|
||||
if (this.bM()) {
|
||||
this.makeSound(this.bL(), this.aW(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) / 0.8F);
|
||||
if (this.bQ()) {
|
||||
this.makeSound(this.bP(), this.aZ(), ((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.bI();
|
||||
this.bM();
|
||||
if (this.world.isStatic) {
|
||||
i = this.getSize();
|
||||
this.a(0.6F * (float) i, 0.6F * (float) i);
|
||||
}
|
||||
}
|
||||
|
||||
protected void bh() {
|
||||
this.bk();
|
||||
protected void bk() {
|
||||
this.bo();
|
||||
// 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.bH();
|
||||
this.jumpDelay = this.bL();
|
||||
if (entityhuman != null) {
|
||||
this.jumpDelay /= 3;
|
||||
}
|
||||
|
||||
this.bd = true;
|
||||
if (this.bO()) {
|
||||
this.makeSound(this.bL(), this.aW(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 0.8F);
|
||||
if (this.bS()) {
|
||||
this.makeSound(this.bP(), this.aZ(), ((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 bI() {
|
||||
protected void bM() {
|
||||
this.h *= 0.6F;
|
||||
}
|
||||
|
||||
protected int bH() {
|
||||
protected int bL() {
|
||||
return this.random.nextInt(20) + 10;
|
||||
}
|
||||
|
||||
protected EntitySlime bG() {
|
||||
protected EntitySlime bK() {
|
||||
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.bG();
|
||||
EntitySlime entityslime = this.bK();
|
||||
|
||||
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,28 +190,28 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
}
|
||||
|
||||
public void b_(EntityHuman entityhuman) {
|
||||
if (this.bJ()) {
|
||||
if (this.bN()) {
|
||||
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.bK())) {
|
||||
if (this.o(entityhuman) && this.e(entityhuman) < 0.6D * (double) i * 0.6D * (double) i && entityhuman.damageEntity(DamageSource.mobAttack(this), (float) this.bO())) {
|
||||
this.makeSound("mob.attack", 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean bJ() {
|
||||
protected boolean bN() {
|
||||
return this.getSize() > 1;
|
||||
}
|
||||
|
||||
protected int bK() {
|
||||
protected int bO() {
|
||||
return this.getSize();
|
||||
}
|
||||
|
||||
protected String aK() {
|
||||
protected String aN() {
|
||||
return "mob.slime." + (this.getSize() > 1 ? "big" : "small");
|
||||
}
|
||||
|
||||
protected String aL() {
|
||||
protected String aO() {
|
||||
return "mob.slime." + (this.getSize() > 1 ? "big" : "small");
|
||||
}
|
||||
|
||||
@ -241,19 +241,19 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
}
|
||||
}
|
||||
|
||||
protected float aW() {
|
||||
protected float aZ() {
|
||||
return 0.4F * (float) this.getSize();
|
||||
}
|
||||
|
||||
public int bl() {
|
||||
public int bp() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected boolean bO() {
|
||||
protected boolean bS() {
|
||||
return this.getSize() > 0;
|
||||
}
|
||||
|
||||
protected boolean bM() {
|
||||
protected boolean bQ() {
|
||||
return this.getSize() > 2;
|
||||
}
|
||||
}
|
||||
|
@ -18,14 +18,14 @@ public class EntitySnowman extends EntityGolem implements IRangedEntity {
|
||||
this.targetSelector.a(1, new PathfinderGoalNearestAttackableTarget(this, EntityInsentient.class, 0, true, false, IMonster.a));
|
||||
}
|
||||
|
||||
public boolean bb() {
|
||||
public boolean be() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void ax() {
|
||||
super.ax();
|
||||
this.a(GenericAttributes.a).a(4.0D);
|
||||
this.a(GenericAttributes.d).a(0.20000000298023224D);
|
||||
protected void ay() {
|
||||
super.ay();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(4.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.20000000298023224D);
|
||||
}
|
||||
|
||||
public void c() {
|
||||
@ -87,7 +87,7 @@ public class EntitySnowman extends EntityGolem implements IRangedEntity {
|
||||
float f1 = MathHelper.sqrt(d0 * d0 + d2 * d2) * 0.2F;
|
||||
|
||||
entitysnowball.shoot(d0, d1 + (double) f1, d2, 1.6F, 12.0F);
|
||||
this.makeSound("random.bow", 1.0F, 1.0F / (this.aB().nextFloat() * 0.4F + 0.8F));
|
||||
this.makeSound("random.bow", 1.0F, 1.0F / (this.aC().nextFloat() * 0.4F + 0.8F));
|
||||
this.world.addEntity(entitysnowball);
|
||||
}
|
||||
}
|
||||
|
@ -21,10 +21,10 @@ public class EntitySpider extends EntityMonster {
|
||||
}
|
||||
}
|
||||
|
||||
protected void ax() {
|
||||
super.ax();
|
||||
this.a(GenericAttributes.a).a(16.0D);
|
||||
this.a(GenericAttributes.d).a(0.800000011920929D);
|
||||
protected void ay() {
|
||||
super.ay();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(16.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.800000011920929D);
|
||||
}
|
||||
|
||||
protected Entity findTarget() {
|
||||
@ -43,11 +43,11 @@ public class EntitySpider extends EntityMonster {
|
||||
return "mob.spider.say";
|
||||
}
|
||||
|
||||
protected String aK() {
|
||||
protected String aN() {
|
||||
return "mob.spider.say";
|
||||
}
|
||||
|
||||
protected String aL() {
|
||||
protected String aO() {
|
||||
return "mob.spider.death";
|
||||
}
|
||||
|
||||
@ -116,20 +116,20 @@ public class EntitySpider extends EntityMonster {
|
||||
}
|
||||
|
||||
public boolean e() {
|
||||
return this.bP();
|
||||
return this.bT();
|
||||
}
|
||||
|
||||
public void ak() {}
|
||||
public void al() {}
|
||||
|
||||
public EnumMonsterType getMonsterType() {
|
||||
return EnumMonsterType.ARTHROPOD;
|
||||
}
|
||||
|
||||
public boolean e(MobEffect mobeffect) {
|
||||
return mobeffect.getEffectId() == MobEffectList.POISON.id ? false : super.e(mobeffect);
|
||||
public boolean d(MobEffect mobeffect) {
|
||||
return mobeffect.getEffectId() == MobEffectList.POISON.id ? false : super.d(mobeffect);
|
||||
}
|
||||
|
||||
public boolean bP() {
|
||||
public boolean bT() {
|
||||
return (this.datawatcher.getByte(16) & 1) != 0;
|
||||
}
|
||||
|
||||
|
@ -25,24 +25,24 @@ public class EntitySquid extends EntityWaterAnimal {
|
||||
this.by = 1.0F / (this.random.nextFloat() + 1.0F) * 0.2F;
|
||||
}
|
||||
|
||||
protected void ax() {
|
||||
super.ax();
|
||||
this.a(GenericAttributes.a).a(10.0D);
|
||||
protected void ay() {
|
||||
super.ay();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(10.0D);
|
||||
}
|
||||
|
||||
protected String r() {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected String aK() {
|
||||
protected String aN() {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected String aL() {
|
||||
protected String aO() {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected float aW() {
|
||||
protected float aZ() {
|
||||
return 0.4F;
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ public class EntitySquid extends EntityWaterAnimal {
|
||||
this.move(this.motX, this.motY, this.motZ);
|
||||
}
|
||||
|
||||
protected void bh() {
|
||||
protected void bk() {
|
||||
++this.aV;
|
||||
if (this.aV > 100) {
|
||||
this.bA = this.bB = this.bC = 0.0F;
|
||||
@ -147,7 +147,7 @@ public class EntitySquid extends EntityWaterAnimal {
|
||||
this.bC = MathHelper.sin(f) * 0.2F;
|
||||
}
|
||||
|
||||
this.bk();
|
||||
this.bo();
|
||||
}
|
||||
|
||||
public boolean canSpawn() {
|
||||
|
@ -246,7 +246,7 @@ public class EntityTrackerEntry {
|
||||
}
|
||||
|
||||
if (this.tracker instanceof EntityLiving) {
|
||||
AttributeMapServer attributemapserver = (AttributeMapServer) ((EntityLiving) this.tracker).aT();
|
||||
AttributeMapServer attributemapserver = (AttributeMapServer) ((EntityLiving) this.tracker).aW();
|
||||
Set set = attributemapserver.b();
|
||||
|
||||
if (!set.isEmpty()) {
|
||||
@ -318,7 +318,7 @@ public class EntityTrackerEntry {
|
||||
}
|
||||
|
||||
if (this.tracker instanceof EntityLiving) {
|
||||
AttributeMapServer attributemapserver = (AttributeMapServer) ((EntityLiving) this.tracker).aT();
|
||||
AttributeMapServer attributemapserver = (AttributeMapServer) ((EntityLiving) this.tracker).aW();
|
||||
Collection collection = attributemapserver.c();
|
||||
|
||||
if (!collection.isEmpty()) {
|
||||
@ -340,8 +340,8 @@ public class EntityTrackerEntry {
|
||||
entityplayer.playerConnection.sendPacket(new Packet39AttachEntity(0, this.tracker.passenger, this.tracker));
|
||||
}
|
||||
|
||||
if (this.tracker instanceof EntityInsentient && ((EntityInsentient) this.tracker).bE() != null) {
|
||||
entityplayer.playerConnection.sendPacket(new Packet39AttachEntity(1, this.tracker, ((EntityInsentient) this.tracker).bE()));
|
||||
if (this.tracker instanceof EntityInsentient && ((EntityInsentient) this.tracker).bI() != null) {
|
||||
entityplayer.playerConnection.sendPacket(new Packet39AttachEntity(1, this.tracker, ((EntityInsentient) this.tracker).bI()));
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
|
@ -31,11 +31,11 @@ public class EntityWitch extends EntityMonster implements IRangedEntity {
|
||||
return "mob.witch.idle";
|
||||
}
|
||||
|
||||
protected String aK() {
|
||||
protected String aN() {
|
||||
return "mob.witch.hurt";
|
||||
}
|
||||
|
||||
protected String aL() {
|
||||
protected String aO() {
|
||||
return "mob.witch.death";
|
||||
}
|
||||
|
||||
@ -43,26 +43,26 @@ public class EntityWitch extends EntityMonster implements IRangedEntity {
|
||||
this.getDataWatcher().watch(21, Byte.valueOf((byte) (flag ? 1 : 0)));
|
||||
}
|
||||
|
||||
public boolean bP() {
|
||||
public boolean bT() {
|
||||
return this.getDataWatcher().getByte(21) == 1;
|
||||
}
|
||||
|
||||
protected void ax() {
|
||||
super.ax();
|
||||
this.a(GenericAttributes.a).a(26.0D);
|
||||
this.a(GenericAttributes.d).a(0.25D);
|
||||
protected void ay() {
|
||||
super.ay();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(26.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.25D);
|
||||
}
|
||||
|
||||
public boolean bb() {
|
||||
public boolean be() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public void c() {
|
||||
if (!this.world.isStatic) {
|
||||
if (this.bP()) {
|
||||
if (this.bT()) {
|
||||
if (this.bs-- <= 0) {
|
||||
this.a(false);
|
||||
ItemStack itemstack = this.aV();
|
||||
ItemStack itemstack = this.aY();
|
||||
|
||||
this.setEquipment(0, (ItemStack) null);
|
||||
if (itemstack != null && itemstack.id == Item.POTION.id) {
|
||||
@ -79,7 +79,7 @@ public class EntityWitch extends EntityMonster implements IRangedEntity {
|
||||
}
|
||||
}
|
||||
|
||||
this.a(GenericAttributes.d).b(bq);
|
||||
this.getAttributeInstance(GenericAttributes.d).b(bq);
|
||||
}
|
||||
} else {
|
||||
short short1 = -1;
|
||||
@ -96,9 +96,9 @@ public class EntityWitch extends EntityMonster implements IRangedEntity {
|
||||
|
||||
if (short1 > -1) {
|
||||
this.setEquipment(0, new ItemStack(Item.POTION, 1, short1));
|
||||
this.bs = this.aV().n();
|
||||
this.bs = this.aY().n();
|
||||
this.a(true);
|
||||
AttributeInstance attributeinstance = this.a(GenericAttributes.d);
|
||||
AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.d);
|
||||
|
||||
attributeinstance.b(bq);
|
||||
attributeinstance.a(bq);
|
||||
@ -148,7 +148,7 @@ public class EntityWitch extends EntityMonster implements IRangedEntity {
|
||||
}
|
||||
|
||||
public void a(EntityLiving entityliving, float f) {
|
||||
if (!this.bP()) {
|
||||
if (!this.bT()) {
|
||||
EntityPotion entitypotion = new EntityPotion(this.world, this, 32732);
|
||||
|
||||
entitypotion.pitch -= -20.0F;
|
||||
|
@ -44,7 +44,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
|
||||
public void b(NBTTagCompound nbttagcompound) {
|
||||
super.b(nbttagcompound);
|
||||
nbttagcompound.setInt("Invul", this.bQ());
|
||||
nbttagcompound.setInt("Invul", this.bU());
|
||||
}
|
||||
|
||||
public void a(NBTTagCompound nbttagcompound) {
|
||||
@ -56,11 +56,11 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
return "mob.wither.idle";
|
||||
}
|
||||
|
||||
protected String aK() {
|
||||
protected String aN() {
|
||||
return "mob.wither.hurt";
|
||||
}
|
||||
|
||||
protected String aL() {
|
||||
protected String aO() {
|
||||
return "mob.wither.death";
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
Entity entity = this.world.getEntity(this.q(0));
|
||||
|
||||
if (entity != null) {
|
||||
if (this.locY < entity.locY || !this.bR() && this.locY < entity.locY + 5.0D) {
|
||||
if (this.locY < entity.locY || !this.bV() && this.locY < entity.locY + 5.0D) {
|
||||
if (this.motY < 0.0D) {
|
||||
this.motY = 0.0D;
|
||||
}
|
||||
@ -135,7 +135,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
}
|
||||
}
|
||||
|
||||
boolean flag = this.bR();
|
||||
boolean flag = this.bV();
|
||||
|
||||
for (j = 0; j < 3; ++j) {
|
||||
double d8 = this.r(j);
|
||||
@ -148,18 +148,18 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.bQ() > 0) {
|
||||
if (this.bU() > 0) {
|
||||
for (j = 0; j < 3; ++j) {
|
||||
this.world.addParticle("mobSpell", this.locX + this.random.nextGaussian() * 1.0D, this.locY + (double) (this.random.nextFloat() * 3.3F), this.locZ + this.random.nextGaussian() * 1.0D, 0.699999988079071D, 0.699999988079071D, 0.8999999761581421D);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void be() {
|
||||
protected void bh() {
|
||||
int i;
|
||||
|
||||
if (this.bQ() > 0) {
|
||||
i = this.bQ() - 1;
|
||||
if (this.bU() > 0) {
|
||||
i = this.bU() - 1;
|
||||
if (i <= 0) {
|
||||
// CraftBukkit start
|
||||
ExplosionPrimeEvent event = new ExplosionPrimeEvent(this.getBukkitEntity(), 7.0F, false);
|
||||
@ -179,7 +179,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
this.heal(10.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.WITHER_SPAWN); // CraftBukkit
|
||||
}
|
||||
} else {
|
||||
super.be();
|
||||
super.bh();
|
||||
|
||||
int j;
|
||||
|
||||
@ -284,14 +284,14 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
}
|
||||
}
|
||||
|
||||
public void bP() {
|
||||
public void bT() {
|
||||
this.p(220);
|
||||
this.setHealth(this.getMaxHealth() / 3.0F);
|
||||
}
|
||||
|
||||
public void ak() {}
|
||||
public void al() {}
|
||||
|
||||
public int aM() {
|
||||
public int aP() {
|
||||
return 4;
|
||||
}
|
||||
|
||||
@ -368,12 +368,12 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
return false;
|
||||
} else if (damagesource == DamageSource.DROWN) {
|
||||
return false;
|
||||
} else if (this.bQ() > 0) {
|
||||
} else if (this.bU() > 0) {
|
||||
return false;
|
||||
} else {
|
||||
Entity entity;
|
||||
|
||||
if (this.bR()) {
|
||||
if (this.bV()) {
|
||||
entity = damagesource.h();
|
||||
if (entity instanceof EntityArrow) {
|
||||
return false;
|
||||
@ -405,7 +405,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
protected void bk() {
|
||||
protected void bo() {
|
||||
this.aV = 0;
|
||||
}
|
||||
|
||||
@ -418,18 +418,18 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
|
||||
public void addEffect(MobEffect mobeffect) {}
|
||||
|
||||
protected boolean bb() {
|
||||
protected boolean be() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected void ax() {
|
||||
super.ax();
|
||||
this.a(GenericAttributes.a).a(300.0D);
|
||||
this.a(GenericAttributes.d).a(0.6000000238418579D);
|
||||
this.a(GenericAttributes.b).a(40.0D);
|
||||
protected void ay() {
|
||||
super.ay();
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(300.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.6000000238418579D);
|
||||
this.getAttributeInstance(GenericAttributes.b).setValue(40.0D);
|
||||
}
|
||||
|
||||
public int bQ() {
|
||||
public int bU() {
|
||||
return this.datawatcher.getInt(20);
|
||||
}
|
||||
|
||||
@ -445,7 +445,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
this.datawatcher.watch(17 + i, Integer.valueOf(j));
|
||||
}
|
||||
|
||||
public boolean bR() {
|
||||
public boolean bV() {
|
||||
return this.getHealth() <= this.getMaxHealth() / 2.0F;
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,5 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
public class EntityWolf extends EntityTameableAnimal {
|
||||
|
||||
private float bq;
|
||||
@ -33,44 +30,30 @@ public class EntityWolf extends EntityTameableAnimal {
|
||||
this.setTamed(false);
|
||||
}
|
||||
|
||||
protected void ax() {
|
||||
super.ax();
|
||||
this.a(GenericAttributes.d).a(0.30000001192092896D);
|
||||
protected void ay() {
|
||||
super.ay();
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.30000001192092896D);
|
||||
if (this.isTamed()) {
|
||||
this.a(GenericAttributes.a).a(20.0D);
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(20.0D);
|
||||
} else {
|
||||
this.a(GenericAttributes.a).a(8.0D);
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(8.0D);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean bb() {
|
||||
public boolean be() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public void setGoalTarget(EntityLiving entityliving) {
|
||||
super.setGoalTarget(entityliving);
|
||||
if (entityliving == null) {
|
||||
if (!this.isAngry()) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.setAngry(false);
|
||||
List list = this.world.a(this.getClass(), AxisAlignedBB.a().a(this.locX, this.locY, this.locZ, this.locX + 1.0D, this.locY + 1.0D, this.locZ + 1.0D).grow(16.0D, 10.0D, 16.0D));
|
||||
Iterator iterator = list.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
EntityWolf entitywolf = (EntityWolf) iterator.next();
|
||||
|
||||
if (this != entitywolf) {
|
||||
entitywolf.setAngry(false);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if (!this.isTamed()) {
|
||||
this.setAngry(true);
|
||||
}
|
||||
}
|
||||
|
||||
protected void bg() {
|
||||
protected void bj() {
|
||||
this.datawatcher.watch(18, Float.valueOf(this.getHealth()));
|
||||
}
|
||||
|
||||
@ -104,15 +87,15 @@ public class EntityWolf extends EntityTameableAnimal {
|
||||
return this.isAngry() ? "mob.wolf.growl" : (this.random.nextInt(3) == 0 ? (this.isTamed() && this.datawatcher.getFloat(18) < (this.getMaxHealth() / 2) ? "mob.wolf.whine" : "mob.wolf.panting") : "mob.wolf.bark");
|
||||
}
|
||||
|
||||
protected String aK() {
|
||||
protected String aN() {
|
||||
return "mob.wolf.hurt";
|
||||
}
|
||||
|
||||
protected String aL() {
|
||||
protected String aO() {
|
||||
return "mob.wolf.death";
|
||||
}
|
||||
|
||||
protected float aW() {
|
||||
protected float aZ() {
|
||||
return 0.4F;
|
||||
}
|
||||
|
||||
@ -122,7 +105,7 @@ public class EntityWolf extends EntityTameableAnimal {
|
||||
|
||||
public void c() {
|
||||
super.c();
|
||||
if (!this.world.isStatic && this.bs && !this.bt && !this.bI() && this.onGround) {
|
||||
if (!this.world.isStatic && this.bs && !this.bt && !this.bM() && this.onGround) {
|
||||
this.bt = true;
|
||||
this.bu = 0.0F;
|
||||
this.bv = 0.0F;
|
||||
@ -133,13 +116,13 @@ public class EntityWolf extends EntityTameableAnimal {
|
||||
public void l_() {
|
||||
super.l_();
|
||||
this.br = this.bq;
|
||||
if (this.ca()) {
|
||||
if (this.ce()) {
|
||||
this.bq += (1.0F - this.bq) * 0.4F;
|
||||
} else {
|
||||
this.bq += (0.0F - this.bq) * 0.4F;
|
||||
}
|
||||
|
||||
if (this.ca()) {
|
||||
if (this.ce()) {
|
||||
this.g = 10;
|
||||
}
|
||||
|
||||
@ -150,7 +133,7 @@ public class EntityWolf extends EntityTameableAnimal {
|
||||
this.bv = 0.0F;
|
||||
} else if ((this.bs || this.bt) && this.bt) {
|
||||
if (this.bu == 0.0F) {
|
||||
this.makeSound("mob.wolf.shake", this.aW(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
|
||||
this.makeSound("mob.wolf.shake", this.aZ(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
|
||||
}
|
||||
|
||||
this.bv = this.bu;
|
||||
@ -180,8 +163,8 @@ public class EntityWolf extends EntityTameableAnimal {
|
||||
return this.length * 0.8F;
|
||||
}
|
||||
|
||||
public int bl() {
|
||||
return this.isSitting() ? 20 : super.bl();
|
||||
public int bp() {
|
||||
return this.isSitting() ? 20 : super.bp();
|
||||
}
|
||||
|
||||
public boolean damageEntity(DamageSource damagesource, float f) {
|
||||
@ -208,9 +191,9 @@ public class EntityWolf extends EntityTameableAnimal {
|
||||
public void setTamed(boolean flag) {
|
||||
super.setTamed(flag);
|
||||
if (flag) {
|
||||
this.a(GenericAttributes.a).a(20.0D);
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(20.0D);
|
||||
} else {
|
||||
this.a(GenericAttributes.a).a(8.0D);
|
||||
this.getAttributeInstance(GenericAttributes.a).setValue(8.0D);
|
||||
}
|
||||
}
|
||||
|
||||
@ -252,6 +235,8 @@ public class EntityWolf extends EntityTameableAnimal {
|
||||
this.bp.setSitting(!this.isSitting());
|
||||
this.bd = false;
|
||||
this.setPathEntity((PathEntity) null);
|
||||
this.setTarget((Entity) null);
|
||||
this.setGoalTarget((EntityLiving) null);
|
||||
}
|
||||
} else if (itemstack != null && itemstack.id == Item.BONE.id && !this.isAngry()) {
|
||||
if (!entityhuman.abilities.canInstantlyBuild) {
|
||||
@ -271,10 +256,10 @@ public class EntityWolf extends EntityTameableAnimal {
|
||||
this.bp.setSitting(true);
|
||||
this.setHealth(this.getMaxHealth()); // CraftBukkit - 20.0 -> getMaxHealth()
|
||||
this.setOwnerName(entityhuman.getName());
|
||||
this.j(true);
|
||||
this.i(true);
|
||||
this.world.broadcastEntityEffect(this, (byte) 7);
|
||||
} else {
|
||||
this.j(false);
|
||||
this.i(false);
|
||||
this.world.broadcastEntityEffect(this, (byte) 6);
|
||||
}
|
||||
}
|
||||
@ -289,7 +274,7 @@ public class EntityWolf extends EntityTameableAnimal {
|
||||
return itemstack == null ? false : (!(Item.byId[itemstack.id] instanceof ItemFood) ? false : ((ItemFood) Item.byId[itemstack.id]).j());
|
||||
}
|
||||
|
||||
public int br() {
|
||||
public int bv() {
|
||||
return 8;
|
||||
}
|
||||
|
||||
@ -327,7 +312,7 @@ public class EntityWolf extends EntityTameableAnimal {
|
||||
return entitywolf;
|
||||
}
|
||||
|
||||
public void n(boolean flag) {
|
||||
public void m(boolean flag) {
|
||||
if (flag) {
|
||||
this.datawatcher.watch(19, Byte.valueOf((byte) 1));
|
||||
} else {
|
||||
@ -345,11 +330,11 @@ public class EntityWolf extends EntityTameableAnimal {
|
||||
} else {
|
||||
EntityWolf entitywolf = (EntityWolf) entityanimal;
|
||||
|
||||
return !entitywolf.isTamed() ? false : (entitywolf.isSitting() ? false : this.bU() && entitywolf.bU());
|
||||
return !entitywolf.isTamed() ? false : (entitywolf.isSitting() ? false : this.bY() && entitywolf.bY());
|
||||
}
|
||||
}
|
||||
|
||||
public boolean ca() {
|
||||
public boolean ce() {
|
||||
return this.datawatcher.getByte(19) == 1;
|
||||
}
|
||||
|
||||
@ -357,6 +342,22 @@ public class EntityWolf extends EntityTameableAnimal {
|
||||
return !this.isTamed() && this.ticksLived > 2400;
|
||||
}
|
||||
|
||||
public boolean a(EntityLiving entityliving, EntityLiving entityliving1) {
|
||||
if (!(entityliving instanceof EntityCreeper) && !(entityliving instanceof EntityGhast)) {
|
||||
if (entityliving instanceof EntityWolf) {
|
||||
EntityWolf entitywolf = (EntityWolf) entityliving;
|
||||
|
||||
if (entitywolf.isTamed() && entitywolf.getOwner() == entityliving1) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return entityliving instanceof EntityHuman && entityliving1 instanceof EntityHuman && !((EntityHuman) entityliving1).a((EntityHuman) entityliving) ? false : !(entityliving instanceof EntityHorse) || !((EntityHorse) entityliving).isTame();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public EntityAgeable createChild(EntityAgeable entityageable) {
|
||||
return this.b(entityageable);
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ public class EntityZombie extends EntityMonster {
|
||||
|
||||
protected static final IAttribute bp = (new AttributeRanged("zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).a("Spawn Reinforcements Chance");
|
||||
private static final UUID bq = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836");
|
||||
private static final AttributeModifier br = new AttributeModifier(bq, "Baby speed boost", 0.5D, 0);
|
||||
private static final AttributeModifier br = new AttributeModifier(bq, "Baby speed boost", 0.5D, 1);
|
||||
private int bs;
|
||||
private int lastTick = MinecraftServer.currentTick; // CraftBukkit
|
||||
|
||||
@ -34,12 +34,12 @@ public class EntityZombie extends EntityMonster {
|
||||
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityVillager.class, 0, false));
|
||||
}
|
||||
|
||||
protected void ax() {
|
||||
super.ax();
|
||||
this.a(GenericAttributes.b).a(40.0D);
|
||||
this.a(GenericAttributes.d).a(0.23000000417232513D);
|
||||
this.a(GenericAttributes.e).a(3.0D);
|
||||
this.aT().b(bp).a(this.random.nextDouble() * 0.10000000149011612D);
|
||||
protected void ay() {
|
||||
super.ay();
|
||||
this.getAttributeInstance(GenericAttributes.b).setValue(40.0D);
|
||||
this.getAttributeInstance(GenericAttributes.d).setValue(0.23000000417232513D);
|
||||
this.getAttributeInstance(GenericAttributes.e).setValue(3.0D);
|
||||
this.aW().b(bp).setValue(this.random.nextDouble() * 0.10000000149011612D);
|
||||
}
|
||||
|
||||
protected void a() {
|
||||
@ -49,8 +49,8 @@ public class EntityZombie extends EntityMonster {
|
||||
this.getDataWatcher().a(14, Byte.valueOf((byte) 0));
|
||||
}
|
||||
|
||||
public int aM() {
|
||||
int i = super.aM() + 2;
|
||||
public int aP() {
|
||||
int i = super.aP() + 2;
|
||||
|
||||
if (i > 20) {
|
||||
i = 20;
|
||||
@ -59,7 +59,7 @@ public class EntityZombie extends EntityMonster {
|
||||
return i;
|
||||
}
|
||||
|
||||
protected boolean bb() {
|
||||
protected boolean be() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ public class EntityZombie extends EntityMonster {
|
||||
public void setBaby(boolean flag) {
|
||||
this.getDataWatcher().watch(12, Byte.valueOf((byte) (flag ? 1 : 0)));
|
||||
if (this.world != null && !this.world.isStatic) {
|
||||
AttributeInstance attributeinstance = this.a(GenericAttributes.d);
|
||||
AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.d);
|
||||
|
||||
attributeinstance.b(br);
|
||||
if (flag) {
|
||||
@ -129,15 +129,15 @@ public class EntityZombie extends EntityMonster {
|
||||
} else {
|
||||
EntityLiving entityliving = this.getGoalTarget();
|
||||
|
||||
if (entityliving == null && this.bJ() instanceof EntityLiving) {
|
||||
entityliving = (EntityLiving) this.bJ();
|
||||
if (entityliving == null && this.bN() instanceof EntityLiving) {
|
||||
entityliving = (EntityLiving) this.bN();
|
||||
}
|
||||
|
||||
if (entityliving == null && damagesource.getEntity() instanceof EntityLiving) {
|
||||
entityliving = (EntityLiving) damagesource.getEntity();
|
||||
}
|
||||
|
||||
if (entityliving != null && this.world.difficulty >= 3 && (double) this.random.nextFloat() < this.a(bp).e()) {
|
||||
if (entityliving != null && this.world.difficulty >= 3 && (double) this.random.nextFloat() < this.getAttributeInstance(bp).getValue()) {
|
||||
int i = MathHelper.floor(this.locX);
|
||||
int j = MathHelper.floor(this.locY);
|
||||
int k = MathHelper.floor(this.locZ);
|
||||
@ -154,8 +154,8 @@ public class EntityZombie extends EntityMonster {
|
||||
this.world.addEntity(entityzombie);
|
||||
entityzombie.setGoalTarget(entityliving);
|
||||
entityzombie.a((GroupDataEntity) null);
|
||||
this.a(bp).a(new AttributeModifier("Zombie reinforcement caller charge", -0.05000000074505806D, 0));
|
||||
entityzombie.a(bp).a(new AttributeModifier("Zombie reinforcement callee charge", -0.05000000074505806D, 0));
|
||||
this.getAttributeInstance(bp).a(new AttributeModifier("Zombie reinforcement caller charge", -0.05000000074505806D, 0));
|
||||
entityzombie.getAttributeInstance(bp).a(new AttributeModifier("Zombie reinforcement callee charge", -0.05000000074505806D, 0));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -167,8 +167,8 @@ public class EntityZombie extends EntityMonster {
|
||||
}
|
||||
|
||||
public void l_() {
|
||||
if (!this.world.isStatic && this.bR()) {
|
||||
int i = this.bT();
|
||||
if (!this.world.isStatic && this.bV()) {
|
||||
int i = this.bX();
|
||||
|
||||
// CraftBukkit start - Use wall time instead of ticks for villager conversion
|
||||
int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
|
||||
@ -178,7 +178,7 @@ public class EntityZombie extends EntityMonster {
|
||||
|
||||
this.bs -= i;
|
||||
if (this.bs <= 0) {
|
||||
this.bS();
|
||||
this.bW();
|
||||
}
|
||||
}
|
||||
|
||||
@ -188,7 +188,7 @@ public class EntityZombie extends EntityMonster {
|
||||
public boolean m(Entity entity) {
|
||||
boolean flag = super.m(entity);
|
||||
|
||||
if (flag && this.aV() == null && this.isBurning() && this.random.nextFloat() < (float) this.world.difficulty * 0.3F) {
|
||||
if (flag && this.aY() == null && this.isBurning() && this.random.nextFloat() < (float) this.world.difficulty * 0.3F) {
|
||||
// CraftBukkit start
|
||||
EntityCombustByEntityEvent event = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), 2 * this.world.difficulty);
|
||||
this.world.getServer().getPluginManager().callEvent(event);
|
||||
@ -206,11 +206,11 @@ public class EntityZombie extends EntityMonster {
|
||||
return "mob.zombie.say";
|
||||
}
|
||||
|
||||
protected String aK() {
|
||||
protected String aN() {
|
||||
return "mob.zombie.hurt";
|
||||
}
|
||||
|
||||
protected String aL() {
|
||||
protected String aO() {
|
||||
return "mob.zombie.death";
|
||||
}
|
||||
|
||||
@ -241,8 +241,8 @@ public class EntityZombie extends EntityMonster {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
protected void bs() {
|
||||
super.bs();
|
||||
protected void bw() {
|
||||
super.bw();
|
||||
if (this.random.nextFloat() < (this.world.difficulty == 3 ? 0.05F : 0.01F)) {
|
||||
int i = this.random.nextInt(3);
|
||||
|
||||
@ -264,7 +264,7 @@ public class EntityZombie extends EntityMonster {
|
||||
nbttagcompound.setBoolean("IsVillager", true);
|
||||
}
|
||||
|
||||
nbttagcompound.setInt("ConversionTime", this.bR() ? this.bs : -1);
|
||||
nbttagcompound.setInt("ConversionTime", this.bV() ? this.bs : -1);
|
||||
}
|
||||
|
||||
public void a(NBTTagCompound nbttagcompound) {
|
||||
@ -305,16 +305,28 @@ public class EntityZombie extends EntityMonster {
|
||||
}
|
||||
|
||||
public GroupDataEntity a(GroupDataEntity groupdataentity) {
|
||||
groupdataentity = super.a(groupdataentity);
|
||||
Object object = super.a(groupdataentity);
|
||||
float f = this.world.b(this.locX, this.locY, this.locZ);
|
||||
|
||||
this.h(this.random.nextFloat() < 0.55F * f);
|
||||
if (this.world.random.nextFloat() < 0.05F) {
|
||||
this.setVillager(true);
|
||||
if (object == null) {
|
||||
object = new GroupDataZombie(this, this.world.random.nextFloat() < 0.05F, this.world.random.nextFloat() < 0.05F, (EmptyClass4) null);
|
||||
}
|
||||
|
||||
this.bs();
|
||||
this.bt();
|
||||
if (object instanceof GroupDataZombie) {
|
||||
GroupDataZombie groupdatazombie = (GroupDataZombie) object;
|
||||
|
||||
if (groupdatazombie.b) {
|
||||
this.setVillager(true);
|
||||
}
|
||||
|
||||
if (groupdatazombie.a) {
|
||||
this.setBaby(true);
|
||||
}
|
||||
}
|
||||
|
||||
this.bw();
|
||||
this.bx();
|
||||
if (this.getEquipment(4) == null) {
|
||||
Calendar calendar = this.world.W();
|
||||
|
||||
@ -324,18 +336,18 @@ public class EntityZombie extends EntityMonster {
|
||||
}
|
||||
}
|
||||
|
||||
this.a(GenericAttributes.c).a(new AttributeModifier("Random spawn bonus", this.random.nextDouble() * 0.05000000074505806D, 0));
|
||||
this.a(GenericAttributes.b).a(new AttributeModifier("Random zombie-spawn bonus", this.random.nextDouble() * 1.5D, 2));
|
||||
this.getAttributeInstance(GenericAttributes.c).a(new AttributeModifier("Random spawn bonus", this.random.nextDouble() * 0.05000000074505806D, 0));
|
||||
this.getAttributeInstance(GenericAttributes.b).a(new AttributeModifier("Random zombie-spawn bonus", this.random.nextDouble() * 1.5D, 2));
|
||||
if (this.random.nextFloat() < f * 0.05F) {
|
||||
this.a(bp).a(new AttributeModifier("Leader zombie bonus", this.random.nextDouble() * 0.25D + 0.5D, 0));
|
||||
this.a(GenericAttributes.a).a(new AttributeModifier("Leader zombie bonus", this.random.nextDouble() * 3.0D + 1.0D, 2));
|
||||
this.getAttributeInstance(bp).a(new AttributeModifier("Leader zombie bonus", this.random.nextDouble() * 0.25D + 0.5D, 0));
|
||||
this.getAttributeInstance(GenericAttributes.a).a(new AttributeModifier("Leader zombie bonus", this.random.nextDouble() * 3.0D + 1.0D, 2));
|
||||
}
|
||||
|
||||
return groupdataentity;
|
||||
return (GroupDataEntity) object;
|
||||
}
|
||||
|
||||
public boolean a(EntityHuman entityhuman) {
|
||||
ItemStack itemstack = entityhuman.bt();
|
||||
ItemStack itemstack = entityhuman.bx();
|
||||
|
||||
if (itemstack != null && itemstack.getItem() == Item.GOLDEN_APPLE && itemstack.getData() == 0 && this.isVillager() && this.hasEffect(MobEffectList.WEAKNESS)) {
|
||||
if (!entityhuman.abilities.canInstantlyBuild) {
|
||||
@ -365,19 +377,19 @@ public class EntityZombie extends EntityMonster {
|
||||
}
|
||||
|
||||
protected boolean isTypeNotPersistent() {
|
||||
return !this.bR();
|
||||
return !this.bV();
|
||||
}
|
||||
|
||||
public boolean bR() {
|
||||
public boolean bV() {
|
||||
return this.getDataWatcher().getByte(14) == 1;
|
||||
}
|
||||
|
||||
protected void bS() {
|
||||
protected void bW() {
|
||||
EntityVillager entityvillager = new EntityVillager(this.world);
|
||||
|
||||
entityvillager.j(this);
|
||||
entityvillager.a((GroupDataEntity) null);
|
||||
entityvillager.bT();
|
||||
entityvillager.bX();
|
||||
if (this.isBaby()) {
|
||||
entityvillager.setAge(-24000);
|
||||
}
|
||||
@ -388,7 +400,7 @@ public class EntityZombie extends EntityMonster {
|
||||
this.world.a((EntityHuman) null, 1017, (int) this.locX, (int) this.locY, (int) this.locZ, 0);
|
||||
}
|
||||
|
||||
protected int bT() {
|
||||
protected int bX() {
|
||||
int i = 1;
|
||||
|
||||
if (this.random.nextFloat() < 0.01F) {
|
||||
|
@ -44,7 +44,7 @@ public class FoodMetaData {
|
||||
}
|
||||
}
|
||||
|
||||
if (entityhuman.world.getGameRules().getBoolean("naturalRegeneration") && this.foodLevel >= 18 && entityhuman.bE()) {
|
||||
if (entityhuman.world.getGameRules().getBoolean("naturalRegeneration") && this.foodLevel >= 18 && entityhuman.bI()) {
|
||||
++this.foodTickTimer;
|
||||
if (this.foodTickTimer >= 80) {
|
||||
// CraftBukkit - added RegainReason
|
||||
|
22
src/main/java/net/minecraft/server/GroupDataZombie.java
Normale Datei
22
src/main/java/net/minecraft/server/GroupDataZombie.java
Normale Datei
@ -0,0 +1,22 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
// CraftBukkit - package-private import
|
||||
class GroupDataZombie implements GroupDataEntity {
|
||||
|
||||
public boolean a;
|
||||
public boolean b;
|
||||
|
||||
final EntityZombie c;
|
||||
|
||||
private GroupDataZombie(EntityZombie entityzombie, boolean flag, boolean flag1) {
|
||||
this.c = entityzombie;
|
||||
this.a = false;
|
||||
this.b = false;
|
||||
this.a = flag;
|
||||
this.b = flag1;
|
||||
}
|
||||
|
||||
GroupDataZombie(EntityZombie entityzombie, boolean flag, boolean flag1, EmptyClass4 emptyclass4) {
|
||||
this(entityzombie, flag, flag1);
|
||||
}
|
||||
}
|
@ -82,7 +82,9 @@ public class ItemBlock extends Item {
|
||||
org.bukkit.block.BlockState blockstate = org.bukkit.craftbukkit.block.CraftBlockState.getBlockState(world, x, y, z);
|
||||
|
||||
world.callingPlaceEvent = true;
|
||||
world.setTypeIdAndData(x, y, z, id, data, 2);
|
||||
// Sign is now 3 not 2.
|
||||
int flag = (id == Block.SIGN_POST.id || id == Block.WALL_SIGN.id) ? 3 : 2;
|
||||
world.setTypeIdAndData(x, y, z, id, data, flag);
|
||||
|
||||
org.bukkit.event.block.BlockPlaceEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPlaceEvent(world, entityhuman, blockstate, clickedX, clickedY, clickedZ);
|
||||
if (event.isCancelled() || !event.canBuild()) {
|
||||
|
@ -42,7 +42,7 @@ public class ItemBoat extends Item {
|
||||
Entity entity = (Entity) list.get(i);
|
||||
|
||||
if (entity.K()) {
|
||||
float f10 = entity.X();
|
||||
float f10 = entity.Y();
|
||||
AxisAlignedBB axisalignedbb = entity.boundingBox.grow((double) f10, (double) f10, (double) f10);
|
||||
|
||||
if (axisalignedbb.a(vec3d)) {
|
||||
|
@ -153,15 +153,12 @@ public class ItemBucket extends Item {
|
||||
if (this.a <= 0) {
|
||||
return false;
|
||||
} else {
|
||||
boolean flag = !world.getMaterial(i, j, k).isBuildable();
|
||||
Material material = world.getMaterial(i, j, k);
|
||||
boolean flag = !material.isBuildable();
|
||||
|
||||
if (!world.isEmpty(i, j, k) && !flag) {
|
||||
return false;
|
||||
} else {
|
||||
if (!world.isStatic && flag) {
|
||||
world.setAir(i, j, k, true);
|
||||
}
|
||||
|
||||
if (world.worldProvider.f && this.a == Block.WATER.id) {
|
||||
world.makeSound((double) ((float) i + 0.5F), (double) ((float) j + 0.5F), (double) ((float) k + 0.5F), "random.fizz", 0.5F, 2.6F + (world.random.nextFloat() - world.random.nextFloat()) * 0.8F);
|
||||
|
||||
@ -169,6 +166,10 @@ public class ItemBucket extends Item {
|
||||
world.addParticle("largesmoke", (double) i + Math.random(), (double) j + Math.random(), (double) k + Math.random(), 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
} else {
|
||||
if (!world.isStatic && flag && !material.isLiquid()) {
|
||||
world.setAir(i, j, k, true);
|
||||
}
|
||||
|
||||
world.setTypeIdAndData(i, j, k, this.a, 0, 3);
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ public class ItemFishingRod extends Item {
|
||||
int i = entityhuman.hookedFish.c();
|
||||
|
||||
itemstack.damage(i, entityhuman);
|
||||
entityhuman.aR();
|
||||
entityhuman.aU();
|
||||
} else {
|
||||
// CraftBukkit start
|
||||
EntityFishingHook hook = new EntityFishingHook(world, entityhuman);
|
||||
@ -32,7 +32,7 @@ public class ItemFishingRod extends Item {
|
||||
world.addEntity(hook); // CraftBukkit - moved creation up
|
||||
}
|
||||
|
||||
entityhuman.aR();
|
||||
entityhuman.aU();
|
||||
}
|
||||
|
||||
return itemstack;
|
||||
|
@ -39,17 +39,19 @@ public class ItemSign extends Item {
|
||||
return false;
|
||||
} else if (!Block.SIGN_POST.canPlace(world, i, j, k)) {
|
||||
return false;
|
||||
} else if (world.isStatic) {
|
||||
return true;
|
||||
} else {
|
||||
// CraftBukkit start
|
||||
final Block block;
|
||||
if (l == 1) {
|
||||
int i1 = MathHelper.floor((double) ((entityhuman.yaw + 180.0F) * 16.0F / 360.0F) + 0.5D) & 15;
|
||||
|
||||
// world.setTypeIdAndData(i, j, k, Block.SIGN_POST.id, i1, 2);
|
||||
// world.setTypeIdAndData(i, j, k, Block.SIGN_POST.id, i1, 3);
|
||||
block = Block.SIGN_POST;
|
||||
l = i1;
|
||||
} else {
|
||||
// world.setTypeIdAndData(i, j, k, Block.WALL_SIGN.id, l, 2);
|
||||
// world.setTypeIdAndData(i, j, k, Block.WALL_SIGN.id, l, 3);
|
||||
block = Block.WALL_SIGN;
|
||||
}
|
||||
if (!ItemBlock.processBlockPlace(world, entityhuman, null, i, j, k, block.id, l, clickedX, clickedY, clickedZ)) {
|
||||
|
@ -206,7 +206,7 @@ public final class ItemStack {
|
||||
public void damage(int i, EntityLiving entityliving) {
|
||||
if (!(entityliving instanceof EntityHuman) || !((EntityHuman) entityliving).abilities.canInstantlyBuild) {
|
||||
if (this.g()) {
|
||||
if (this.isDamaged(i, entityliving.aB())) {
|
||||
if (this.isDamaged(i, entityliving.aC())) {
|
||||
entityliving.a(this);
|
||||
--this.count;
|
||||
if (entityliving instanceof EntityHuman) {
|
||||
@ -214,7 +214,7 @@ public final class ItemStack {
|
||||
|
||||
entityhuman.a(StatisticList.F[this.id], 1);
|
||||
if (this.count == 0 && this.getItem() instanceof ItemBow) {
|
||||
entityhuman.bu();
|
||||
entityhuman.by();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -755,7 +755,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return "1.6.1";
|
||||
return "1.6.2";
|
||||
}
|
||||
|
||||
public int A() {
|
||||
|
@ -96,8 +96,8 @@ public class MobEffectList {
|
||||
if (!entityliving.world.isStatic) {
|
||||
((EntityHuman) entityliving).getFoodData().eat(i + 1, 1.0F);
|
||||
}
|
||||
} else if ((this.id != HEAL.id || entityliving.aI()) && (this.id != HARM.id || !entityliving.aI())) {
|
||||
if (this.id == HARM.id && !entityliving.aI() || this.id == HEAL.id && entityliving.aI()) {
|
||||
} else if ((this.id != HEAL.id || entityliving.aL()) && (this.id != HARM.id || !entityliving.aL())) {
|
||||
if (this.id == HARM.id && !entityliving.aL() || this.id == HEAL.id && entityliving.aL()) {
|
||||
entityliving.damageEntity(DamageSource.MAGIC, (float) (6 << i));
|
||||
}
|
||||
} else {
|
||||
@ -114,8 +114,8 @@ public class MobEffectList {
|
||||
// CraftBukkit end
|
||||
int j;
|
||||
|
||||
if ((this.id != HEAL.id || entityliving1.aI()) && (this.id != HARM.id || !entityliving1.aI())) {
|
||||
if (this.id == HARM.id && !entityliving1.aI() || this.id == HEAL.id && entityliving1.aI()) {
|
||||
if ((this.id != HEAL.id || entityliving1.aL()) && (this.id != HARM.id || !entityliving1.aL())) {
|
||||
if (this.id == HARM.id && !entityliving1.aL() || this.id == HEAL.id && entityliving1.aL()) {
|
||||
j = (int) (d0 * (double) (6 << i) + 0.5D);
|
||||
if (entityliving == null) {
|
||||
entityliving1.damageEntity(DamageSource.MAGIC, (float) j);
|
||||
|
@ -13,6 +13,8 @@ import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Queue;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import javax.crypto.SecretKey;
|
||||
|
||||
@ -30,7 +32,7 @@ public class NetworkManager implements INetworkManager {
|
||||
private volatile DataOutputStream output;
|
||||
private volatile boolean n = true;
|
||||
private volatile boolean o;
|
||||
private java.util.Queue inboundQueue = new java.util.concurrent.ConcurrentLinkedQueue(); // CraftBukkit - Concurrent linked queue
|
||||
private Queue inboundQueue = new ConcurrentLinkedQueue();
|
||||
private List highPriorityQueue = Collections.synchronizedList(new ArrayList());
|
||||
private List lowPriorityQueue = Collections.synchronizedList(new ArrayList());
|
||||
private Connection connection;
|
||||
@ -282,7 +284,7 @@ public class NetworkManager implements INetworkManager {
|
||||
int i = 1000;
|
||||
|
||||
while (!this.inboundQueue.isEmpty() && i-- >= 0) {
|
||||
Packet packet = (Packet) this.inboundQueue.poll(); // CraftBukkit - remove -> poll
|
||||
Packet packet = (Packet) this.inboundQueue.poll();
|
||||
|
||||
// CraftBukkit start
|
||||
if (this.connection instanceof PendingConnection ? ((PendingConnection) this.connection).b : ((PlayerConnection) this.connection).disconnected) {
|
||||
@ -290,7 +292,9 @@ public class NetworkManager implements INetworkManager {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
packet.handle(this.connection);
|
||||
if (packet != null && !this.connection.c()) {
|
||||
packet.handle(this.connection);
|
||||
}
|
||||
}
|
||||
|
||||
this.a();
|
||||
|
@ -321,6 +321,7 @@ public abstract class Packet {
|
||||
a(130, true, true, Packet130UpdateSign.class);
|
||||
a(131, true, false, Packet131ItemData.class);
|
||||
a(132, true, false, Packet132TileEntityData.class);
|
||||
a(133, true, false, Packet133OpenTileEntity.class);
|
||||
a(200, true, false, Packet200Statistic.class);
|
||||
a(201, true, false, Packet201PlayerInfo.class);
|
||||
a(202, true, true, Packet202Abilities.class);
|
||||
|
@ -31,7 +31,7 @@ public class PathfinderGoalBreakDoor extends PathfinderGoalDoorInteract {
|
||||
|
||||
public void e() {
|
||||
super.e();
|
||||
if (this.a.aB().nextInt(20) == 0) {
|
||||
if (this.a.aC().nextInt(20) == 0) {
|
||||
this.a.world.triggerEffect(1010, this.b, this.c, this.d, 0);
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ public class PathfinderGoalBreed extends PathfinderGoal {
|
||||
}
|
||||
|
||||
public boolean a() {
|
||||
if (!this.d.bU()) {
|
||||
if (!this.d.bY()) {
|
||||
return false;
|
||||
} else {
|
||||
this.e = this.f();
|
||||
@ -29,7 +29,7 @@ public class PathfinderGoalBreed extends PathfinderGoal {
|
||||
}
|
||||
|
||||
public boolean b() {
|
||||
return this.e.isAlive() && this.e.bU() && this.b < 60;
|
||||
return this.e.isAlive() && this.e.bY() && this.b < 60;
|
||||
}
|
||||
|
||||
public void d() {
|
||||
@ -38,7 +38,7 @@ public class PathfinderGoalBreed extends PathfinderGoal {
|
||||
}
|
||||
|
||||
public void e() {
|
||||
this.d.getControllerLook().a(this.e, 10.0F, (float) this.d.bl());
|
||||
this.d.getControllerLook().a(this.e, 10.0F, (float) this.d.bp());
|
||||
this.d.getNavigation().a((Entity) this.e, this.c);
|
||||
++this.b;
|
||||
if (this.b >= 60 && this.d.e(this.e) < 9.0D) {
|
||||
@ -71,12 +71,12 @@ public class PathfinderGoalBreed extends PathfinderGoal {
|
||||
if (entityageable != null) {
|
||||
this.d.setAge(6000);
|
||||
this.e.setAge(6000);
|
||||
this.d.bV();
|
||||
this.e.bV();
|
||||
this.d.bZ();
|
||||
this.e.bZ();
|
||||
entityageable.setAge(-24000);
|
||||
entityageable.setPositionRotation(this.d.locX, this.d.locY, this.d.locZ, 0.0F, 0.0F);
|
||||
this.a.addEntity(entityageable, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BREEDING); // CraftBukkit - added SpawnReason
|
||||
Random random = this.d.aB();
|
||||
Random random = this.d.aC();
|
||||
|
||||
for (int i = 0; i < 7; ++i) {
|
||||
double d0 = random.nextGaussian() * 0.02D;
|
||||
|
@ -18,7 +18,7 @@ public class PathfinderGoalEatTile extends PathfinderGoal {
|
||||
}
|
||||
|
||||
public boolean a() {
|
||||
if (this.b.aB().nextInt(this.b.isBaby() ? 50 : 1000) != 0) {
|
||||
if (this.b.aC().nextInt(this.b.isBaby() ? 50 : 1000) != 0) {
|
||||
return false;
|
||||
} else {
|
||||
int i = MathHelper.floor(this.b.locX);
|
||||
|
@ -68,7 +68,7 @@ public class PathfinderGoalMeleeAttack extends PathfinderGoal {
|
||||
|
||||
this.b.getControllerLook().a(entityliving, 30.0F, 30.0F);
|
||||
if ((this.e || this.b.getEntitySenses().canSee(entityliving)) && --this.h <= 0) {
|
||||
this.h = 4 + this.b.aB().nextInt(7);
|
||||
this.h = 4 + this.b.aC().nextInt(7);
|
||||
this.b.getNavigation().a((Entity) entityliving, this.d);
|
||||
}
|
||||
|
||||
@ -78,8 +78,8 @@ public class PathfinderGoalMeleeAttack extends PathfinderGoal {
|
||||
if (this.b.e(entityliving.locX, entityliving.boundingBox.b, entityliving.locZ) <= d0) {
|
||||
if (this.c <= 0) {
|
||||
this.c = 20;
|
||||
if (this.b.aV() != null) {
|
||||
this.b.aR();
|
||||
if (this.b.aY() != null) {
|
||||
this.b.aU();
|
||||
}
|
||||
|
||||
this.b.m(entityliving);
|
||||
|
@ -53,9 +53,9 @@ public abstract class PathfinderGoalTarget extends PathfinderGoal {
|
||||
}
|
||||
|
||||
protected double f() {
|
||||
AttributeInstance attributeinstance = this.c.a(GenericAttributes.b);
|
||||
AttributeInstance attributeinstance = this.c.getAttributeInstance(GenericAttributes.b);
|
||||
|
||||
return attributeinstance == null ? 16.0D : attributeinstance.e();
|
||||
return attributeinstance == null ? 16.0D : attributeinstance.getValue();
|
||||
}
|
||||
|
||||
public void c() {
|
||||
@ -144,7 +144,7 @@ public abstract class PathfinderGoalTarget extends PathfinderGoal {
|
||||
}
|
||||
|
||||
private boolean a(EntityLiving entityliving) {
|
||||
this.e = 10 + this.c.aB().nextInt(5);
|
||||
this.e = 10 + this.c.aC().nextInt(5);
|
||||
PathEntity pathentity = this.c.getNavigation().a(entityliving);
|
||||
|
||||
if (pathentity == null) {
|
||||
|
@ -38,9 +38,9 @@ public class PendingConnection extends Connection {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
public void c() {
|
||||
public void d() {
|
||||
if (this.h) {
|
||||
this.d();
|
||||
this.e();
|
||||
}
|
||||
|
||||
if (this.f++ == 600) {
|
||||
@ -71,8 +71,8 @@ public class PendingConnection extends Connection {
|
||||
} else {
|
||||
PublicKey publickey = this.server.H().getPublic();
|
||||
|
||||
if (packet2handshake.d() != 73) {
|
||||
if (packet2handshake.d() > 73) {
|
||||
if (packet2handshake.d() != 74) {
|
||||
if (packet2handshake.d() > 74) {
|
||||
this.disconnect("Outdated server!");
|
||||
} else {
|
||||
this.disconnect("Outdated client!");
|
||||
@ -115,7 +115,7 @@ public class PendingConnection extends Connection {
|
||||
|
||||
public void a(Packet1Login packet1login) {}
|
||||
|
||||
public void d() {
|
||||
public void e() {
|
||||
// CraftBukkit start
|
||||
EntityPlayer s = this.server.getPlayerList().attemptLogin(this, this.g, this.hostname);
|
||||
|
||||
@ -151,7 +151,7 @@ public class PendingConnection extends Connection {
|
||||
s = pingEvent.getMotd() + "\u00A7" + playerlist.getPlayerCount() + "\u00A7" + pingEvent.getMaxPlayers();
|
||||
} else {
|
||||
// CraftBukkit start - Don't create a list from an array
|
||||
Object[] list = new Object[] { 1, 73, this.server.getVersion(), pingEvent.getMotd(), playerlist.getPlayerCount(), pingEvent.getMaxPlayers() };
|
||||
Object[] list = new Object[] { 1, 74, this.server.getVersion(), pingEvent.getMotd(), playerlist.getPlayerCount(), pingEvent.getMaxPlayers() };
|
||||
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for (Object object : list) {
|
||||
@ -197,6 +197,10 @@ public class PendingConnection extends Connection {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean c() {
|
||||
return this.b;
|
||||
}
|
||||
|
||||
static String a(PendingConnection pendingconnection) {
|
||||
return pendingconnection.loginKey;
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ class PlayerChunk {
|
||||
i = this.location.x * 16 + (this.dirtyBlocks[0] >> 12 & 15);
|
||||
j = this.dirtyBlocks[0] & 255;
|
||||
k = this.location.z * 16 + (this.dirtyBlocks[0] >> 8 & 15);
|
||||
this.sendAll(new Packet51MapChunk(PlayerChunkMap.a(this.playerChunkMap).getChunkAt(this.location.x, this.location.z), (this.f == 0xFFFF), this.f)); // CraftBukkit - send everything (including biome) if all sections flagged
|
||||
this.sendAll(new Packet53BlockChange(i, j, k, PlayerChunkMap.a(this.playerChunkMap)));
|
||||
if (PlayerChunkMap.a(this.playerChunkMap).isTileEntity(i, j, k)) {
|
||||
this.sendTileEntity(PlayerChunkMap.a(this.playerChunkMap).getTileEntity(i, j, k));
|
||||
}
|
||||
@ -134,7 +134,7 @@ class PlayerChunk {
|
||||
if (this.dirtyCount == 64) {
|
||||
i = this.location.x * 16;
|
||||
j = this.location.z * 16;
|
||||
this.sendAll(new Packet51MapChunk(PlayerChunkMap.a(this.playerChunkMap).getChunkAt(this.location.x, this.location.z), false, this.f));
|
||||
this.sendAll(new Packet51MapChunk(PlayerChunkMap.a(this.playerChunkMap).getChunkAt(this.location.x, this.location.z), (this.f == 0xFFFF), this.f)); // CraftBukkit - send everything (including biome) if all sections flagged
|
||||
|
||||
for (k = 0; k < 16; ++k) {
|
||||
if ((this.f & 1 << k) != 0) {
|
||||
|
@ -111,7 +111,7 @@ public class PlayerConnection extends Connection {
|
||||
private final static HashSet<Integer> invalidItems = new HashSet<Integer>(java.util.Arrays.asList(8, 9, 10, 11, 26, 34, 36, 43, 51, 52, 55, 59, 60, 62, 63, 64, 68, 71, 74, 75, 83, 90, 92, 93, 94, 95, 104, 105, 115, 117, 118, 119, 125, 127, 132, 137, 140, 141, 142, 144)); // TODO: Check after every update.
|
||||
// CraftBukkit end
|
||||
|
||||
public void d() {
|
||||
public void e() {
|
||||
this.g = false;
|
||||
++this.e;
|
||||
this.minecraftServer.methodProfiler.a("packetflow");
|
||||
@ -263,47 +263,26 @@ public class PlayerConnection extends Connection {
|
||||
double d1;
|
||||
double d2;
|
||||
double d3;
|
||||
double d4;
|
||||
|
||||
if (this.player.vehicle != null) {
|
||||
float f = this.player.yaw;
|
||||
float f1 = this.player.pitch;
|
||||
|
||||
this.player.vehicle.U();
|
||||
this.player.vehicle.V();
|
||||
d1 = this.player.locX;
|
||||
d2 = this.player.locY;
|
||||
d3 = this.player.locZ;
|
||||
double d5 = 0.0D;
|
||||
|
||||
d4 = 0.0D;
|
||||
if (packet10flying.hasLook) {
|
||||
f = packet10flying.yaw;
|
||||
f1 = packet10flying.pitch;
|
||||
}
|
||||
|
||||
if (packet10flying.hasPos && packet10flying.y == -999.0D && packet10flying.stance == -999.0D) {
|
||||
if (Math.abs(packet10flying.x) > 1.0D || Math.abs(packet10flying.z) > 1.0D) {
|
||||
System.err.println(this.player.getName() + " was caught trying to crash the server with an invalid position.");
|
||||
this.disconnect("Nope!");
|
||||
return;
|
||||
}
|
||||
|
||||
d5 = packet10flying.x;
|
||||
d4 = packet10flying.z;
|
||||
}
|
||||
|
||||
this.player.onGround = packet10flying.g;
|
||||
this.player.h();
|
||||
this.player.move(d5, 0.0D, d4);
|
||||
this.player.X = 0.0F;
|
||||
this.player.setLocation(d1, d2, d3, f, f1);
|
||||
this.player.motX = d5;
|
||||
this.player.motZ = d4;
|
||||
if (this.player.vehicle != null) {
|
||||
// worldserver.vehicleEnteredWorld(this.player.vehicle, true); // CraftBukkit - removed
|
||||
}
|
||||
|
||||
if (this.player.vehicle != null) {
|
||||
this.player.vehicle.U();
|
||||
this.player.vehicle.V();
|
||||
}
|
||||
|
||||
this.minecraftServer.getPlayerList().d(this.player);
|
||||
@ -338,6 +317,8 @@ public class PlayerConnection extends Connection {
|
||||
packet10flying.hasPos = false;
|
||||
}
|
||||
|
||||
double d4;
|
||||
|
||||
if (packet10flying.hasPos) {
|
||||
d1 = packet10flying.x;
|
||||
d2 = packet10flying.y;
|
||||
@ -369,17 +350,17 @@ public class PlayerConnection extends Connection {
|
||||
}
|
||||
|
||||
d4 = d1 - this.player.locX;
|
||||
double d6 = d2 - this.player.locY;
|
||||
double d7 = d3 - this.player.locZ;
|
||||
double d5 = d2 - this.player.locY;
|
||||
double d6 = d3 - this.player.locZ;
|
||||
// CraftBukkit start - min to max
|
||||
double d8 = Math.max(Math.abs(d4), Math.abs(this.player.motX));
|
||||
double d9 = Math.max(Math.abs(d6), Math.abs(this.player.motY));
|
||||
double d10 = Math.max(Math.abs(d7), Math.abs(this.player.motZ));
|
||||
double d7 = Math.max(Math.abs(d4), Math.abs(this.player.motX));
|
||||
double d8 = Math.max(Math.abs(d5), Math.abs(this.player.motY));
|
||||
double d9 = Math.max(Math.abs(d6), Math.abs(this.player.motZ));
|
||||
// CraftBukkit end
|
||||
double d11 = d8 * d8 + d9 * d9 + d10 * d10;
|
||||
double d10 = d7 * d7 + d8 * d8 + d9 * d9;
|
||||
|
||||
if (d11 > 100.0D && this.checkMovement && (!this.minecraftServer.K() || !this.minecraftServer.H().equals(this.player.getName()))) { // CraftBukkit - Added this.checkMovement condition to solve this check being triggered by teleports
|
||||
this.minecraftServer.getLogger().warning(this.player.getName() + " moved too quickly! " + d4 + "," + d6 + "," + d7 + " (" + d8 + ", " + d9 + ", " + d10 + ")");
|
||||
if (d10 > 100.0D && this.checkMovement && (!this.minecraftServer.K() || !this.minecraftServer.J().equals(this.player.getName()))) { // CraftBukkit - Added this.checkMovement condition to solve this check being triggered by teleports
|
||||
this.minecraftServer.getLogger().warning(this.player.getName() + " moved too quickly! " + d4 + "," + d5 + "," + d6 + " (" + d7 + ", " + d8 + ", " + d9 + ")");
|
||||
this.a(this.y, this.z, this.p, this.player.yaw, this.player.pitch);
|
||||
return;
|
||||
}
|
||||
@ -387,26 +368,26 @@ public class PlayerConnection extends Connection {
|
||||
float f4 = 0.0625F;
|
||||
boolean flag = worldserver.getCubes(this.player, this.player.boundingBox.clone().shrink((double) f4, (double) f4, (double) f4)).isEmpty();
|
||||
|
||||
if (this.player.onGround && !packet10flying.g && d6 > 0.0D) {
|
||||
if (this.player.onGround && !packet10flying.g && d5 > 0.0D) {
|
||||
this.player.a(0.2F);
|
||||
}
|
||||
|
||||
this.player.move(d4, d6, d7);
|
||||
this.player.move(d4, d5, d6);
|
||||
this.player.onGround = packet10flying.g;
|
||||
this.player.checkMovement(d4, d6, d7);
|
||||
double d12 = d6;
|
||||
this.player.checkMovement(d4, d5, d6);
|
||||
double d11 = d5;
|
||||
|
||||
d4 = d1 - this.player.locX;
|
||||
d6 = d2 - this.player.locY;
|
||||
if (d6 > -0.5D || d6 < 0.5D) {
|
||||
d6 = 0.0D;
|
||||
d5 = d2 - this.player.locY;
|
||||
if (d5 > -0.5D || d5 < 0.5D) {
|
||||
d5 = 0.0D;
|
||||
}
|
||||
|
||||
d7 = d3 - this.player.locZ;
|
||||
d11 = d4 * d4 + d6 * d6 + d7 * d7;
|
||||
d6 = d3 - this.player.locZ;
|
||||
d10 = d4 * d4 + d5 * d5 + d6 * d6;
|
||||
boolean flag1 = false;
|
||||
|
||||
if (d11 > 0.0625D && !this.player.isSleeping() && !this.player.playerInteractManager.isCreative()) {
|
||||
if (d10 > 0.0625D && !this.player.isSleeping() && !this.player.playerInteractManager.isCreative()) {
|
||||
flag1 = true;
|
||||
this.minecraftServer.getLogger().warning(this.player.getName() + " moved wrongly!");
|
||||
}
|
||||
@ -422,7 +403,7 @@ public class PlayerConnection extends Connection {
|
||||
AxisAlignedBB axisalignedbb = this.player.boundingBox.clone().grow((double) f4, (double) f4, (double) f4).a(0.0D, -0.55D, 0.0D);
|
||||
|
||||
if (!this.minecraftServer.getAllowFlight() && !this.player.abilities.canFly && !worldserver.c(axisalignedbb)) { // CraftBukkit - check abilities instead of creative mode
|
||||
if (d12 >= -0.03125D) {
|
||||
if (d11 >= -0.03125D) {
|
||||
++this.f;
|
||||
if (this.f > 80) {
|
||||
this.minecraftServer.getLogger().warning(this.player.getName() + " was kicked for floating too long!");
|
||||
@ -518,7 +499,7 @@ public class PlayerConnection extends Connection {
|
||||
} else if (packet14blockdig.e == 3) {
|
||||
this.player.a(true);
|
||||
} else if (packet14blockdig.e == 5) {
|
||||
this.player.bo();
|
||||
this.player.bs();
|
||||
} else {
|
||||
boolean flag = false;
|
||||
|
||||
@ -1029,7 +1010,7 @@ public class PlayerConnection extends Connection {
|
||||
if (event.isCancelled()) return;
|
||||
// CraftBukkit end
|
||||
|
||||
this.player.aR();
|
||||
this.player.aU();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1108,7 +1089,7 @@ public class PlayerConnection extends Connection {
|
||||
if (event.isCancelled()) {
|
||||
if (itemInHand != null && itemInHand.id == Item.LEASH.id && entity instanceof EntityInsentient) {
|
||||
// Refresh the current leash state
|
||||
this.sendPacket(new Packet39AttachEntity(1, entity, ((EntityInsentient) entity).bE()));
|
||||
this.sendPacket(new Packet39AttachEntity(1, entity, ((EntityInsentient) entity).bI()));
|
||||
}
|
||||
if (itemInHand != null && itemInHand.id == Item.NAME_TAG.id && entity instanceof EntityInsentient) {
|
||||
// Refresh the current entity metadata
|
||||
@ -1564,7 +1545,7 @@ public class PlayerConnection extends Connection {
|
||||
if (tileentity instanceof TileEntitySign) {
|
||||
TileEntitySign tileentitysign = (TileEntitySign) tileentity;
|
||||
|
||||
if (!tileentitysign.a()) {
|
||||
if (!tileentitysign.a() || tileentitysign.b() != this.player) {
|
||||
this.minecraftServer.warning("Player " + this.player.getName() + " just tried to change non-editable sign");
|
||||
this.sendPacket(new Packet130UpdateSign(packet130updatesign.x, packet130updatesign.y, packet130updatesign.z, tileentitysign.lines)); // CraftBukkit
|
||||
return;
|
||||
@ -1824,4 +1805,8 @@ public class PlayerConnection extends Connection {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean c() {
|
||||
return this.disconnected;
|
||||
}
|
||||
}
|
||||
|
@ -261,7 +261,7 @@ public class PlayerInteractManager {
|
||||
event.setCancelled(this.gamemode.isAdventure() && !this.player.d(i, j, k));
|
||||
|
||||
// Sword + Creative mode pre-cancel
|
||||
event.setCancelled(event.isCancelled() || (this.gamemode.d() && this.player.aV() != null && this.player.aV().getItem() instanceof ItemSword));
|
||||
event.setCancelled(event.isCancelled() || (this.gamemode.d() && this.player.aY() != null && this.player.aY().getItem() instanceof ItemSword));
|
||||
|
||||
// Calculate default block experience
|
||||
Block nmsBlock = Block.byId[block.getTypeId()];
|
||||
@ -311,13 +311,13 @@ public class PlayerInteractManager {
|
||||
if (this.isCreative()) {
|
||||
this.player.playerConnection.sendPacket(new Packet53BlockChange(i, j, k, this.world));
|
||||
} else {
|
||||
ItemStack itemstack = this.player.bt();
|
||||
ItemStack itemstack = this.player.bx();
|
||||
boolean flag1 = this.player.a(Block.byId[l]);
|
||||
|
||||
if (itemstack != null) {
|
||||
itemstack.a(this.world, l, i, j, k, this.player);
|
||||
if (itemstack.count == 0) {
|
||||
this.player.bu();
|
||||
this.player.by();
|
||||
}
|
||||
}
|
||||
|
||||
@ -356,7 +356,7 @@ public class PlayerInteractManager {
|
||||
entityhuman.inventory.items[entityhuman.inventory.itemInHandIndex] = null;
|
||||
}
|
||||
|
||||
if (!entityhuman.bm()) {
|
||||
if (!entityhuman.bq()) {
|
||||
((EntityPlayer) entityhuman).updateInventory(entityhuman.defaultContainer);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
import com.google.common.base.Charsets;
|
||||
import java.io.File;
|
||||
import java.net.SocketAddress;
|
||||
import java.text.SimpleDateFormat;
|
||||
@ -91,6 +92,7 @@ public abstract class PlayerList {
|
||||
entityplayer.getBukkitEntity().sendSupportedChannels();
|
||||
// CraftBukkit end
|
||||
|
||||
playerconnection.sendPacket(new Packet250CustomPayload("MC|Brand", this.getServer().getServerModName().getBytes(Charsets.UTF_8)));
|
||||
playerconnection.sendPacket(new Packet6SpawnPosition(chunkcoordinates.x, chunkcoordinates.y, chunkcoordinates.z));
|
||||
playerconnection.sendPacket(new Packet202Abilities(entityplayer.abilities));
|
||||
playerconnection.sendPacket(new Packet16BlockItemSwitch(entityplayer.inventory.itemInHandIndex));
|
||||
@ -260,9 +262,9 @@ public abstract class PlayerList {
|
||||
this.b(entityplayer);
|
||||
WorldServer worldserver = entityplayer.p();
|
||||
|
||||
if (entityplayer.vehicle != null) {
|
||||
if (entityplayer.vehicle != null && !(entityplayer.vehicle instanceof EntityPlayer)) { // CraftBukkit - Don't remove players
|
||||
worldserver.removeEntity(entityplayer.vehicle);
|
||||
System.out.println("removing player mount");
|
||||
// System.out.println("removing player mount"); // CraftBukkit - Removed debug message
|
||||
}
|
||||
|
||||
worldserver.kill(entityplayer);
|
||||
@ -840,8 +842,8 @@ public abstract class PlayerList {
|
||||
|
||||
if ((world == null || entityplayer.world == world) && (s == null || flag1 != s.equalsIgnoreCase(entityplayer.getLocalizedName()))) {
|
||||
if (s1 != null) {
|
||||
ScoreboardTeam scoreboardteam = entityplayer.getScoreboardTeam();
|
||||
String s2 = scoreboardteam == null ? "" : scoreboardteam.getName();
|
||||
ScoreboardTeamBase scoreboardteambase = entityplayer.getScoreboardTeam();
|
||||
String s2 = scoreboardteambase == null ? "" : scoreboardteambase.getName();
|
||||
|
||||
if (flag2 == s1.equalsIgnoreCase(s2)) {
|
||||
continue;
|
||||
|
@ -215,7 +215,7 @@ public class PortalTravelAgent {
|
||||
j2 = 1;
|
||||
}
|
||||
|
||||
int k2 = entity.ar();
|
||||
int k2 = entity.as();
|
||||
|
||||
if (j2 > -1) {
|
||||
int l2 = Direction.h[j2];
|
||||
|
@ -160,7 +160,7 @@ public final class SpawnerCreature {
|
||||
groupdataentity = entityinsentient.a(groupdataentity);
|
||||
worldserver.addEntity(entityinsentient, SpawnReason.NATURAL);
|
||||
// CraftBukkit end
|
||||
if (j2 >= entityinsentient.br()) {
|
||||
if (j2 >= entityinsentient.bv()) {
|
||||
continue label110;
|
||||
}
|
||||
}
|
||||
|
@ -266,7 +266,7 @@ public class TileEntityHopper extends TileEntity implements IHopper {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
EntityItem entityitem = getEntityItemAt(ihopper.getWorld(), ihopper.az(), ihopper.aA() + 1.0D, ihopper.aB());
|
||||
EntityItem entityitem = getEntityItemAt(ihopper.getWorld(), ihopper.aA(), ihopper.aB() + 1.0D, ihopper.aC());
|
||||
|
||||
if (entityitem != null) {
|
||||
return addEntityItem(ihopper, entityitem);
|
||||
@ -423,7 +423,7 @@ public class TileEntityHopper extends TileEntity implements IHopper {
|
||||
}
|
||||
|
||||
public static IInventory getSourceInventory(IHopper ihopper) {
|
||||
return getInventoryAt(ihopper.getWorld(), ihopper.az(), ihopper.aA() + 1.0D, ihopper.aB());
|
||||
return getInventoryAt(ihopper.getWorld(), ihopper.aA(), ihopper.aB() + 1.0D, ihopper.aC());
|
||||
}
|
||||
|
||||
public static EntityItem getEntityItemAt(World world, double d0, double d1, double d2) {
|
||||
@ -466,15 +466,15 @@ public class TileEntityHopper extends TileEntity implements IHopper {
|
||||
return itemstack.id != itemstack1.id ? false : (itemstack.getData() != itemstack1.getData() ? false : (itemstack.count > itemstack.getMaxStackSize() ? false : ItemStack.equals(itemstack, itemstack1)));
|
||||
}
|
||||
|
||||
public double az() {
|
||||
public double aA() {
|
||||
return (double) this.x;
|
||||
}
|
||||
|
||||
public double aA() {
|
||||
public double aB() {
|
||||
return (double) this.y;
|
||||
}
|
||||
|
||||
public double aB() {
|
||||
public double aC() {
|
||||
return (double) this.z;
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@ public class TileEntitySign extends TileEntity {
|
||||
public String[] lines = new String[] { "", "", "", ""};
|
||||
public int b = -1;
|
||||
public boolean isEditable = true; // CraftBukkit - private -> public
|
||||
private EntityHuman d;
|
||||
|
||||
public TileEntitySign() {}
|
||||
|
||||
@ -47,4 +48,12 @@ public class TileEntitySign extends TileEntity {
|
||||
public boolean a() {
|
||||
return this.isEditable;
|
||||
}
|
||||
|
||||
public void a(EntityHuman entityhuman) {
|
||||
this.d = entityhuman;
|
||||
}
|
||||
|
||||
public EntityHuman b() {
|
||||
return this.d;
|
||||
}
|
||||
}
|
||||
|
@ -1347,10 +1347,10 @@ public abstract class World implements IBlockAccess {
|
||||
entity.lastYaw = entity.yaw;
|
||||
entity.lastPitch = entity.pitch;
|
||||
if (flag && entity.ai) {
|
||||
++entity.ticksLived;
|
||||
if (entity.vehicle != null) {
|
||||
entity.T();
|
||||
entity.U();
|
||||
} else {
|
||||
++entity.ticksLived;
|
||||
entity.l_();
|
||||
}
|
||||
}
|
||||
@ -1549,7 +1549,7 @@ public abstract class World implements IBlockAccess {
|
||||
}
|
||||
}
|
||||
|
||||
if (vec3d.b() > 0.0D && entity.av()) {
|
||||
if (vec3d.b() > 0.0D && entity.aw()) {
|
||||
vec3d = vec3d.a();
|
||||
double d1 = 0.014D;
|
||||
|
||||
@ -2339,7 +2339,7 @@ public abstract class World implements IBlockAccess {
|
||||
// CraftBukkit start - Split out persistent check, don't apply it to special persistent mobs
|
||||
if (entity instanceof EntityInsentient) {
|
||||
EntityInsentient entityinsentient = (EntityInsentient) entity;
|
||||
if (entityinsentient.isTypeNotPersistent() && entityinsentient.bA()) { // Should be isPersistent
|
||||
if (entityinsentient.isTypeNotPersistent() && entityinsentient.isPersistent()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -2565,7 +2565,7 @@ public abstract class World implements IBlockAccess {
|
||||
}
|
||||
|
||||
if (entityhuman1.isInvisible()) {
|
||||
float f = entityhuman1.bs();
|
||||
float f = entityhuman1.bw();
|
||||
|
||||
if (f < 0.1F) {
|
||||
f = 0.1F;
|
||||
|
@ -610,24 +610,10 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
entity.die();
|
||||
}
|
||||
|
||||
if (!(entity.passenger instanceof EntityHuman)) {
|
||||
super.entityJoinedWorld(entity, flag);
|
||||
}
|
||||
super.entityJoinedWorld(entity, flag);
|
||||
}
|
||||
// CraftBukkit end */
|
||||
|
||||
public void vehicleEnteredWorld(Entity entity, boolean flag) {
|
||||
try {
|
||||
super.entityJoinedWorld(entity, flag);
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.a(throwable, "Forcefully ticking entity");
|
||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being force ticked");
|
||||
|
||||
entity.a(crashreportsystemdetails);
|
||||
throw new ReportedException(crashreport);
|
||||
}
|
||||
}
|
||||
|
||||
protected IChunkProvider j() {
|
||||
IChunkLoader ichunkloader = this.dataManager.createChunkLoader(this.worldProvider);
|
||||
|
||||
@ -799,7 +785,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
protected void a(Entity entity) {
|
||||
super.a(entity);
|
||||
this.entitiesById.a(entity.id, entity);
|
||||
Entity[] aentity = entity.am();
|
||||
Entity[] aentity = entity.an();
|
||||
|
||||
if (aentity != null) {
|
||||
for (int i = 0; i < aentity.length; ++i) {
|
||||
@ -811,7 +797,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
protected void b(Entity entity) {
|
||||
super.b(entity);
|
||||
this.entitiesById.d(entity.id);
|
||||
Entity[] aentity = entity.am();
|
||||
Entity[] aentity = entity.an();
|
||||
|
||||
if (aentity != null) {
|
||||
for (int i = 0; i < aentity.length; ++i) {
|
||||
|
@ -90,7 +90,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
public void setMaxHealth(double amount) {
|
||||
Validate.isTrue(amount > 0, "Max health must be greater than 0");
|
||||
|
||||
getHandle().a(GenericAttributes.a).a(amount);
|
||||
getHandle().getAttributeInstance(GenericAttributes.a).setValue(amount);
|
||||
|
||||
if (getHealth() > amount) {
|
||||
setHealth(amount);
|
||||
|
@ -64,6 +64,12 @@ public class CraftPotionEffectType extends PotionEffectType {
|
||||
return "POISON";
|
||||
case 20:
|
||||
return "WITHER";
|
||||
case 21:
|
||||
return "HEALTH_BOOST";
|
||||
case 22:
|
||||
return "ABSORPTION";
|
||||
case 23:
|
||||
return "SATURATION";
|
||||
default:
|
||||
return "UNKNOWN_EFFECT_TYPE_" + handle.id;
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren