summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pom.xml6
-rw-r--r--src/main/java/net/minecraft/server/BlockLeaves.java2
-rw-r--r--src/main/java/net/minecraft/server/BlockPistonExtension.java13
-rw-r--r--src/main/java/net/minecraft/server/BlockPortal.java4
-rw-r--r--src/main/java/net/minecraft/server/BlockPressurePlateBinary.java2
-rw-r--r--src/main/java/net/minecraft/server/BlockSkull.java4
-rw-r--r--src/main/java/net/minecraft/server/BlockTripwire.java4
-rw-r--r--src/main/java/net/minecraft/server/BlockVine.java2
-rw-r--r--src/main/java/net/minecraft/server/Chunk.java4
-rw-r--r--src/main/java/net/minecraft/server/ContainerHorse.java6
-rw-r--r--src/main/java/net/minecraft/server/ControllerMove.java2
-rw-r--r--src/main/java/net/minecraft/server/CraftingManager.java1
-rw-r--r--src/main/java/net/minecraft/server/DedicatedServer.java2
-rw-r--r--src/main/java/net/minecraft/server/DedicatedServerConnectionThread.java2
-rw-r--r--src/main/java/net/minecraft/server/Entity.java66
-rw-r--r--src/main/java/net/minecraft/server/EntityArrow.java4
-rw-r--r--src/main/java/net/minecraft/server/EntityBlaze.java16
-rw-r--r--src/main/java/net/minecraft/server/EntityBoat.java6
-rw-r--r--src/main/java/net/minecraft/server/EntityChicken.java14
-rw-r--r--src/main/java/net/minecraft/server/EntityCow.java16
-rw-r--r--src/main/java/net/minecraft/server/EntityCreature.java51
-rw-r--r--src/main/java/net/minecraft/server/EntityCreeper.java18
-rw-r--r--src/main/java/net/minecraft/server/EntityDamageSourceIndirect.java2
-rw-r--r--src/main/java/net/minecraft/server/EntityEnderDragon.java24
-rw-r--r--src/main/java/net/minecraft/server/EntityEnderman.java32
-rw-r--r--src/main/java/net/minecraft/server/EntityExperienceOrb.java2
-rw-r--r--src/main/java/net/minecraft/server/EntityFireball.java4
-rw-r--r--src/main/java/net/minecraft/server/EntityFireworks.java2
-rw-r--r--src/main/java/net/minecraft/server/EntityFishingHook.java2
-rw-r--r--src/main/java/net/minecraft/server/EntityGhast.java18
-rw-r--r--src/main/java/net/minecraft/server/EntityHanging.java4
-rw-r--r--src/main/java/net/minecraft/server/EntityHorse.java522
-rw-r--r--src/main/java/net/minecraft/server/EntityHuman.java136
-rw-r--r--src/main/java/net/minecraft/server/EntityInsentient.java90
-rw-r--r--src/main/java/net/minecraft/server/EntityIronGolem.java34
-rw-r--r--src/main/java/net/minecraft/server/EntityItem.java2
-rw-r--r--src/main/java/net/minecraft/server/EntityLiving.java255
-rw-r--r--src/main/java/net/minecraft/server/EntityMagmaCube.java34
-rw-r--r--src/main/java/net/minecraft/server/EntityMinecartAbstract.java4
-rw-r--r--src/main/java/net/minecraft/server/EntityMonster.java10
-rw-r--r--src/main/java/net/minecraft/server/EntityOcelot.java26
-rw-r--r--src/main/java/net/minecraft/server/EntityPig.java24
-rw-r--r--src/main/java/net/minecraft/server/EntityPigZombie.java22
-rw-r--r--src/main/java/net/minecraft/server/EntityPlayer.java23
-rw-r--r--src/main/java/net/minecraft/server/EntityProjectile.java2
-rw-r--r--src/main/java/net/minecraft/server/EntitySheep.java18
-rw-r--r--src/main/java/net/minecraft/server/EntitySilverfish.java24
-rw-r--r--src/main/java/net/minecraft/server/EntitySkeleton.java50
-rw-r--r--src/main/java/net/minecraft/server/EntitySlime.java52
-rw-r--r--src/main/java/net/minecraft/server/EntitySnowman.java12
-rw-r--r--src/main/java/net/minecraft/server/EntitySpider.java22
-rw-r--r--src/main/java/net/minecraft/server/EntitySquid.java16
-rw-r--r--src/main/java/net/minecraft/server/EntityTrackerEntry.java8
-rw-r--r--src/main/java/net/minecraft/server/EntityWitch.java28
-rw-r--r--src/main/java/net/minecraft/server/EntityWither.java48
-rw-r--r--src/main/java/net/minecraft/server/EntityWolf.java85
-rw-r--r--src/main/java/net/minecraft/server/EntityZombie.java94
-rw-r--r--src/main/java/net/minecraft/server/FoodMetaData.java2
-rw-r--r--src/main/java/net/minecraft/server/GroupDataZombie.java22
-rw-r--r--src/main/java/net/minecraft/server/ItemBlock.java4
-rw-r--r--src/main/java/net/minecraft/server/ItemBoat.java2
-rw-r--r--src/main/java/net/minecraft/server/ItemBucket.java11
-rw-r--r--src/main/java/net/minecraft/server/ItemFishingRod.java4
-rw-r--r--src/main/java/net/minecraft/server/ItemSign.java6
-rw-r--r--src/main/java/net/minecraft/server/ItemStack.java4
-rw-r--r--src/main/java/net/minecraft/server/MinecraftServer.java2
-rw-r--r--src/main/java/net/minecraft/server/MobEffectList.java8
-rw-r--r--src/main/java/net/minecraft/server/NetworkManager.java10
-rw-r--r--src/main/java/net/minecraft/server/Packet.java1
-rw-r--r--src/main/java/net/minecraft/server/PathfinderGoalBreakDoor.java2
-rw-r--r--src/main/java/net/minecraft/server/PathfinderGoalBreed.java12
-rw-r--r--src/main/java/net/minecraft/server/PathfinderGoalEatTile.java2
-rw-r--r--src/main/java/net/minecraft/server/PathfinderGoalMeleeAttack.java6
-rw-r--r--src/main/java/net/minecraft/server/PathfinderGoalTarget.java6
-rw-r--r--src/main/java/net/minecraft/server/PendingConnection.java16
-rw-r--r--src/main/java/net/minecraft/server/PlayerChunk.java4
-rw-r--r--src/main/java/net/minecraft/server/PlayerConnection.java81
-rw-r--r--src/main/java/net/minecraft/server/PlayerInteractManager.java8
-rw-r--r--src/main/java/net/minecraft/server/PlayerList.java10
-rw-r--r--src/main/java/net/minecraft/server/PortalTravelAgent.java2
-rw-r--r--src/main/java/net/minecraft/server/SpawnerCreature.java2
-rw-r--r--src/main/java/net/minecraft/server/TileEntityHopper.java10
-rw-r--r--src/main/java/net/minecraft/server/TileEntitySign.java9
-rw-r--r--src/main/java/net/minecraft/server/World.java10
-rw-r--r--src/main/java/net/minecraft/server/WorldServer.java20
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java6
87 files changed, 1155 insertions, 1105 deletions
diff --git a/pom.xml b/pom.xml
index 8b22a1cc..8139fbfa 100644
--- a/pom.xml
+++ b/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>
diff --git a/src/main/java/net/minecraft/server/BlockLeaves.java b/src/main/java/net/minecraft/server/BlockLeaves.java
index e3a3242c..4e979a05 100644
--- a/src/main/java/net/minecraft/server/BlockLeaves.java
+++ b/src/main/java/net/minecraft/server/BlockLeaves.java
@@ -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 {
diff --git a/src/main/java/net/minecraft/server/BlockPistonExtension.java b/src/main/java/net/minecraft/server/BlockPistonExtension.java
index 5d3d9845..06173b23 100644
--- a/src/main/java/net/minecraft/server/BlockPistonExtension.java
+++ b/src/main/java/net/minecraft/server/BlockPistonExtension.java
@@ -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
diff --git a/src/main/java/net/minecraft/server/BlockPortal.java b/src/main/java/net/minecraft/server/BlockPortal.java
index 1b0fd21f..a3632d9e 100644
--- a/src/main/java/net/minecraft/server/BlockPortal.java
+++ b/src/main/java/net/minecraft/server/BlockPortal.java
@@ -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();
}
}
}
diff --git a/src/main/java/net/minecraft/server/BlockPressurePlateBinary.java b/src/main/java/net/minecraft/server/BlockPressurePlateBinary.java
index 36642b95..27892a94 100644
--- a/src/main/java/net/minecraft/server/BlockPressurePlateBinary.java
+++ b/src/main/java/net/minecraft/server/BlockPressurePlateBinary.java
@@ -63,7 +63,7 @@ public class BlockPressurePlateBinary extends BlockPressurePlateAbstract {
}
// CraftBukkit end
- if (!entity.as()) {
+ if (!entity.at()) {
return 15;
}
}
diff --git a/src/main/java/net/minecraft/server/BlockSkull.java b/src/main/java/net/minecraft/server/BlockSkull.java
index 78449b13..0e393327 100644
--- a/src/main/java/net/minecraft/server/BlockSkull.java
+++ b/src/main/java/net/minecraft/server/BlockSkull.java
@@ -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();
diff --git a/src/main/java/net/minecraft/server/BlockTripwire.java b/src/main/java/net/minecraft/server/BlockTripwire.java
index 8bdbbf81..cdf5f1e2 100644
--- a/src/main/java/net/minecraft/server/BlockTripwire.java
+++ b/src/main/java/net/minecraft/server/BlockTripwire.java
@@ -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;
}
diff --git a/src/main/java/net/minecraft/server/BlockVine.java b/src/main/java/net/minecraft/server/BlockVine.java
index 66dcfbb6..187de073 100644
--- a/src/main/java/net/minecraft/server/BlockVine.java
+++ b/src/main/java/net/minecraft/server/BlockVine.java
@@ -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 {
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 61e56abb..5b13deaf 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -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) {
diff --git a/src/main/java/net/minecraft/server/ContainerHorse.java b/src/main/java/net/minecraft/server/ContainerHorse.java
index 4ddf8e05..43fb0cdd 100644
--- a/src/main/java/net/minecraft/server/ContainerHorse.java
+++ b/src/main/java/net/minecraft/server/ContainerHorse.java
@@ -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;
}
diff --git a/src/main/java/net/minecraft/server/ControllerMove.java b/src/main/java/net/minecraft/server/ControllerMove.java
index 246c6a36..525a4d17 100644
--- a/src/main/java/net/minecraft/server/ControllerMove.java
+++ b/src/main/java/net/minecraft/server/ControllerMove.java
@@ -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();
}
diff --git a/src/main/java/net/minecraft/server/CraftingManager.java b/src/main/java/net/minecraft/server/CraftingManager.java
index 146521e4..e9ef11bd 100644
--- a/src/main/java/net/minecraft/server/CraftingManager.java
+++ b/src/main/java/net/minecraft/server/CraftingManager.java
@@ -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});
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 0ce6c49a..95d7e5de 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -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\"");
}
diff --git a/src/main/java/net/minecraft/server/DedicatedServerConnectionThread.java b/src/main/java/net/minecraft/server/DedicatedServerConnectionThread.java
index 25265c0a..e62f7388 100644
--- a/src/main/java/net/minecraft/server/DedicatedServerConnectionThread.java
+++ b/src/main/java/net/minecraft/server/DedicatedServerConnectionThread.java
@@ -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);
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 06f85fdc..671384d5 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -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;
}
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
index affeca6e..65e7a88f 100644
--- a/src/main/java/net/minecraft/server/EntityArrow.java
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
@@ -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;
}
diff --git a/src/main/java/net/minecraft/server/EntityBlaze.java b/src/main/java/net/minecraft/server/EntityBlaze.java
index f9c0430c..ad610291 100644
--- a/src/main/java/net/minecraft/server/EntityBlaze.java
+++ b/src/main/java/net/minecraft/server/EntityBlaze.java
@@ -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;
}
diff --git a/src/main/java/net/minecraft/server/EntityBoat.java b/src/main/java/net/minecraft/server/EntityBoat.java
index 7c9b2733..e1a5dc2b 100644
--- a/src/main/java/net/minecraft/server/EntityBoat.java
+++ b/src/main/java/net/minecraft/server/EntityBoat.java
@@ -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);
}
}
diff --git a/src/main/java/net/minecraft/server/EntityChicken.java b/src/main/java/net/minecraft/server/EntityChicken.java
index b03f1ddb..d6dc9b43 100644
--- a/src/main/java/net/minecraft/server/EntityChicken.java
+++ b/src/main/java/net/minecraft/server/EntityChicken.java
@@ -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";
}
diff --git a/src/main/java/net/minecraft/server/EntityCow.java b/src/main/java/net/minecraft/server/EntityCow.java
index 9173a0a1..ed49016e 100644
--- a/src/main/java/net/minecraft/server/EntityCow.java
+++ b/src/main/java/net/minecraft/server/EntityCow.java
@@ -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;
}
diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java
index 052f2338..9642c23e 100644
--- a/src/main/java/net/minecraft/server/EntityCreature.java
+++ b/src/main/java/net/minecraft/server/EntityCreature.java
@@ -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) {}
}
diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java
index bd02091b..00c13523 100644
--- a/src/main/java/net/minecraft/server/EntityCreeper.java
+++ b/src/main/java/net/minecraft/server/EntityCreeper.java
@@ -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);
}
diff --git a/src/main/java/net/minecraft/server/EntityDamageSourceIndirect.java b/src/main/java/net/minecraft/server/EntityDamageSourceIndirect.java
index 73838198..1d1cd75c 100644
--- a/src/main/java/net/minecraft/server/EntityDamageSourceIndirect.java
+++ b/src/main/java/net/minecraft/server/EntityDamageSourceIndirect.java
@@ -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";
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
index 0bd2b60b..a8608c9e 100644
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
@@ -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;
}
diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java
index 3692aeb5..52dd1347 100644
--- a/src/main/java/net/minecraft/server/EntityEnderman.java
+++ b/src/main/java/net/minecraft/server/EntityEnderman.java
@@ -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;
}
diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
index 9a1152d0..5247d5ad 100644
--- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java
+++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
@@ -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;
}
}
diff --git a/src/main/java/net/minecraft/server/EntityFireball.java b/src/main/java/net/minecraft/server/EntityFireball.java
index a8237967..3bb90f3d 100644
--- a/src/main/java/net/minecraft/server/EntityFireball.java
+++ b/src/main/java/net/minecraft/server/EntityFireball.java
@@ -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;
diff --git a/src/main/java/net/minecraft/server/EntityFireworks.java b/src/main/java/net/minecraft/server/EntityFireworks.java
index 35fb8d43..ebf38f28 100644
--- a/src/main/java/net/minecraft/server/EntityFireworks.java
+++ b/src/main/java/net/minecraft/server/EntityFireworks.java
@@ -115,7 +115,7 @@ public class EntityFireworks extends Entity {
return super.d(f);
}
- public boolean ao() {
+ public boolean ap() {
return false;
}
}
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
index 255ff381..72aacea5 100644
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
@@ -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();
diff --git a/src/main/java/net/minecraft/server/EntityGhast.java b/src/main/java/net/minecraft/server/EntityGhast.java
index be3922a2..169d549f 100644
--- a/src/main/java/net/minecraft/server/EntityGhast.java
+++ b/src/main/java/net/minecraft/server/EntityGhast.java
@@ -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;
}
diff --git a/src/main/java/net/minecraft/server/EntityHanging.java b/src/main/java/net/minecraft/server/EntityHanging.java
index af64f750..7097a880 100644
--- a/src/main/java/net/minecraft/server/EntityHanging.java
+++ b/src/main/java/net/minecraft/server/EntityHanging.java
@@ -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);
}
diff --git a/src/main/java/net/minecraft/server/EntityHorse.java b/src/main/java/net/minecraft/server/EntityHorse.java
index 11bb4ba0..e18738a3 100644
--- a/src/main/java/net/minecraft/server/EntityHorse.java
+++ b/src/main/java/net/minecraft/server/EntityHorse.java
@@ -6,7 +6,7 @@ import java.util.List;
public class EntityHorse extends EntityAnimal implements IInventoryListener {
private static final IEntitySelector bu = new EntitySelectorHorse();
- private static final IAttribute bv = (new AttributeRanged("horse.jumpStrength", 0.7D, 0.0D, 2.0D)).a("Jump Strength").a(true);
+ private static final IAttribute attributeJumpStrength = (new AttributeRanged("horse.jumpStrength", 0.7D, 0.0D, 2.0D)).a("Jump Strength").a(true);
private static final String[] bw = new String[] { null, "textures/entity/horse/armor/horse_armor_iron.png", "textures/entity/horse/armor/horse_armor_gold.png", "textures/entity/horse/armor/horse_armor_diamond.png"};
private static final String[] bx = new String[] { "", "meo", "goo", "dio"};
private static final int[] by = new int[] { 0, 5, 7, 11};
@@ -20,7 +20,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
public int bp;
public int bq;
protected boolean br;
- private InventoryHorseChest bG;
+ private InventoryHorseChest inventoryChest;
private boolean bH;
protected int bs;
protected float bt;
@@ -39,7 +39,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
super(world);
this.a(1.4F, 1.6F);
this.fireProof = false;
- this.m(false);
+ this.setHasChest(false);
this.getNavigation().a(true);
this.goalSelector.a(0, new PathfinderGoalFloat(this));
this.goalSelector.a(1, new PathfinderGoalPanic(this, 1.2D));
@@ -49,7 +49,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
this.goalSelector.a(6, new PathfinderGoalRandomStroll(this, 0.7D));
this.goalSelector.a(7, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 6.0F));
this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this));
- this.cD();
+ this.cH();
}
protected void a() {
@@ -61,21 +61,21 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
this.datawatcher.a(22, Integer.valueOf(0));
}
- public void p(int i) {
+ public void setType(int i) {
this.datawatcher.watch(19, Byte.valueOf((byte) i));
- this.cF();
+ this.cJ();
}
- public int bP() {
+ public int getType() {
return this.datawatcher.getByte(19);
}
- public void q(int i) {
+ public void setVariant(int i) {
this.datawatcher.watch(20, Integer.valueOf(i));
- this.cF();
+ this.cJ();
}
- public int bQ() {
+ public int getVariant() {
return this.datawatcher.getInt(20);
}
@@ -83,7 +83,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
if (this.hasCustomName()) {
return this.getCustomName();
} else {
- int i = this.bP();
+ int i = this.getType();
switch (i) {
case 0:
@@ -119,23 +119,27 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
}
}
- public boolean bR() {
+ public boolean bV() {
return !this.isBaby();
}
- public boolean bS() {
+ public boolean isTame() {
return this.w(2);
}
- public boolean bW() {
- return this.bR();
+ public boolean ca() {
+ return this.bV();
+ }
+
+ public String getOwnerName() {
+ return this.datawatcher.getString(21);
}
- public void b(String s) {
+ public void setOwnerName(String s) {
this.datawatcher.watch(21, s);
}
- public float bY() {
+ public float cc() {
int i = this.getAge();
return i >= 0 ? 1.0F : 0.5F + (float) (-24000 - i) / -24000.0F * 0.5F;
@@ -143,33 +147,39 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
public void a(boolean flag) {
if (flag) {
- this.a(this.bY());
+ this.a(this.cc());
} else {
this.a(1.0F);
}
}
- public boolean bZ() {
+ public boolean cd() {
return this.br;
}
- public void j(boolean flag) {
+ public void setTame(boolean flag) {
this.b(2, flag);
}
- public void k(boolean flag) {
+ public void j(boolean flag) {
this.br = flag;
}
- public boolean bC() {
- return !this.cu() && super.bC();
+ public boolean bG() {
+ return !this.cy() && super.bG();
}
- public boolean ca() {
+ protected void o(float f) {
+ if (f > 6.0F && this.cg()) {
+ this.o(false);
+ }
+ }
+
+ public boolean hasChest() {
return this.w(8);
}
- public int cb() {
+ public int cf() {
return this.datawatcher.getInt(22);
}
@@ -177,80 +187,73 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
return itemstack == null ? 0 : (itemstack.id == Item.HORSE_ARMOR_IRON.id ? 1 : (itemstack.id == Item.HORSE_ARMOR_GOLD.id ? 2 : (itemstack.id == Item.HORSE_ARMOR_DIAMOND.id ? 3 : 0)));
}
- public boolean cc() {
+ public boolean cg() {
return this.w(32);
}
- public boolean cd() {
+ public boolean ch() {
return this.w(64);
}
- public boolean ce() {
+ public boolean ci() {
return this.w(16);
}
- public boolean cf() {
+ public boolean cj() {
return this.bH;
}
public void r(int i) {
this.datawatcher.watch(22, Integer.valueOf(i));
- this.cF();
+ this.cJ();
}
- public void l(boolean flag) {
+ public void k(boolean flag) {
this.b(16, flag);
}
- public void m(boolean flag) {
+ public void setHasChest(boolean flag) {
this.b(8, flag);
}
- public void n(boolean flag) {
+ public void m(boolean flag) {
this.bH = flag;
}
- public void o(boolean flag) {
+ public void n(boolean flag) {
this.b(4, flag);
}
- public int cg() {
+ public int getTemper() {
return this.bs;
}
- public void s(int i) {
+ public void setTemper(int i) {
this.bs = i;
}
public int t(int i) {
- int j = MathHelper.a(this.cg() + i, 0, this.cm());
+ int j = MathHelper.a(this.getTemper() + i, 0, this.cq());
- this.s(j);
+ this.setTemper(j);
return j;
}
public boolean damageEntity(DamageSource damagesource, float f) {
Entity entity = damagesource.getEntity();
- if (this.passenger != null && this.passenger.equals(entity)) {
- return false;
- } else if (entity instanceof EntityWolf) {
- ((EntityWolf) entity).setTarget((Entity) null);
- return false;
- } else {
- return super.damageEntity(damagesource, f);
- }
+ return this.passenger != null && this.passenger.equals(entity) ? false : super.damageEntity(damagesource, f);
}
- public int aM() {
- return by[this.cb()];
+ public int aP() {
+ return by[this.cf()];
}
public boolean L() {
return this.passenger == null;
}
- public boolean ch() {
+ public boolean cl() {
int i = MathHelper.floor(this.locX);
int j = MathHelper.floor(this.locZ);
@@ -258,15 +261,15 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
return true;
}
- public void ci() {
- if (!this.world.isStatic && this.ca()) {
+ public void cm() {
+ if (!this.world.isStatic && this.hasChest()) {
this.b(Block.CHEST.id, 1);
- this.m(false);
+ this.setHasChest(false);
}
}
- private void cB() {
- this.cI();
+ private void cF() {
+ this.cM();
this.world.makeSound(this, "eating", 1.0F, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.2F);
}
@@ -293,63 +296,63 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
}
}
- private int cC() {
- int i = this.bP();
+ private int cG() {
+ int i = this.getType();
- return this.ca() && (i == 1 || i == 2) ? 17 : 2;
+ return this.hasChest() && (i == 1 || i == 2) ? 17 : 2;
}
- private void cD() {
- InventoryHorseChest inventoryhorsechest = this.bG;
+ private void cH() {
+ InventoryHorseChest inventoryhorsechest = this.inventoryChest;
- this.bG = new InventoryHorseChest("HorseChest", this.cC());
- this.bG.a(this.getLocalizedName());
+ this.inventoryChest = new InventoryHorseChest("HorseChest", this.cG());
+ this.inventoryChest.a(this.getLocalizedName());
if (inventoryhorsechest != null) {
inventoryhorsechest.b(this);
- int i = Math.min(inventoryhorsechest.getSize(), this.bG.getSize());
+ int i = Math.min(inventoryhorsechest.getSize(), this.inventoryChest.getSize());
for (int j = 0; j < i; ++j) {
ItemStack itemstack = inventoryhorsechest.getItem(j);
if (itemstack != null) {
- this.bG.setItem(j, itemstack.cloneItemStack());
+ this.inventoryChest.setItem(j, itemstack.cloneItemStack());
}
}
inventoryhorsechest = null;
}
- this.bG.a(this);
- this.cE();
+ this.inventoryChest.a(this);
+ this.cI();
}
- private void cE() {
+ private void cI() {
if (!this.world.isStatic) {
- this.o(this.bG.getItem(0) != null);
- if (this.cr()) {
- this.r(this.d(this.bG.getItem(1)));
+ this.n(this.inventoryChest.getItem(0) != null);
+ if (this.cv()) {
+ this.r(this.d(this.inventoryChest.getItem(1)));
}
}
}
public void a(InventorySubcontainer inventorysubcontainer) {
- int i = this.cb();
- boolean flag = this.ck();
+ int i = this.cf();
+ boolean flag = this.co();
- this.cE();
+ this.cI();
if (this.ticksLived > 20) {
- if (i == 0 && i != this.cb()) {
+ if (i == 0 && i != this.cf()) {
this.makeSound("mob.horse.armor", 0.5F, 1.0F);
}
- if (!flag && this.ck()) {
+ if (!flag && this.co()) {
this.makeSound("mob.horse.leather", 0.5F, 1.0F);
}
}
}
public boolean canSpawn() {
- this.ch();
+ this.cl();
return super.canSpawn();
}
@@ -372,54 +375,54 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
return (EntityHorse) entity1;
}
- public double cj() {
- return this.a(bv).e();
+ public double getJumpStrength() {
+ return this.getAttributeInstance(attributeJumpStrength).getValue();
}
- protected String aL() {
- this.cI();
- int i = this.bP();
+ protected String aO() {
+ this.cM();
+ int i = this.getType();
return i == 3 ? "mob.horse.zombie.death" : (i == 4 ? "mob.horse.skeleton.death" : (i != 1 && i != 2 ? "mob.horse.death" : "mob.horse.donkey.death"));
}
protected int getLootId() {
boolean flag = this.random.nextInt(4) == 0;
- int i = this.bP();
+ int i = this.getType();
return i == 4 ? Item.BONE.id : (i == 3 ? (flag ? 0 : Item.ROTTEN_FLESH.id) : Item.LEATHER.id);
}
- protected String aK() {
- this.cI();
+ protected String aN() {
+ this.cM();
if (this.random.nextInt(3) == 0) {
- this.cK();
+ this.cO();
}
- int i = this.bP();
+ int i = this.getType();
return i == 3 ? "mob.horse.zombie.hit" : (i == 4 ? "mob.horse.skeleton.hit" : (i != 1 && i != 2 ? "mob.horse.hit" : "mob.horse.donkey.hit"));
}
- public boolean ck() {
+ public boolean co() {
return this.w(4);
}
protected String r() {
- this.cI();
- if (this.random.nextInt(10) == 0 && !this.aY()) {
- this.cK();
+ this.cM();
+ if (this.random.nextInt(10) == 0 && !this.bb()) {
+ this.cO();
}
- int i = this.bP();
+ int i = this.getType();
return i == 3 ? "mob.horse.zombie.idle" : (i == 4 ? "mob.horse.skeleton.idle" : (i != 1 && i != 2 ? "mob.horse.idle" : "mob.horse.donkey.idle"));
}
- protected String cl() {
- this.cI();
- this.cK();
- int i = this.bP();
+ protected String cp() {
+ this.cM();
+ this.cO();
+ int i = this.getType();
return i != 3 && i != 4 ? (i != 1 && i != 2 ? "mob.horse.angry" : "mob.horse.donkey.angry") : null;
}
@@ -432,7 +435,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
}
if (!Block.byId[l].material.isLiquid()) {
- int i1 = this.bP();
+ int i1 = this.getType();
if (this.passenger != null && i1 != 1 && i1 != 2) {
++this.bP;
@@ -452,22 +455,22 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
}
}
- protected void ax() {
- super.ax();
- this.aT().b(bv);
- this.a(GenericAttributes.a).a(53.0D);
- this.a(GenericAttributes.d).a(0.22499999403953552D);
+ protected void ay() {
+ super.ay();
+ this.aW().b(attributeJumpStrength);
+ this.getAttributeInstance(GenericAttributes.a).setValue(53.0D);
+ this.getAttributeInstance(GenericAttributes.d).setValue(0.22499999403953552D);
}
- public int br() {
+ public int bv() {
return 6;
}
- public int cm() {
+ public int cq() {
return 100;
}
- protected float aW() {
+ protected float aZ() {
return 0.8F;
}
@@ -475,14 +478,14 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
return 400;
}
- private void cF() {
+ private void cJ() {
this.bQ = null;
}
public void f(EntityHuman entityhuman) {
- if (!this.world.isStatic && (this.passenger == null || this.passenger == entityhuman) && this.bS()) {
- this.bG.a(this.getLocalizedName());
- entityhuman.openHorseInventory(this, this.bG);
+ if (!this.world.isStatic && (this.passenger == null || this.passenger == entityhuman) && this.isTame()) {
+ this.inventoryChest.a(this.getLocalizedName());
+ entityhuman.openHorseInventory(this, this.inventoryChest);
}
}
@@ -491,18 +494,18 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
if (itemstack != null && itemstack.id == Item.MONSTER_EGG.id) {
return super.a(entityhuman);
- } else if (!this.bS() && this.cu()) {
+ } else if (!this.isTame() && this.cy()) {
return false;
- } else if (this.bS() && this.bR() && entityhuman.isSneaking()) {
+ } else if (this.isTame() && this.bV() && entityhuman.isSneaking()) {
this.f(entityhuman);
return true;
- } else if (this.bW() && this.passenger != null) {
+ } else if (this.ca() && this.passenger != null) {
return super.a(entityhuman);
} else {
if (itemstack != null) {
boolean flag = false;
- if (this.cr()) {
+ if (this.cv()) {
byte b0 = -1;
if (itemstack.id == Item.HORSE_ARMOR_IRON.id) {
@@ -514,8 +517,8 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
}
if (b0 >= 0) {
- if (!this.bS()) {
- this.cz();
+ if (!this.isTame()) {
+ this.cD();
return true;
}
@@ -524,7 +527,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
}
}
- if (!flag && !this.cu()) {
+ if (!flag && !this.cy()) {
float f = 0.0F;
short short1 = 0;
byte b1 = 0;
@@ -552,17 +555,17 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
f = 4.0F;
short1 = 60;
b1 = 5;
- if (this.bS() && this.getAge() == 0) {
+ if (this.isTame() && this.getAge() == 0) {
flag = true;
- this.bT();
+ this.bX();
}
} else if (itemstack.id == Item.GOLDEN_APPLE.id) {
f = 10.0F;
short1 = 240;
b1 = 10;
- if (this.bS() && this.getAge() == 0) {
+ if (this.isTame() && this.getAge() == 0) {
flag = true;
- this.bT();
+ this.bX();
}
}
@@ -571,38 +574,38 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
flag = true;
}
- if (!this.bR() && short1 > 0) {
+ if (!this.bV() && short1 > 0) {
this.a(short1);
flag = true;
}
- if (b1 > 0 && (flag || !this.bS()) && b1 < this.cm()) {
+ if (b1 > 0 && (flag || !this.isTame()) && b1 < this.cq()) {
flag = true;
this.t(b1);
}
if (flag) {
- this.cB();
+ this.cF();
}
}
- if (!this.bS() && !flag) {
+ if (!this.isTame() && !flag) {
if (itemstack != null && itemstack.a(entityhuman, (EntityLiving) this)) {
return true;
}
- this.cz();
+ this.cD();
return true;
}
- if (!flag && this.cs() && !this.ca() && itemstack.id == Block.CHEST.id) {
- this.m(true);
+ if (!flag && this.cw() && !this.hasChest() && itemstack.id == Block.CHEST.id) {
+ this.setHasChest(true);
this.makeSound("mob.chickenplop", 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
flag = true;
- this.cD();
+ this.cH();
}
- if (!flag && this.bW() && !this.ck() && itemstack.id == Item.SADDLE.id) {
+ if (!flag && this.ca() && !this.co() && itemstack.id == Item.SADDLE.id) {
this.f(entityhuman);
return true;
}
@@ -616,7 +619,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
}
}
- if (this.bW() && this.passenger == null) {
+ if (this.ca() && this.passenger == null) {
if (itemstack != null && itemstack.a(entityhuman, (EntityLiving) this)) {
return true;
} else {
@@ -632,55 +635,55 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
private void h(EntityHuman entityhuman) {
entityhuman.yaw = this.yaw;
entityhuman.pitch = this.pitch;
+ this.o(false);
this.p(false);
- this.q(false);
if (!this.world.isStatic) {
entityhuman.mount(this);
}
}
- public boolean cr() {
- return this.bP() == 0;
+ public boolean cv() {
+ return this.getType() == 0;
}
- public boolean cs() {
- int i = this.bP();
+ public boolean cw() {
+ int i = this.getType();
return i == 2 || i == 1;
}
- protected boolean aY() {
- return this.passenger != null && this.ck() ? true : this.cc() || this.cd();
+ protected boolean bb() {
+ return this.passenger != null && this.co() ? true : this.cg() || this.ch();
}
- public boolean cu() {
- int i = this.bP();
+ public boolean cy() {
+ int i = this.getType();
return i == 3 || i == 4;
}
- public boolean cv() {
- return this.cu() || this.bP() == 2;
+ public boolean cz() {
+ return this.cy() || this.getType() == 2;
}
public boolean c(ItemStack itemstack) {
return false;
}
- private void cH() {
+ private void cL() {
this.bp = 1;
}
public void die(DamageSource damagesource) {
super.die(damagesource);
if (!this.world.isStatic) {
- this.cA();
+ this.cE();
}
}
public void c() {
if (this.random.nextInt(200) == 0) {
- this.cH();
+ this.cL();
}
super.c();
@@ -689,16 +692,16 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
this.heal(1.0F);
}
- if (!this.cc() && this.passenger == null && this.random.nextInt(300) == 0 && this.world.getTypeId(MathHelper.floor(this.locX), MathHelper.floor(this.locY) - 1, MathHelper.floor(this.locZ)) == Block.GRASS.id) {
- this.p(true);
+ if (!this.cg() && this.passenger == null && this.random.nextInt(300) == 0 && this.world.getTypeId(MathHelper.floor(this.locX), MathHelper.floor(this.locY) - 1, MathHelper.floor(this.locZ)) == Block.GRASS.id) {
+ this.o(true);
}
- if (this.cc() && ++this.bD > 50) {
+ if (this.cg() && ++this.bD > 50) {
this.bD = 0;
- this.p(false);
+ this.o(false);
}
- if (this.ce() && !this.bR() && !this.cc()) {
+ if (this.ci() && !this.bV() && !this.cg()) {
EntityHorse entityhorse = this.a(this, 16.0D);
if (entityhorse != null && this.e(entityhorse) > 4.0D) {
@@ -714,7 +717,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
super.l_();
if (this.world.isStatic && this.datawatcher.a()) {
this.datawatcher.e();
- this.cF();
+ this.cJ();
}
if (this.bE > 0 && ++this.bE > 30) {
@@ -724,7 +727,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
if (!this.world.isStatic && this.bF > 0 && ++this.bF > 20) {
this.bF = 0;
- this.q(false);
+ this.p(false);
}
if (this.bp > 0 && ++this.bp > 8) {
@@ -739,7 +742,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
}
this.bK = this.bJ;
- if (this.cc()) {
+ if (this.cg()) {
this.bJ += (1.0F - this.bJ) * 0.4F + 0.05F;
if (this.bJ > 1.0F) {
this.bJ = 1.0F;
@@ -752,7 +755,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
}
this.bM = this.bL;
- if (this.cd()) {
+ if (this.ch()) {
this.bK = this.bJ = 0.0F;
this.bL += (1.0F - this.bL) * 0.4F + 0.05F;
if (this.bL > 1.0F) {
@@ -780,60 +783,52 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
}
}
- private void cI() {
+ private void cM() {
if (!this.world.isStatic) {
this.bE = 1;
this.b(128, true);
}
}
- private boolean cJ() {
- return this.passenger == null && this.vehicle == null && this.bS() && this.bR() && !this.cv() && this.getHealth() >= this.getMaxHealth();
+ private boolean cN() {
+ return this.passenger == null && this.vehicle == null && this.isTame() && this.bV() && !this.cz() && this.getHealth() >= this.getMaxHealth();
}
- /* CraftBukkit start - don't treat horses differently
- public void die() {
- if (this.world.isStatic || !this.bS() && !this.ce() || this.getHealth() <= 0.0F) {
- super.die();
- }
- }
- // CraftBukkit end */
-
public void e(boolean flag) {
this.b(32, flag);
}
- public void p(boolean flag) {
+ public void o(boolean flag) {
this.e(flag);
}
- public void q(boolean flag) {
+ public void p(boolean flag) {
if (flag) {
- this.p(false);
+ this.o(false);
}
this.b(64, flag);
}
- private void cK() {
+ private void cO() {
if (!this.world.isStatic) {
this.bF = 1;
- this.q(true);
+ this.p(true);
}
}
- public void cz() {
- this.cK();
- String s = this.cl();
+ public void cD() {
+ this.cO();
+ String s = this.cp();
if (s != null) {
- this.makeSound(s, this.aW(), this.aX());
+ this.makeSound(s, this.aZ(), this.ba());
}
}
- public void cA() {
- this.a(this, this.bG);
- this.ci();
+ public void cE() {
+ this.a(this, this.inventoryChest);
+ this.cm();
}
private void a(Entity entity, InventoryHorseChest inventoryhorsechest) {
@@ -849,13 +844,13 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
}
public boolean g(EntityHuman entityhuman) {
- this.b(entityhuman.getName());
- this.j(true);
+ this.setOwnerName(entityhuman.getName());
+ this.setTame(true);
return true;
}
public void e(float f, float f1) {
- if (this.passenger != null && this.ck()) {
+ if (this.passenger != null && this.co()) {
this.lastYaw = this.yaw = this.passenger.yaw;
this.pitch = this.passenger.pitch * 0.5F;
this.b(this.yaw, this.pitch);
@@ -867,18 +862,18 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
this.bP = 0;
}
- if (this.onGround && this.bt == 0.0F && this.cd() && !this.bI) {
+ if (this.onGround && this.bt == 0.0F && this.ch() && !this.bI) {
f = 0.0F;
f1 = 0.0F;
}
- if (this.bt > 0.0F && !this.bZ() && this.onGround) {
- this.motY = this.cj() * (double) this.bt;
+ if (this.bt > 0.0F && !this.cd() && this.onGround) {
+ this.motY = this.getJumpStrength() * (double) this.bt;
if (this.hasEffect(MobEffectList.JUMP)) {
this.motY += (double) ((float) (this.getEffect(MobEffectList.JUMP).getAmplifier() + 1) * 0.1F);
}
- this.k(true);
+ this.j(true);
this.an = true;
if (f1 > 0.0F) {
float f2 = MathHelper.sin(this.yaw * 3.1415927F / 180.0F);
@@ -893,15 +888,15 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
}
this.Y = 1.0F;
- this.aR = this.bc() * 0.1F;
+ this.aR = this.bf() * 0.1F;
if (!this.world.isStatic) {
- this.i((float) this.a(GenericAttributes.d).e());
+ this.i((float) this.getAttributeInstance(GenericAttributes.d).getValue());
super.e(f, f1);
}
if (this.onGround) {
this.bt = 0.0F;
- this.k(false);
+ this.j(false);
}
this.aF = this.aG;
@@ -924,19 +919,20 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
public void b(NBTTagCompound nbttagcompound) {
super.b(nbttagcompound);
- nbttagcompound.setBoolean("EatingHaystack", this.cc());
- nbttagcompound.setBoolean("ChestedHorse", this.ca());
- nbttagcompound.setBoolean("HasReproduced", this.cf());
- nbttagcompound.setBoolean("Bred", this.ce());
- nbttagcompound.setInt("Type", this.bP());
- nbttagcompound.setInt("Variant", this.bQ());
- nbttagcompound.setInt("Temper", this.cg());
- nbttagcompound.setBoolean("Tame", this.bS());
- if (this.ca()) {
+ nbttagcompound.setBoolean("EatingHaystack", this.cg());
+ nbttagcompound.setBoolean("ChestedHorse", this.hasChest());
+ nbttagcompound.setBoolean("HasReproduced", this.cj());
+ nbttagcompound.setBoolean("Bred", this.ci());
+ nbttagcompound.setInt("Type", this.getType());
+ nbttagcompound.setInt("Variant", this.getVariant());
+ nbttagcompound.setInt("Temper", this.getTemper());
+ nbttagcompound.setBoolean("Tame", this.isTame());
+ nbttagcompound.setString("OwnerName", this.getOwnerName());
+ if (this.hasChest()) {
NBTTagList nbttaglist = new NBTTagList();
- for (int i = 2; i < this.bG.getSize(); ++i) {
- ItemStack itemstack = this.bG.getItem(i);
+ for (int i = 2; i < this.inventoryChest.getSize(); ++i) {
+ ItemStack itemstack = this.inventoryChest.getItem(i);
if (itemstack != null) {
NBTTagCompound nbttagcompound1 = new NBTTagCompound();
@@ -950,42 +946,46 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
nbttagcompound.set("Items", nbttaglist);
}
- if (this.bG.getItem(1) != null) {
- nbttagcompound.set("ArmorItem", this.bG.getItem(1).save(new NBTTagCompound("ArmorItem")));
+ if (this.inventoryChest.getItem(1) != null) {
+ nbttagcompound.set("ArmorItem", this.inventoryChest.getItem(1).save(new NBTTagCompound("ArmorItem")));
}
- if (this.bG.getItem(0) != null) {
- nbttagcompound.set("SaddleItem", this.bG.getItem(0).save(new NBTTagCompound("SaddleItem")));
+ if (this.inventoryChest.getItem(0) != null) {
+ nbttagcompound.set("SaddleItem", this.inventoryChest.getItem(0).save(new NBTTagCompound("SaddleItem")));
}
}
public void a(NBTTagCompound nbttagcompound) {
super.a(nbttagcompound);
- this.p(nbttagcompound.getBoolean("EatingHaystack"));
- this.l(nbttagcompound.getBoolean("Bred"));
- this.m(nbttagcompound.getBoolean("ChestedHorse"));
- this.n(nbttagcompound.getBoolean("HasReproduced"));
- this.p(nbttagcompound.getInt("Type"));
- this.q(nbttagcompound.getInt("Variant"));
- this.s(nbttagcompound.getInt("Temper"));
- this.j(nbttagcompound.getBoolean("Tame"));
- AttributeInstance attributeinstance = this.aT().a("Speed");
+ this.o(nbttagcompound.getBoolean("EatingHaystack"));
+ this.k(nbttagcompound.getBoolean("Bred"));
+ this.setHasChest(nbttagcompound.getBoolean("ChestedHorse"));
+ this.m(nbttagcompound.getBoolean("HasReproduced"));
+ this.setType(nbttagcompound.getInt("Type"));
+ this.setVariant(nbttagcompound.getInt("Variant"));
+ this.setTemper(nbttagcompound.getInt("Temper"));
+ this.setTame(nbttagcompound.getBoolean("Tame"));
+ if (nbttagcompound.hasKey("OwnerName")) {
+ this.setOwnerName(nbttagcompound.getString("OwnerName"));
+ }
+
+ AttributeInstance attributeinstance = this.aW().a("Speed");
if (attributeinstance != null) {
- this.a(GenericAttributes.d).a(attributeinstance.b() * 0.25D);
+ this.getAttributeInstance(GenericAttributes.d).setValue(attributeinstance.b() * 0.25D);
}
- if (this.ca()) {
+ if (this.hasChest()) {
NBTTagList nbttaglist = nbttagcompound.getList("Items");
- this.cD();
+ this.cH();
for (int i = 0; i < nbttaglist.size(); ++i) {
NBTTagCompound nbttagcompound1 = (NBTTagCompound) nbttaglist.get(i);
int j = nbttagcompound1.getByte("Slot") & 255;
- if (j >= 2 && j < this.bG.getSize()) {
- this.bG.setItem(j, ItemStack.createStack(nbttagcompound1));
+ if (j >= 2 && j < this.inventoryChest.getSize()) {
+ this.inventoryChest.setItem(j, ItemStack.createStack(nbttagcompound1));
}
}
}
@@ -995,20 +995,20 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
if (nbttagcompound.hasKey("ArmorItem")) {
itemstack = ItemStack.createStack(nbttagcompound.getCompound("ArmorItem"));
if (itemstack != null && v(itemstack.id)) {
- this.bG.setItem(1, itemstack);
+ this.inventoryChest.setItem(1, itemstack);
}
}
if (nbttagcompound.hasKey("SaddleItem")) {
itemstack = ItemStack.createStack(nbttagcompound.getCompound("SaddleItem"));
if (itemstack != null && itemstack.id == Item.SADDLE.id) {
- this.bG.setItem(0, itemstack);
+ this.inventoryChest.setItem(0, itemstack);
}
} else if (nbttagcompound.getBoolean("Saddle")) {
- this.bG.setItem(0, new ItemStack(Item.SADDLE));
+ this.inventoryChest.setItem(0, new ItemStack(Item.SADDLE));
}
- this.cE();
+ this.cI();
}
public boolean mate(EntityAnimal entityanimal) {
@@ -1019,9 +1019,9 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
} else {
EntityHorse entityhorse = (EntityHorse) entityanimal;
- if (this.cJ() && entityhorse.cJ()) {
- int i = this.bP();
- int j = entityhorse.bP();
+ if (this.cN() && entityhorse.cN()) {
+ int i = this.getType();
+ int j = entityhorse.getType();
return i == j || i == 0 && j == 1 || i == 1 && j == 0;
} else {
@@ -1033,8 +1033,8 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
public EntityAgeable createChild(EntityAgeable entityageable) {
EntityHorse entityhorse = (EntityHorse) entityageable;
EntityHorse entityhorse1 = new EntityHorse(this.world);
- int i = this.bP();
- int j = entityhorse.bP();
+ int i = this.getType();
+ int j = entityhorse.getType();
int k = 0;
if (i == j) {
@@ -1048,9 +1048,9 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
int i1;
if (l < 4) {
- i1 = this.bQ() & 255;
+ i1 = this.getVariant() & 255;
} else if (l < 8) {
- i1 = entityhorse.bQ() & 255;
+ i1 = entityhorse.getVariant() & 255;
} else {
i1 = this.random.nextInt(7);
}
@@ -1058,26 +1058,26 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
int j1 = this.random.nextInt(5);
if (j1 < 4) {
- i1 |= this.bQ() & '\uff00';
+ i1 |= this.getVariant() & '\uff00';
} else if (j1 < 8) {
- i1 |= entityhorse.bQ() & '\uff00';
+ i1 |= entityhorse.getVariant() & '\uff00';
} else {
i1 |= this.random.nextInt(5) << 8 & '\uff00';
}
- entityhorse1.q(i1);
+ entityhorse1.setVariant(i1);
}
- entityhorse1.p(k);
- double d0 = this.a(GenericAttributes.a).b() + entityageable.a(GenericAttributes.a).b() + (double) this.cL();
+ entityhorse1.setType(k);
+ double d0 = this.getAttributeInstance(GenericAttributes.a).b() + entityageable.getAttributeInstance(GenericAttributes.a).b() + (double) this.cP();
- entityhorse1.a(GenericAttributes.a).a(d0 / 3.0D);
- double d1 = this.a(bv).b() + entityageable.a(bv).b() + this.cM();
+ entityhorse1.getAttributeInstance(GenericAttributes.a).setValue(d0 / 3.0D);
+ double d1 = this.getAttributeInstance(attributeJumpStrength).b() + entityageable.getAttributeInstance(attributeJumpStrength).b() + this.cQ();
- entityhorse1.a(bv).a(d1 / 3.0D);
- double d2 = this.a(GenericAttributes.d).b() + entityageable.a(GenericAttributes.d).b() + this.cN();
+ entityhorse1.getAttributeInstance(attributeJumpStrength).setValue(d1 / 3.0D);
+ double d2 = this.getAttributeInstance(GenericAttributes.d).b() + entityageable.getAttributeInstance(GenericAttributes.d).b() + this.cR();
- entityhorse1.a(GenericAttributes.d).a(d2 / 3.0D);
+ entityhorse1.getAttributeInstance(GenericAttributes.d).setValue(d2 / 3.0D);
return entityhorse1;
}
@@ -1104,77 +1104,79 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
object = new GroupDataHorse(j, i);
}
- this.p(j);
- this.q(i);
+ this.setType(j);
+ this.setVariant(i);
if (this.random.nextInt(5) == 0) {
this.setAge(-24000);
}
if (j != 4 && j != 3) {
- this.a(GenericAttributes.a).a((double) this.cL());
+ this.getAttributeInstance(GenericAttributes.a).setValue((double) this.cP());
if (j == 0) {
- this.a(GenericAttributes.d).a(this.cN());
+ this.getAttributeInstance(GenericAttributes.d).setValue(this.cR());
} else {
- this.a(GenericAttributes.d).a(0.17499999701976776D);
+ this.getAttributeInstance(GenericAttributes.d).setValue(0.17499999701976776D);
}
} else {
- this.a(GenericAttributes.a).a(15.0D);
- this.a(GenericAttributes.d).a(0.20000000298023224D);
+ this.getAttributeInstance(GenericAttributes.a).setValue(15.0D);
+ this.getAttributeInstance(GenericAttributes.d).setValue(0.20000000298023224D);
}
if (j != 2 && j != 1) {
- this.a(bv).a(this.cM());
+ this.getAttributeInstance(attributeJumpStrength).setValue(this.cQ());
} else {
- this.a(bv).a(0.5D);
+ this.getAttributeInstance(attributeJumpStrength).setValue(0.5D);
}
this.setHealth(this.getMaxHealth());
return (GroupDataEntity) object;
}
- protected boolean bb() {
+ protected boolean be() {
return true;
}
public void u(int i) {
- if (i < 0) {
- i = 0;
- } else {
- this.bI = true;
- this.cK();
- }
+ if (this.co()) {
+ if (i < 0) {
+ i = 0;
+ } else {
+ this.bI = true;
+ this.cO();
+ }
- if (i >= 90) {
- this.bt = 1.0F;
- } else {
- this.bt = 0.4F + 0.4F * (float) i / 90.0F;
+ if (i >= 90) {
+ this.bt = 1.0F;
+ } else {
+ this.bt = 0.4F + 0.4F * (float) i / 90.0F;
+ }
}
}
- public void U() {
- super.U();
+ public void V() {
+ super.V();
if (this.bM > 0.0F) {
float f = MathHelper.sin(this.aN * 3.1415927F / 180.0F);
float f1 = MathHelper.cos(this.aN * 3.1415927F / 180.0F);
float f2 = 0.7F * this.bM;
float f3 = 0.15F * this.bM;
- this.passenger.setPosition(this.locX + (double) (f2 * f), this.locY + this.W() + this.passenger.V() + (double) f3, this.locZ - (double) (f2 * f1));
+ this.passenger.setPosition(this.locX + (double) (f2 * f), this.locY + this.X() + this.passenger.W() + (double) f3, this.locZ - (double) (f2 * f1));
if (this.passenger instanceof EntityLiving) {
((EntityLiving) this.passenger).aN = this.aN;
}
}
}
- private float cL() {
+ private float cP() {
return 15.0F + (float) this.random.nextInt(8) + (float) this.random.nextInt(9);
}
- private double cM() {
+ private double cQ() {
return 0.4000000059604645D + this.random.nextDouble() * 0.2D + this.random.nextDouble() * 0.2D + this.random.nextDouble() * 0.2D;
}
- private double cN() {
+ private double cR() {
return (0.44999998807907104D + this.random.nextDouble() * 0.3D + this.random.nextDouble() * 0.3D + this.random.nextDouble() * 0.3D) * 0.25D;
}
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 794ed476..963bc55c 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -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);
}
}
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index f913a405..34eb8725 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -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);
}
}
diff --git a/src/main/java/net/minecraft/server/EntityIronGolem.java b/src/main/java/net/minecraft/server/EntityIronGolem.java
index 35826769..fb4f9356 100644
--- a/src/main/java/net/minecraft/server/EntityIronGolem.java
+++ b/src/main/java/net/minecraft/server/EntityIronGolem.java
@@ -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);
}
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
index cb2b1143..8e1b0241 100644
--- a/src/main/java/net/minecraft/server/EntityItem.java
+++ b/src/main/java/net/minecraft/server/EntityItem.java
@@ -266,7 +266,7 @@ public class EntityItem extends Entity {
return LocaleI18n.get("item." + this.getItemStack().a());
}
- public boolean ao() {
+ public boolean ap() {
return false;
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 0adbfcd2..45b1410e 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -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 int aE() {
+ return this.j;
+ }
+
public void b(EntityLiving entityliving) {
this.lastDamager = entityliving;
- this.j = this.lastDamager != null ? 100 : 0;
+ this.j = this.ticksLived;
}
- public EntityLiving aD() {
+ 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 b(MobEffect mobeffect) {
+ protected void a(MobEffect mobeffect, boolean flag) {
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());
+ 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 c(MobEffect mobeffect) {
+ protected void b(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;
}
}
diff --git a/src/main/java/net/minecraft/server/EntityMagmaCube.java b/src/main/java/net/minecraft/server/EntityMagmaCube.java
index 3f9dd6a0..018457e9 100644
--- a/src/main/java/net/minecraft/server/EntityMagmaCube.java
+++ b/src/main/java/net/minecraft/server/EntityMagmaCube.java
@@ -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;
}
}
diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
index 126826cd..7c3af5b6 100644
--- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
+++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
@@ -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) {
diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java
index 71d23ef6..c31426b6 100644
--- a/src/main/java/net/minecraft/server/EntityMonster.java
+++ b/src/main/java/net/minecraft/server/EntityMonster.java
@@ -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);
}
}
diff --git a/src/main/java/net/minecraft/server/EntityOcelot.java b/src/main/java/net/minecraft/server/EntityOcelot.java
index e2f5a04f..c4e85962 100644
--- a/src/main/java/net/minecraft/server/EntityOcelot.java
+++ b/src/main/java/net/minecraft/server/EntityOcelot.java
@@ -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();
}
}
diff --git a/src/main/java/net/minecraft/server/EntityPig.java b/src/main/java/net/minecraft/server/EntityPig.java
index b77751e5..d24623ca 100644
--- a/src/main/java/net/minecraft/server/EntityPig.java
+++ b/src/main/java/net/minecraft/server/EntityPig.java
@@ -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;
}
diff --git a/src/main/java/net/minecraft/server/EntityPigZombie.java b/src/main/java/net/minecraft/server/EntityPigZombie.java
index 3bc0f925..57b004f1 100644
--- a/src/main/java/net/minecraft/server/EntityPigZombie.java
+++ b/src/main/java/net/minecraft/server/EntityPigZombie.java
@@ -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));
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 76f1858b..8ccf8513 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -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));
}
diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java
index 688c4d80..6b161e49 100644
--- a/src/main/java/net/minecraft/server/EntityProjectile.java
+++ b/src/main/java/net/minecraft/server/EntityProjectile.java
@@ -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
diff --git a/src/main/java/net/minecraft/server/EntitySheep.java b/src/main/java/net/minecraft/server/EntitySheep.java
index 7bf82d9b..04e24a0e 100644
--- a/src/main/java/net/minecraft/server/EntitySheep.java
+++ b/src/main/java/net/minecraft/server/EntitySheep.java
@@ -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";
}
diff --git a/src/main/java/net/minecraft/server/EntitySilverfish.java b/src/main/java/net/minecraft/server/EntitySilverfish.java
index fe212d4a..1d537d00 100644
--- a/src/main/java/net/minecraft/server/EntitySilverfish.java
+++ b/src/main/java/net/minecraft/server/EntitySilverfish.java
@@ -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;
}
}
diff --git a/src/main/java/net/minecraft/server/EntitySkeleton.java b/src/main/java/net/minecraft/server/EntitySkeleton.java
index e5db8a1c..1422a1c8 100644
--- a/src/main/java/net/minecraft/server/EntitySkeleton.java
+++ b/src/main/java/net/minecraft/server/EntitySkeleton.java
@@ -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;
}
}
diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java
index e24769b6..6cf90456 100644
--- a/src/main/java/net/minecraft/server/EntitySlime.java
+++ b/src/main/java/net/minecraft/server/EntitySlime.java
@@ -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;
}
}
diff --git a/src/main/java/net/minecraft/server/EntitySnowman.java b/src/main/java/net/minecraft/server/EntitySnowman.java
index 6499a7bd..7de58d09 100644
--- a/src/main/java/net/minecraft/server/EntitySnowman.java
+++ b/src/main/java/net/minecraft/server/EntitySnowman.java
@@ -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);
}
}
diff --git a/src/main/java/net/minecraft/server/EntitySpider.java b/src/main/java/net/minecraft/server/EntitySpider.java
index 061119fd..1ff7aaac 100644
--- a/src/main/java/net/minecraft/server/EntitySpider.java
+++ b/src/main/java/net/minecraft/server/EntitySpider.java
@@ -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;
}
diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java
index 70b40c78..9f945619 100644
--- a/src/main/java/net/minecraft/server/EntitySquid.java
+++ b/src/main/java/net/minecraft/server/EntitySquid.java
@@ -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() {
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
index e58af635..673c2042 100644
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
@@ -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
diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java
index ff2b4268..74709c3d 100644
--- a/src/main/java/net/minecraft/server/EntityWitch.java
+++ b/src/main/java/net/minecraft/server/EntityWitch.java
@@ -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;
diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java
index 0c7af8d7..4c0bbb43 100644
--- a/src/main/java/net/minecraft/server/EntityWither.java
+++ b/src/main/java/net/minecraft/server/EntityWither.java
@@ -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;
}
diff --git a/src/main/java/net/minecraft/server/EntityWolf.java b/src/main/java/net/minecraft/server/EntityWolf.java
index 60f1010d..df22e837 100644
--- a/src/main/java/net/minecraft/server/EntityWolf.java
+++ b/src/main/java/net/minecraft/server/EntityWolf.java
@@ -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);
}
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
index 75ca31c0..1bded634 100644
--- a/src/main/java/net/minecraft/server/EntityZombie.java
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
@@ -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);
+ }
+
+ if (object instanceof GroupDataZombie) {
+ GroupDataZombie groupdatazombie = (GroupDataZombie) object;
+
+ if (groupdatazombie.b) {
+ this.setVillager(true);
+ }
+
+ if (groupdatazombie.a) {
+ this.setBaby(true);
+ }
}
- this.bs();
- this.bt();
+ 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) {
diff --git a/src/main/java/net/minecraft/server/FoodMetaData.java b/src/main/java/net/minecraft/server/FoodMetaData.java
index 543a430a..6e5bf831 100644
--- a/src/main/java/net/minecraft/server/FoodMetaData.java
+++ b/src/main/java/net/minecraft/server/FoodMetaData.java
@@ -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
diff --git a/src/main/java/net/minecraft/server/GroupDataZombie.java b/src/main/java/net/minecraft/server/GroupDataZombie.java
new file mode 100644
index 00000000..50f579f6
--- /dev/null
+++ b/src/main/java/net/minecraft/server/GroupDataZombie.java
@@ -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);
+ }
+}
diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java
index b2c3ed8d..adfa43df 100644
--- a/src/main/java/net/minecraft/server/ItemBlock.java
+++ b/src/main/java/net/minecraft/server/ItemBlock.java
@@ -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()) {
diff --git a/src/main/java/net/minecraft/server/ItemBoat.java b/src/main/java/net/minecraft/server/ItemBoat.java
index 4ebf389e..80a006f4 100644
--- a/src/main/java/net/minecraft/server/ItemBoat.java
+++ b/src/main/java/net/minecraft/server/ItemBoat.java
@@ -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)) {
diff --git a/src/main/java/net/minecraft/server/ItemBucket.java b/src/main/java/net/minecraft/server/ItemBucket.java
index 86522a76..b0440dd8 100644
--- a/src/main/java/net/minecraft/server/ItemBucket.java
+++ b/src/main/java/net/minecraft/server/ItemBucket.java
@@ -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);
}
diff --git a/src/main/java/net/minecraft/server/ItemFishingRod.java b/src/main/java/net/minecraft/server/ItemFishingRod.java
index eb510781..2d0424ac 100644
--- a/src/main/java/net/minecraft/server/ItemFishingRod.java
+++ b/src/main/java/net/minecraft/server/ItemFishingRod.java
@@ -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;
diff --git a/src/main/java/net/minecraft/server/ItemSign.java b/src/main/java/net/minecraft/server/ItemSign.java
index 7a4c32d5..f7d3607b 100644
--- a/src/main/java/net/minecraft/server/ItemSign.java
+++ b/src/main/java/net/minecraft/server/ItemSign.java
@@ -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)) {
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index f42f1622..41ba8fe3 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -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();
}
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 3a8154ad..67e70672 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -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() {
diff --git a/src/main/java/net/minecraft/server/MobEffectList.java b/src/main/java/net/minecraft/server/MobEffectList.java
index dd018fdd..1f4d1a3d 100644
--- a/src/main/java/net/minecraft/server/MobEffectList.java
+++ b/src/main/java/net/minecraft/server/MobEffectList.java
@@ -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);
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
index c60abf13..a2bdfa32 100644
--- a/src/main/java/net/minecraft/server/NetworkManager.java
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
@@ -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();
diff --git a/src/main/java/net/minecraft/server/Packet.java b/src/main/java/net/minecraft/server/Packet.java
index b11c26b1..391c6fc5 100644
--- a/src/main/java/net/minecraft/server/Packet.java
+++ b/src/main/java/net/minecraft/server/Packet.java
@@ -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);
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalBreakDoor.java b/src/main/java/net/minecraft/server/PathfinderGoalBreakDoor.java
index 8f8b077e..25cf2bda 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalBreakDoor.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalBreakDoor.java
@@ -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);
}
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java
index a2560043..57f7f218 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java
@@ -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;
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java b/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java
index c9483975..97d679df 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java
@@ -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);
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalMeleeAttack.java b/src/main/java/net/minecraft/server/PathfinderGoalMeleeAttack.java
index 8b7a0152..afd726f3 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalMeleeAttack.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalMeleeAttack.java
@@ -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);
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalTarget.java b/src/main/java/net/minecraft/server/PathfinderGoalTarget.java
index 5a840830..019048d2 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalTarget.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalTarget.java
@@ -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) {
diff --git a/src/main/java/net/minecraft/server/PendingConnection.java b/src/main/java/net/minecraft/server/PendingConnection.java
index 043321dc..c9e187e6 100644
--- a/src/main/java/net/minecraft/server/PendingConnection.java
+++ b/src/main/java/net/minecraft/server/PendingConnection.java
@@ -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;
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
index 81d66e45..90083150 100644
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
@@ -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) {
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 217c5210..ff685d59 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -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;
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
index d77a4cc1..a7afa55c 100644
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
@@ -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);
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index b98a0787..f24ba954 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -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;
diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java
index 03ad5dcf..74fcc02a 100644
--- a/src/main/java/net/minecraft/server/PortalTravelAgent.java
+++ b/src/main/java/net/minecraft/server/PortalTravelAgent.java
@@ -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];
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index aa7698b9..98125382 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -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;
}
}
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java
index 054cea49..e8cd5259 100644
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java
+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java
@@ -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;
}
diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java
index b9f00b6a..98b30fbf 100644
--- a/src/main/java/net/minecraft/server/TileEntitySign.java
+++ b/src/main/java/net/minecraft/server/TileEntitySign.java
@@ -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;
+ }
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index f1348562..0435ca73 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -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;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index e787fb1b..eb9540fd 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -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) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 1d52866e..3db1b223 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -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);
diff --git a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java
index 900dc7d2..b59d142a 100644
--- a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java
+++ b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java
@@ -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;
}