Update CraftBukkit to 1.6.2

Dieser Commit ist enthalten in:
mbax 2013-07-08 19:43:37 -04:00
Ursprung 2d9a9d8cea
Commit f6a0b1e426
87 geänderte Dateien mit 1162 neuen und 1112 gelöschten Zeilen

Datei anzeigen

@ -4,7 +4,7 @@
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId> <artifactId>craftbukkit</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<version>1.6.1-R0.1-SNAPSHOT</version> <version>1.6.2-R0.1-SNAPSHOT</version>
<name>CraftBukkit</name> <name>CraftBukkit</name>
<url>http://www.bukkit.org</url> <url>http://www.bukkit.org</url>
@ -12,8 +12,8 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<api.version>unknown</api.version> <api.version>unknown</api.version>
<junit.version>4.11</junit.version> <junit.version>4.11</junit.version>
<minecraft.version>1.6.1</minecraft.version> <minecraft.version>1.6.2</minecraft.version>
<minecraft_version>1_6_R1</minecraft_version> <minecraft_version>1_6_R2</minecraft_version>
</properties> </properties>
<scm> <scm>

Datei anzeigen

@ -178,7 +178,7 @@ public class BlockLeaves extends BlockTransparant {
} }
public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) { 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); entityhuman.a(StatisticList.C[this.id], 1);
this.b(world, i, j, k, new ItemStack(Block.LEAVES.id, 1, l & 3)); this.b(world, i, j, k, new ItemStack(Block.LEAVES.id, 1, l & 3));
} else { } else {

Datei anzeigen

@ -11,6 +11,19 @@ public class BlockPistonExtension extends Block {
this.c(0.5F); 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) { public void remove(World world, int i, int j, int k, int l, int i1) {
super.remove(world, i, j, k, l, i1); super.remove(world, i, j, k, l, i1);
if ((i1 & 7) >= Facing.OPPOSITE_FACING.length) return; // CraftBukkit - fix a piston AIOOBE issue if ((i1 & 7) >= Facing.OPPOSITE_FACING.length) return; // CraftBukkit - fix a piston AIOOBE issue

Datei anzeigen

@ -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); Entity entity = ItemMonsterEgg.a(world, 57, (double) i + 0.5D, (double) l + 1.1D, (double) k + 0.5D);
if (entity != null) { 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); world.getServer().getPluginManager().callEvent(event);
// CraftBukkit end // CraftBukkit end
entity.Z(); entity.aa();
} }
} }
} }

Datei anzeigen

@ -63,7 +63,7 @@ public class BlockPressurePlateBinary extends BlockPressurePlateAbstract {
} }
// CraftBukkit end // CraftBukkit end
if (!entity.as()) { if (!entity.at()) {
return 15; return 15;
} }
} }

Datei anzeigen

@ -155,7 +155,7 @@ public class BlockSkull extends BlockContainer {
entitywither = new EntityWither(world); entitywither = new EntityWither(world);
entitywither.setPositionRotation((double) i + 0.5D, (double) j - 1.45D, (double) (k + i1) + 1.5D, 90.0F, 0.0F); entitywither.setPositionRotation((double) i + 0.5D, (double) j - 1.45D, (double) (k + i1) + 1.5D, 90.0F, 0.0F);
entitywither.aN = 90.0F; entitywither.aN = 90.0F;
entitywither.bP(); entitywither.bT();
if (world.addEntity(entitywither, SpawnReason.BUILD_WITHER)) { if (world.addEntity(entitywither, SpawnReason.BUILD_WITHER)) {
blockList.updateList(); blockList.updateList();
@ -191,7 +191,7 @@ public class BlockSkull extends BlockContainer {
if (!world.isStatic) { if (!world.isStatic) {
entitywither = new EntityWither(world); entitywither = new EntityWither(world);
entitywither.setPositionRotation((double) (i + i1) + 1.5D, (double) j - 1.45D, (double) k + 0.5D, 0.0F, 0.0F); 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)) { if (world.addEntity(entitywither, SpawnReason.BUILD_WITHER)) {
blockList.updateList(); blockList.updateList();

Datei anzeigen

@ -76,7 +76,7 @@ public class BlockTripwire extends Block {
public void a(World world, int i, int j, int k, int l, EntityHuman entityhuman) { public void a(World world, int i, int j, int k, int l, EntityHuman entityhuman) {
if (!world.isStatic) { 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); world.setData(i, j, k, l | 8, 4);
} }
} }
@ -140,7 +140,7 @@ public class BlockTripwire extends Block {
while (iterator.hasNext()) { while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next(); Entity entity = (Entity) iterator.next();
if (!entity.as()) { if (!entity.at()) {
flag1 = true; flag1 = true;
break; break;
} }

Datei anzeigen

@ -301,7 +301,7 @@ public class BlockVine extends Block {
} }
public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) { 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); entityhuman.a(StatisticList.C[this.id], 1);
this.b(world, i, j, k, new ItemStack(Block.VINE, 1, 0)); this.b(world, i, j, k, new ItemStack(Block.VINE, 1, 0));
} else { } else {

Datei anzeigen

@ -658,7 +658,7 @@ public class Chunk {
while (iterator.hasNext()) { while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next(); Entity entity = (Entity) iterator.next();
entity.P(); entity.Q();
} }
this.world.a(this.entitySlices[i]); 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))) { if (entity1 != entity && entity1.boundingBox.b(axisalignedbb) && (ientityselector == null || ientityselector.a(entity1))) {
list.add(entity1); list.add(entity1);
Entity[] aentity = entity1.am(); Entity[] aentity = entity1.an();
if (aentity != null) { if (aentity != null) {
for (int i1 = 0; i1 < aentity.length; ++i1) { for (int i1 = 0; i1 < aentity.length; ++i1) {

Datei anzeigen

@ -40,7 +40,7 @@ public class ContainerHorse extends Container {
int j; int j;
int k; int k;
if (entityhorse.ca()) { if (entityhorse.hasChest()) {
for (j = 0; j < b0; ++j) { for (j = 0; j < b0; ++j) {
for (k = 0; k < 5; ++k) { for (k = 0; k < 5; ++k) {
this.a(new Slot(iinventory1, 2 + k + j * 5, 80 + k * 18, 18 + j * 18)); 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) { 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) { 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)) { if (!this.a(itemstack1, this.a.getSize(), this.c.size(), true)) {
return null; 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)) { if (!this.a(itemstack1, 1, 2, false)) {
return null; return null;
} }

Datei anzeigen

@ -47,7 +47,7 @@ public class ControllerMove {
float f = (float) (org.bukkit.craftbukkit.TrigMath.atan2(d1, d0) * 180.0D / 3.1415927410125732D) - 90.0F; 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.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) { if (d2 > 0.0D && d0 * d0 + d1 * d1 < 1.0D) {
this.a.getControllerJump().a(); this.a.getControllerJump().a();
} }

Datei anzeigen

@ -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.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(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(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.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.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}); this.registerShapedRecipe(new ItemStack(Block.SNOW_BLOCK, 1), new Object[] { "##", "##", Character.valueOf('#'), Item.SNOW_BALL});

Datei anzeigen

@ -48,7 +48,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
System.setErr(new PrintStream(new LoggerOutputStream(this.getLogger().getLogger(), Level.SEVERE), true)); System.setErr(new PrintStream(new LoggerOutputStream(this.getLogger().getLogger(), Level.SEVERE), true));
// CraftBukkit end // 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) { 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\""); this.getLogger().warning("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
} }

Datei anzeigen

@ -38,7 +38,7 @@ public class DedicatedServerConnectionThread extends Thread {
PendingConnection pendingconnection = (PendingConnection) this.a.get(i); PendingConnection pendingconnection = (PendingConnection) this.a.get(i);
try { try {
pendingconnection.c(); pendingconnection.d();
} catch (Exception exception) { } catch (Exception exception) {
pendingconnection.disconnect("Internal server error"); pendingconnection.disconnect("Internal server error");
this.e.d().getLogger().warning("Failed to handle packet for " + pendingconnection.getName() + ": " + exception, (Throwable) exception); this.e.d().getLogger().warning("Failed to handle packet for " + pendingconnection.getName() + ": " + exception, (Throwable) exception);

Datei anzeigen

@ -154,16 +154,21 @@ public abstract class Entity {
} }
protected void a(float f, float f1) { protected void a(float f, float f1) {
float f2;
if (f != this.width || f1 != this.length) { if (f != this.width || f1 != this.length) {
f2 = this.width;
this.width = f; this.width = f;
this.length = f1; this.length = f1;
this.boundingBox.d = this.boundingBox.a + (double) this.width; this.boundingBox.d = this.boundingBox.a + (double) this.width;
this.boundingBox.f = this.boundingBox.c + (double) this.width; this.boundingBox.f = this.boundingBox.c + (double) this.width;
this.boundingBox.e = this.boundingBox.b + (double) this.length; 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) { if ((double) f2 < 0.375D) {
this.at = EnumEntitySize.SIZE_1; this.at = EnumEntitySize.SIZE_1;
} else if ((double) f2 < 0.75D) { } else if ((double) f2 < 0.75D) {
@ -248,7 +253,7 @@ public abstract class Entity {
if (true || minecraftserver.getAllowNether()) { // CraftBukkit if (true || minecraftserver.getAllowNether()) { // CraftBukkit
if (this.vehicle == null && this.aq++ >= i) { if (this.vehicle == null && this.aq++ >= i) {
this.aq = i; this.aq = i;
this.portalCooldown = this.aa(); this.portalCooldown = this.ab();
byte b0; byte b0;
if (this.world.worldProvider.dimension == -1) { if (this.world.worldProvider.dimension == -1) {
@ -1032,7 +1037,7 @@ public abstract class Entity {
public void b(Entity entity, int i) {} public void b(Entity entity, int i) {}
public boolean c(NBTTagCompound nbttagcompound) { public boolean c(NBTTagCompound nbttagcompound) {
String s = this.O(); String s = this.P();
if (!this.dead && s != null) { if (!this.dead && s != null) {
nbttagcompound.setString("id", s); nbttagcompound.setString("id", s);
@ -1044,7 +1049,7 @@ public abstract class Entity {
} }
public boolean d(NBTTagCompound nbttagcompound) { public boolean d(NBTTagCompound nbttagcompound) {
String s = this.O(); String s = this.P();
if (!this.dead && s != null && this.passenger == null) { if (!this.dead && s != null && this.passenger == null) {
nbttagcompound.setString("id", s); nbttagcompound.setString("id", s);
@ -1145,6 +1150,9 @@ public abstract class Entity {
this.setPosition(this.locX, this.locY, this.locZ); this.setPosition(this.locX, this.locY, this.locZ);
this.b(this.yaw, this.pitch); this.b(this.yaw, this.pitch);
this.a(nbttagcompound); this.a(nbttagcompound);
if (this.O()) {
this.setPosition(this.locX, this.locY, this.locZ);
}
// CraftBukkit start // CraftBukkit start
if (this instanceof EntityLiving) { 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); return EntityTypes.b(this);
} }
@ -1214,7 +1226,7 @@ public abstract class Entity {
protected abstract void b(NBTTagCompound nbttagcompound); protected abstract void b(NBTTagCompound nbttagcompound);
public void P() {} public void Q() {}
protected NBTTagList a(double... adouble) { protected NBTTagList a(double... adouble) {
NBTTagList nbttaglist = new NBTTagList(); NBTTagList nbttaglist = new NBTTagList();
@ -1293,7 +1305,7 @@ public abstract class Entity {
return null; return null;
} }
public void T() { public void U() {
if (this.vehicle.dead) { if (this.vehicle.dead) {
this.vehicle = null; this.vehicle = null;
} else { } else {
@ -1302,7 +1314,7 @@ public abstract class Entity {
this.motZ = 0.0D; this.motZ = 0.0D;
this.l_(); this.l_();
if (this.vehicle != null) { if (this.vehicle != null) {
this.vehicle.U(); this.vehicle.V();
this.g += (double) (this.vehicle.yaw - this.vehicle.lastYaw); 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) { 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.g -= d0;
this.f -= d1; 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) { 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; return (double) this.height;
} }
public double W() { public double X() {
return (double) this.length * 0.75D; return (double) this.length * 0.75D;
} }
@ -1421,17 +1431,17 @@ public abstract class Entity {
} }
} }
public float X() { public float Y() {
return 0.1F; return 0.1F;
} }
public Vec3D Y() { public Vec3D Z() {
return null; return null;
} }
public void Z() { public void aa() {
if (this.portalCooldown > 0) { if (this.portalCooldown > 0) {
this.portalCooldown = this.aa(); this.portalCooldown = this.ab();
} else { } else {
double d0 = this.lastX - this.locX; double d0 = this.lastX - this.locX;
double d1 = this.lastZ - this.locZ; double d1 = this.lastZ - this.locZ;
@ -1444,7 +1454,7 @@ public abstract class Entity {
} }
} }
public int aa() { public int ab() {
return 900; return 900;
} }
@ -1458,7 +1468,7 @@ public abstract class Entity {
return !this.fireProof && (this.fireTicks > 0 || this.f(0)); return !this.fireProof && (this.fireTicks > 0 || this.f(0));
} }
public boolean ae() { public boolean af() {
return this.vehicle != null; return this.vehicle != null;
} }
@ -1625,7 +1635,7 @@ public abstract class Entity {
} }
} }
public void ak() { public void al() {
this.K = true; this.K = true;
this.fallDistance = 0.0F; this.fallDistance = 0.0F;
} }
@ -1640,7 +1650,7 @@ public abstract class Entity {
return LocaleI18n.get("entity." + s + ".name"); return LocaleI18n.get("entity." + s + ".name");
} }
public Entity[] am() { public Entity[] an() {
return null; return null;
} }
@ -1652,7 +1662,7 @@ public abstract class Entity {
return 0.0F; return 0.0F;
} }
public boolean ao() { public boolean ap() {
return true; return true;
} }
@ -1774,15 +1784,15 @@ public abstract class Entity {
return true; return true;
} }
public int aq() { public int ar() {
return 3; return 3;
} }
public int ar() { public int as() {
return this.as; return this.as;
} }
public boolean as() { public boolean at() {
return false; return false;
} }
@ -1799,7 +1809,7 @@ public abstract class Entity {
return this.uniqueID; return this.uniqueID;
} }
public boolean av() { public boolean aw() {
return true; return true;
} }

Datei anzeigen

@ -242,7 +242,7 @@ public class EntityArrow extends Entity implements IProjectile {
EntityLiving entityliving = (EntityLiving) movingobjectposition.entity; EntityLiving entityliving = (EntityLiving) movingobjectposition.entity;
if (!this.world.isStatic) { if (!this.world.isStatic) {
entityliving.m(entityliving.aQ() + 1); entityliving.m(entityliving.aT() + 1);
} }
if (this.aw > 0) { if (this.aw > 0) {
@ -425,7 +425,7 @@ public class EntityArrow extends Entity implements IProjectile {
this.aw = i; this.aw = i;
} }
public boolean ao() { public boolean ap() {
return false; return false;
} }

Datei anzeigen

@ -12,9 +12,9 @@ public class EntityBlaze extends EntityMonster {
this.b = 10; this.b = 10;
} }
protected void ax() { protected void ay() {
super.ax(); super.ay();
this.a(GenericAttributes.e).a(6.0D); this.getAttributeInstance(GenericAttributes.e).setValue(6.0D);
} }
protected void a() { protected void a() {
@ -26,11 +26,11 @@ public class EntityBlaze extends EntityMonster {
return "mob.blaze.breathe"; return "mob.blaze.breathe";
} }
protected String aK() { protected String aN() {
return "mob.blaze.hit"; return "mob.blaze.hit";
} }
protected String aL() { protected String aO() {
return "mob.blaze.death"; return "mob.blaze.death";
} }
@ -50,7 +50,7 @@ public class EntityBlaze extends EntityMonster {
this.bp = 0.5F + (float) this.random.nextGaussian() * 3.0F; 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; this.motY += (0.30000001192092896D - this.motY) * 0.30000001192092896D;
} }
} }
@ -118,7 +118,7 @@ public class EntityBlaze extends EntityMonster {
} }
public boolean isBurning() { public boolean isBurning() {
return this.bP(); return this.bT();
} }
protected void dropDeathLoot(boolean flag, int i) { 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; return (this.datawatcher.getByte(16) & 1) != 0;
} }

Datei anzeigen

@ -88,7 +88,7 @@ public class EntityBoat extends Entity {
this.world.getServer().getPluginManager().callEvent(new org.bukkit.event.vehicle.VehicleCreateEvent((Vehicle) this.getBukkitEntity())); // CraftBukkit 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; 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) { if (this.passenger != null) {
double d0 = Math.cos((double) this.yaw * 3.141592653589793D / 180.0D) * 0.4D; 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; 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);
} }
} }

Datei anzeigen

@ -23,14 +23,14 @@ public class EntityChicken extends EntityAnimal {
this.goalSelector.a(7, new PathfinderGoalRandomLookaround(this)); this.goalSelector.a(7, new PathfinderGoalRandomLookaround(this));
} }
public boolean bb() { public boolean be() {
return true; return true;
} }
protected void ax() { protected void ay() {
super.ax(); super.ay();
this.a(GenericAttributes.a).a(4.0D); this.getAttributeInstance(GenericAttributes.a).setValue(4.0D);
this.a(GenericAttributes.d).a(0.25D); this.getAttributeInstance(GenericAttributes.d).setValue(0.25D);
} }
public void c() { public void c() {
@ -69,11 +69,11 @@ public class EntityChicken extends EntityAnimal {
return "mob.chicken.say"; return "mob.chicken.say";
} }
protected String aK() { protected String aN() {
return "mob.chicken.hurt"; return "mob.chicken.hurt";
} }
protected String aL() { protected String aO() {
return "mob.chicken.hurt"; return "mob.chicken.hurt";
} }

Datei anzeigen

@ -21,25 +21,25 @@ public class EntityCow extends EntityAnimal {
this.goalSelector.a(7, new PathfinderGoalRandomLookaround(this)); this.goalSelector.a(7, new PathfinderGoalRandomLookaround(this));
} }
public boolean bb() { public boolean be() {
return true; return true;
} }
protected void ax() { protected void ay() {
super.ax(); super.ay();
this.a(GenericAttributes.a).a(10.0D); this.getAttributeInstance(GenericAttributes.a).setValue(10.0D);
this.a(GenericAttributes.d).a(0.20000000298023224D); this.getAttributeInstance(GenericAttributes.d).setValue(0.20000000298023224D);
} }
protected String r() { protected String r() {
return "mob.cow.say"; return "mob.cow.say";
} }
protected String aK() { protected String aN() {
return "mob.cow.hurt"; return "mob.cow.hurt";
} }
protected String aL() { protected String aO() {
return "mob.cow.hurt"; return "mob.cow.hurt";
} }
@ -47,7 +47,7 @@ public class EntityCow extends EntityAnimal {
this.makeSound("mob.cow.step", 0.15F, 1.0F); this.makeSound("mob.cow.step", 0.15F, 1.0F);
} }
protected float aW() { protected float aZ() {
return 0.4F; return 0.4F;
} }

Datei anzeigen

@ -24,19 +24,19 @@ public abstract class EntityCreature extends EntityInsentient {
super(world); super(world);
} }
protected boolean bF() { protected boolean bJ() {
return false; return false;
} }
protected void bh() { protected void bk() {
this.world.methodProfiler.a("ai"); this.world.methodProfiler.a("ai");
if (this.bo > 0 && --this.bo == 0) { if (this.bo > 0 && --this.bo == 0) {
AttributeInstance attributeinstance = this.a(GenericAttributes.d); AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.d);
attributeinstance.b(i); attributeinstance.b(i);
} }
this.bn = this.bF(); this.bn = this.bJ();
float f11 = 16.0F; float f11 = 16.0F;
if (this.target == null) { 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)) { 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); 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) { } 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); 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 f2 = (float) (org.bukkit.craftbukkit.TrigMath.atan2(d2, d1) * 180.0D / 3.1415927410125732D) - 90.0F;
float f3 = MathHelper.g(f2 - this.yaw); 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) { if (f3 > 30.0F) {
f3 = 30.0F; f3 = 30.0F;
} }
@ -146,7 +146,7 @@ public abstract class EntityCreature extends EntityInsentient {
this.a(this.target, 30.0F, 30.0F); this.a(this.target, 30.0F, 30.0F);
} }
if (this.positionChanged && !this.bI()) { if (this.positionChanged && !this.bM()) {
this.bd = true; this.bd = true;
} }
@ -156,12 +156,12 @@ public abstract class EntityCreature extends EntityInsentient {
this.world.methodProfiler.b(); this.world.methodProfiler.b();
} else { } else {
super.bh(); super.bk();
this.pathEntity = null; this.pathEntity = null;
} }
} }
protected void bG() { protected void bK() {
this.world.methodProfiler.a("stroll"); this.world.methodProfiler.a("stroll");
boolean flag = false; boolean flag = false;
int i = -1; int i = -1;
@ -209,7 +209,7 @@ public abstract class EntityCreature extends EntityInsentient {
return super.canSpawn() && this.a(i, j, k) >= 0.0F; return super.canSpawn() && this.a(i, j, k) >= 0.0F;
} }
public boolean bI() { public boolean bM() {
return this.pathEntity != null; return this.pathEntity != null;
} }
@ -217,7 +217,7 @@ public abstract class EntityCreature extends EntityInsentient {
this.pathEntity = pathentity; this.pathEntity = pathentity;
} }
public Entity bJ() { public Entity bN() {
return this.target; return this.target;
} }
@ -225,7 +225,7 @@ public abstract class EntityCreature extends EntityInsentient {
this.target = entity; this.target = entity;
} }
public boolean bK() { public boolean bO() {
return this.b(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ)); 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; this.br = (float) l;
} }
public ChunkCoordinates bL() { public ChunkCoordinates bP() {
return this.bq; return this.bq;
} }
public float bM() { public float bQ() {
return this.br; return this.br;
} }
public void bN() { public void bR() {
this.br = -1.0F; this.br = -1.0F;
} }
public boolean bO() { public boolean bS() {
return this.br != -1.0F; return this.br != -1.0F;
} }
protected void bB() { protected void bF() {
super.bB(); super.bF();
if (this.bD() && this.bE() != null && this.bE().world == this.world) { if (this.bH() && this.bI() != null && this.bI().world == this.world) {
Entity entity = this.bE(); Entity entity = this.bI();
this.b((int) entity.locX, (int) entity.locY, (int) entity.locZ, 5); this.b((int) entity.locX, (int) entity.locY, (int) entity.locZ, 5);
float f = this.d(entity); float f = this.d(entity);
if (this instanceof EntityTameableAnimal && ((EntityTameableAnimal) this).isSitting()) { if (this instanceof EntityTameableAnimal && ((EntityTameableAnimal) this).isSitting()) {
if (f > 10.0F) { if (f > 10.0F) {
this.i(true); this.a(true, true);
} }
return; return;
@ -276,6 +276,7 @@ public abstract class EntityCreature extends EntityInsentient {
this.bt = true; this.bt = true;
} }
this.o(f);
if (f > 4.0F) { if (f > 4.0F) {
this.getNavigation().a(entity, 1.0D); this.getNavigation().a(entity, 1.0D);
} }
@ -291,13 +292,15 @@ public abstract class EntityCreature extends EntityInsentient {
} }
if (f > 10.0F) { 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.bt = false;
this.goalSelector.a(this.bs); this.goalSelector.a(this.bs);
this.getNavigation().a(true); this.getNavigation().a(true);
this.bN(); this.bR();
} }
} }
protected void o(float f) {}
} }

Datei anzeigen

@ -26,16 +26,16 @@ public class EntityCreeper extends EntityMonster {
this.targetSelector.a(2, new PathfinderGoalHurtByTarget(this, false)); this.targetSelector.a(2, new PathfinderGoalHurtByTarget(this, false));
} }
protected void ax() { protected void ay() {
super.ax(); super.ay();
this.a(GenericAttributes.d).a(0.25D); this.getAttributeInstance(GenericAttributes.d).setValue(0.25D);
} }
public boolean bb() { public boolean be() {
return true; return true;
} }
public int aq() { public int ar() {
return this.getGoalTarget() == null ? 3 : 3 + (int) (this.getHealth() - 1.0F); return this.getGoalTarget() == null ? 3 : 3 + (int) (this.getHealth() - 1.0F);
} }
@ -78,7 +78,7 @@ public class EntityCreeper extends EntityMonster {
public void l_() { public void l_() {
if (this.isAlive()) { if (this.isAlive()) {
this.bp = this.fuseTicks; this.bp = this.fuseTicks;
int i = this.bR(); int i = this.bV();
if (i > 0 && this.fuseTicks == 0) { if (i > 0 && this.fuseTicks == 0) {
this.makeSound("random.fuse", 1.0F, 0.5F); this.makeSound("random.fuse", 1.0F, 0.5F);
@ -112,11 +112,11 @@ public class EntityCreeper extends EntityMonster {
super.l_(); super.l_();
} }
protected String aK() { protected String aN() {
return "mob.creeper.say"; return "mob.creeper.say";
} }
protected String aL() { protected String aO() {
return "mob.creeper.death"; return "mob.creeper.death";
} }
@ -173,7 +173,7 @@ public class EntityCreeper extends EntityMonster {
return Item.SULPHUR.id; return Item.SULPHUR.id;
} }
public int bR() { public int bV() {
return this.datawatcher.getByte(16); return this.datawatcher.getByte(16);
} }

Datei anzeigen

@ -19,7 +19,7 @@ public class EntityDamageSourceIndirect extends EntityDamageSource {
public ChatMessage getLocalizedDeathMessage(EntityLiving entityliving) { public ChatMessage getLocalizedDeathMessage(EntityLiving entityliving) {
String s = this.owner == null ? this.p.getScoreboardDisplayName() : this.owner.getScoreboardDisplayName(); 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 s1 = "death.attack." + this.translationIndex;
String s2 = s1 + ".item"; String s2 = s1 + ".item";

Datei anzeigen

@ -47,9 +47,9 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
this.am = true; this.am = true;
} }
protected void ax() { protected void ay() {
super.ax(); super.ay();
this.a(GenericAttributes.a).a(200.0D); this.getAttributeInstance(GenericAttributes.a).setValue(200.0D);
} }
protected void a() { protected void a() {
@ -97,7 +97,7 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
f2 = (this.random.nextFloat() - 0.5F) * 8.0F; 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); 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 { } else {
this.bF(); this.bJ();
f = 0.2F / (MathHelper.sqrt(this.motX * this.motX + this.motZ * this.motZ) * 10.0F + 1.0F); 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); f *= (float) Math.pow(2.0D, this.motY);
if (this.bA) { 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) { 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); 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 != null) {
if (this.bC.dead) { if (this.bC.dead) {
if (!this.world.isStatic) { 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; this.bz = false;
if (this.random.nextInt(2) == 0 && !this.world.players.isEmpty()) { if (this.random.nextInt(2) == 0 && !this.world.players.isEmpty()) {
this.bD = (Entity) this.world.players.get(this.random.nextInt(this.world.players.size())); 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); return super.damageEntity(damagesource, f);
} }
protected void az() { protected void aA() {
++this.bB; ++this.bB;
if (this.bB >= 180 && this.bB <= 200) { if (this.bB >= 180 && this.bB <= 200) {
float f = (this.random.nextFloat() - 0.5F) * 8.0F; float f = (this.random.nextFloat() - 0.5F) * 8.0F;
@ -613,9 +613,9 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
BlockEnderPortal.a = false; BlockEnderPortal.a = false;
} }
protected void bk() {} protected void bo() {}
public Entity[] am() { public Entity[] an() {
return this.children; return this.children;
} }
@ -631,11 +631,11 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
return "mob.enderdragon.growl"; return "mob.enderdragon.growl";
} }
protected String aK() { protected String aN() {
return "mob.enderdragon.hit"; return "mob.enderdragon.hit";
} }
protected float aW() { protected float aZ() {
return 5.0F; return 5.0F;
} }

Datei anzeigen

@ -24,11 +24,11 @@ public class EntityEnderman extends EntityMonster {
this.Y = 1.0F; this.Y = 1.0F;
} }
protected void ax() { protected void ay() {
super.ax(); super.ay();
this.a(GenericAttributes.a).a(40.0D); this.getAttributeInstance(GenericAttributes.a).setValue(40.0D);
this.a(GenericAttributes.d).a(0.30000001192092896D); this.getAttributeInstance(GenericAttributes.d).setValue(0.30000001192092896D);
this.a(GenericAttributes.e).a(7.0D); this.getAttributeInstance(GenericAttributes.e).setValue(7.0D);
} }
protected void a() { protected void a() {
@ -96,7 +96,7 @@ public class EntityEnderman extends EntityMonster {
} }
if (this.bu != this.target) { if (this.bu != this.target) {
AttributeInstance attributeinstance = this.a(GenericAttributes.d); AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.d);
attributeinstance.b(bq); attributeinstance.b(bq);
if (this.target != null) { if (this.target != null) {
@ -157,7 +157,7 @@ public class EntityEnderman extends EntityMonster {
this.target = null; this.target = null;
this.a(false); this.a(false);
this.bv = false; this.bv = false;
this.bP(); this.bT();
} }
} }
@ -165,10 +165,10 @@ public class EntityEnderman extends EntityMonster {
this.target = null; this.target = null;
this.a(false); this.a(false);
this.bv = 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); this.a(false);
} }
@ -181,7 +181,7 @@ public class EntityEnderman extends EntityMonster {
if (this.target != null) { if (this.target != null) {
if (this.target instanceof EntityHuman && this.f((EntityHuman) this.target)) { if (this.target instanceof EntityHuman && this.f((EntityHuman) this.target)) {
if (this.target.e((Entity) this) < 16.0D) { if (this.target.e((Entity) this) < 16.0D) {
this.bP(); this.bT();
} }
this.bs = 0; this.bs = 0;
@ -197,7 +197,7 @@ public class EntityEnderman extends EntityMonster {
super.c(); super.c();
} }
protected boolean bP() { protected boolean bT() {
double d0 = this.locX + (this.random.nextDouble() - 0.5D) * 64.0D; double d0 = this.locX + (this.random.nextDouble() - 0.5D) * 64.0D;
double d1 = this.locY + (double) (this.random.nextInt(64) - 32); double d1 = this.locY + (double) (this.random.nextInt(64) - 32);
double d2 = this.locZ + (this.random.nextDouble() - 0.5D) * 64.0D; double d2 = this.locZ + (this.random.nextDouble() - 0.5D) * 64.0D;
@ -287,14 +287,14 @@ public class EntityEnderman extends EntityMonster {
} }
protected String r() { 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"; return "mob.endermen.hit";
} }
protected String aL() { protected String aO() {
return "mob.endermen.death"; return "mob.endermen.death";
} }
@ -348,7 +348,7 @@ public class EntityEnderman extends EntityMonster {
this.bv = false; this.bv = false;
for (int i = 0; i < 64; ++i) { for (int i = 0; i < 64; ++i) {
if (this.bP()) { if (this.bT()) {
return true; return true;
} }
} }
@ -360,7 +360,7 @@ public class EntityEnderman extends EntityMonster {
} }
} }
public boolean bT() { public boolean bX() {
return this.datawatcher.getByte(18) > 0; return this.datawatcher.getByte(18) > 0;
} }

Datei anzeigen

@ -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))))))))); 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; return false;
} }
} }

Datei anzeigen

@ -223,7 +223,7 @@ public abstract class EntityFireball extends Entity {
return true; return true;
} }
public float X() { public float Y() {
return 1.0F; return 1.0F;
} }
@ -233,7 +233,7 @@ public abstract class EntityFireball extends Entity {
} else { } else {
this.J(); this.J();
if (damagesource.getEntity() != null) { if (damagesource.getEntity() != null) {
Vec3D vec3d = damagesource.getEntity().Y(); Vec3D vec3d = damagesource.getEntity().Z();
if (vec3d != null) { if (vec3d != null) {
this.motX = vec3d.c; this.motX = vec3d.c;

Datei anzeigen

@ -115,7 +115,7 @@ public class EntityFireworks extends Entity {
return super.d(f); return super.d(f);
} }
public boolean ao() { public boolean ap() {
return false; return false;
} }
} }

Datei anzeigen

@ -93,7 +93,7 @@ public class EntityFishingHook extends Entity {
this.b(this.yaw, this.pitch); this.b(this.yaw, this.pitch);
} else { } else {
if (!this.world.isStatic) { 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) { if (this.owner.dead || !this.owner.isAlive() || itemstack == null || itemstack.getItem() != Item.FISHING_ROD || this.e(this.owner) > 1024.0D) {
this.die(); this.die();

Datei anzeigen

@ -42,17 +42,17 @@ public class EntityGhast extends EntityFlying implements IMonster {
this.datawatcher.a(16, Byte.valueOf((byte) 0)); this.datawatcher.a(16, Byte.valueOf((byte) 0));
} }
protected void ax() { protected void ay() {
super.ax(); super.ay();
this.a(GenericAttributes.a).a(10.0D); this.getAttributeInstance(GenericAttributes.a).setValue(10.0D);
} }
protected void bh() { protected void bk() {
if (!this.world.isStatic && this.world.difficulty == 0) { if (!this.world.isStatic && this.world.difficulty == 0) {
this.die(); this.die();
} }
this.bk(); this.bo();
this.bo = this.bp; this.bo = this.bp;
double d0 = this.i - this.locX; double d0 = this.i - this.locX;
double d1 = this.j - this.locY; double d1 = this.j - this.locY;
@ -185,11 +185,11 @@ public class EntityGhast extends EntityFlying implements IMonster {
return "mob.ghast.moan"; return "mob.ghast.moan";
} }
protected String aK() { protected String aN() {
return "mob.ghast.scream"; return "mob.ghast.scream";
} }
protected String aL() { protected String aO() {
return "mob.ghast.death"; return "mob.ghast.death";
} }
@ -218,7 +218,7 @@ public class EntityGhast extends EntityFlying implements IMonster {
// CraftBukkit end // CraftBukkit end
} }
protected float aW() { protected float aZ() {
return 10.0F; 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; return this.random.nextInt(20) == 0 && super.canSpawn() && this.world.difficulty > 0;
} }
public int br() { public int bv() {
return 1; return 1;
} }

Datei anzeigen

@ -318,5 +318,9 @@ public abstract class EntityHanging extends Entity {
public abstract int e(); public abstract int e();
protected boolean O() {
return false;
}
public abstract void b(Entity entity); public abstract void b(Entity entity);
} }

Datei-Diff unterdrückt, da er zu groß ist Diff laden

Datei anzeigen

@ -77,9 +77,9 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
this.maxFireTicks = 20; this.maxFireTicks = 20;
} }
protected void ax() { protected void ay() {
super.ax(); super.ay();
this.aT().b(GenericAttributes.e).a(1.0D); this.aW().b(GenericAttributes.e).setValue(1.0D);
} }
protected void a() { protected void a() {
@ -89,19 +89,19 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
this.datawatcher.a(18, Integer.valueOf(0)); this.datawatcher.a(18, Integer.valueOf(0));
} }
public boolean bm() { public boolean bq() {
return this.f != null; return this.f != null;
} }
public void bo() { public void bs() {
if (this.f != null) { if (this.f != null) {
this.f.b(this.world, this, this.g); this.f.b(this.world, this, this.g);
} }
this.bp(); this.bt();
} }
public void bp() { public void bt() {
this.f = null; this.f = null;
this.g = 0; this.g = 0;
if (!this.world.isStatic) { if (!this.world.isStatic) {
@ -110,7 +110,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
} }
public boolean isBlocking() { 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_() { public void l_() {
@ -126,7 +126,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
this.n(); this.n();
} }
} else { } else {
this.bp(); this.bt();
} }
} }
@ -213,7 +213,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
return this.abilities.isInvulnerable ? 0 : 80; return this.abilities.isInvulnerable ? 0 : 80;
} }
public int aa() { public int ab() {
return 10; 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(); 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()) { if (!this.world.isStatic && this.isSneaking()) {
this.mount((Entity) null); this.mount((Entity) null);
this.setSneaking(false); this.setSneaking(false);
@ -329,7 +329,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
float f = this.yaw; float f = this.yaw;
float f1 = this.pitch; float f1 = this.pitch;
super.T(); super.U();
this.bs = this.bt; this.bs = this.bt;
this.bt = 0.0F; this.bt = 0.0F;
this.k(this.locX - d0, this.locY - d1, this.locZ - d2); 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() { protected void bk() {
super.bh(); super.bk();
this.aS(); this.aV();
} }
public void c() { public void c() {
@ -359,10 +359,10 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
this.inventory.k(); this.inventory.k();
this.bs = this.bt; this.bs = this.bt;
super.c(); super.c();
AttributeInstance attributeinstance = this.a(GenericAttributes.d); AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.d);
if (!this.world.isStatic) { if (!this.world.isStatic) {
attributeinstance.a((double) this.abilities.b()); attributeinstance.setValue((double) this.abilities.b());
} }
this.aR = this.bL; 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.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); float f = MathHelper.sqrt(this.motX * this.motX + this.motZ * this.motZ);
// CraftBukkit - Math -> TrigMath // CraftBukkit - Math -> TrigMath
float f1 = (float) org.bukkit.craftbukkit.TrigMath.atan(-this.motY * 0.20000000298023224D) * 15.0F; 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; entity = ((EntityArrow) entity).shooter;
} }
if (entity instanceof EntityLiving) {
this.a((EntityLiving) entity, false);
}
this.a(StatisticList.x, Math.round(f * 10.0F)); this.a(StatisticList.x, Math.round(f * 10.0F));
return super.damageEntity(damagesource, f); return super.damageEntity(damagesource, f);
} }
@ -737,43 +733,15 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
// CraftBukkit end // 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) { protected void h(float f) {
this.inventory.a(f); this.inventory.a(f);
} }
public int aM() { public int aP() {
return this.inventory.l(); return this.inventory.l();
} }
public float bs() { public float bw() {
int i = 0; int i = 0;
ItemStack[] aitemstack = this.inventory.armor; ItemStack[] aitemstack = this.inventory.armor;
int j = aitemstack.length; int j = aitemstack.length;
@ -799,14 +767,14 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
f = this.c(damagesource, f); f = this.c(damagesource, f);
float f1 = f; float f1 = f;
f = Math.max(f - this.bj(), 0.0F); f = Math.max(f - this.bm(), 0.0F);
this.m(this.bj() - (f1 - f)); this.m(this.bm() - (f1 - f));
if (f != 0.0F) { if (f != 0.0F) {
this.a(damagesource.f()); this.a(damagesource.f());
float f2 = this.getHealth(); float f2 = this.getHealth();
this.setHealth(this.getHealth() - f); 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 void c(ItemStack itemstack) {}
public boolean p(Entity entity) { public boolean p(Entity entity) {
ItemStack itemstack = this.bt(); ItemStack itemstack = this.bx();
ItemStack itemstack1 = itemstack != null ? itemstack.cloneItemStack() : null; ItemStack itemstack1 = itemstack != null ? itemstack.cloneItemStack() : null;
if (!entity.c(this)) { if (!entity.c(this)) {
@ -838,7 +806,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
if (itemstack.a(this, (EntityLiving) entity)) { if (itemstack.a(this, (EntityLiving) entity)) {
// CraftBukkit - bypass infinite items; <= 0 -> == 0 // CraftBukkit - bypass infinite items; <= 0 -> == 0
if (itemstack.count == 0 && !this.abilities.canInstantlyBuild) { if (itemstack.count == 0 && !this.abilities.canInstantlyBuild) {
this.bu(); this.by();
} }
return true; return true;
@ -847,9 +815,9 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
return false; return false;
} else { } else {
if (itemstack != null && itemstack == this.bt()) { if (itemstack != null && itemstack == this.bx()) {
if (itemstack.count <= 0 && !this.abilities.canInstantlyBuild) { if (itemstack.count <= 0 && !this.abilities.canInstantlyBuild) {
this.bu(); this.by();
} else if (itemstack.count < itemstack1.count && this.abilities.canInstantlyBuild) { } else if (itemstack.count < itemstack1.count && this.abilities.canInstantlyBuild) {
itemstack.count = itemstack1.count; 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(); return this.inventory.getItemInHand();
} }
public void bu() { public void by() {
this.inventory.setItem(this.inventory.itemInHandIndex, (ItemStack) null); this.inventory.setItem(this.inventory.itemInHandIndex, (ItemStack) null);
} }
public double V() { public double W() {
return (double) (this.height - 0.5F); return (double) (this.height - 0.5F);
} }
public void attack(Entity entity) { public void attack(Entity entity) {
if (entity.ao()) { if (entity.ap()) {
if (!entity.i(this)) { if (!entity.i(this)) {
float f = (float) this.a(GenericAttributes.e).e(); float f = (float) this.getAttributeInstance(GenericAttributes.e).getValue();
int i = 0; int i = 0;
float f1 = 0.0F; 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; Object object = entity;
if (entity instanceof EntityComplexPart) { if (entity instanceof EntityComplexPart) {
@ -955,15 +923,11 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
itemstack.a((EntityLiving) object, this); itemstack.a((EntityLiving) object, this);
// CraftBukkit - bypass infinite items; <= 0 -> == 0 // CraftBukkit - bypass infinite items; <= 0 -> == 0
if (itemstack.count == 0) { if (itemstack.count == 0) {
this.bu(); this.by();
} }
} }
if (entity instanceof EntityLiving) { if (entity instanceof EntityLiving) {
if (entity.isAlive()) {
this.a((EntityLiving) entity, true);
}
this.a(StatisticList.w, Math.round(f * 10.0F)); this.a(StatisticList.w, Math.round(f * 10.0F));
if (j > 0 && flag2) { if (j > 0 && flag2) {
// CraftBukkit start - Call a combust event when somebody hits with a fire enchanted item // 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); this.mount((Entity) null);
} }
@ -1228,8 +1192,8 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
public void a(Statistic statistic, int i) {} public void a(Statistic statistic, int i) {}
protected void ba() { protected void bd() {
super.ba(); super.bd();
this.a(StatisticList.u, 1); this.a(StatisticList.u, 1);
if (this.isSprinting()) { if (this.isSprinting()) {
this.a(0.8F); 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); this.checkMovement(this.locX - d0, this.locY - d1, this.locZ - d2);
} }
public float bc() { public float bf() {
return (float) this.a(GenericAttributes.d).e(); return (float) this.getAttributeInstance(GenericAttributes.d).getValue();
} }
public void checkMovement(double d0, double d1, double d2) { 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) { 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; return (flag || this.foodData.c()) && !this.abilities.isInvulnerable;
} }
public boolean bE() { public boolean bI() {
return this.getHealth() > 0.0F && this.getHealth() < this.getMaxHealth(); return this.getHealth() > 0.0F && this.getHealth() < this.getMaxHealth();
} }
@ -1427,8 +1391,8 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
return true; return true;
} }
if (this.bt() != null) { if (this.bx() != null) {
ItemStack itemstack = this.bt(); ItemStack itemstack = this.bx();
if (itemstack.b(block) || itemstack.a(block) > 1.0F) { if (itemstack.b(block) || itemstack.a(block) > 1.0F) {
return true; 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]; return i == 0 ? this.inventory.getItemInHand() : this.inventory.armor[i - 1];
} }
public ItemStack aV() { public ItemStack aY() {
return this.inventory.getItemInHand(); return this.inventory.getItemInHand();
} }
@ -1519,7 +1483,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
return this.inventory.armor; return this.inventory.armor;
} }
public boolean av() { public boolean aw() {
return !this.abilities.isFlying; return !this.abilities.isFlying;
} }
@ -1527,7 +1491,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
return this.world.getScoreboard(); return this.world.getScoreboard();
} }
public ScoreboardTeam getScoreboardTeam() { public ScoreboardTeamBase getScoreboardTeam() {
return this.getScoreboard().getPlayerTeam(this.name); 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)); this.getDataWatcher().watch(17, Float.valueOf(f));
} }
public float bj() { public float bm() {
return this.getDataWatcher().getFloat(17); return this.getDataWatcher().getFloat(17);
} }
} }

Datei anzeigen

@ -47,9 +47,9 @@ public abstract class EntityInsentient extends EntityLiving {
} }
} }
protected void ax() { protected void ay() {
super.ax(); super.ay();
this.aT().b(GenericAttributes.b).a(16.0D); this.aW().b(GenericAttributes.b).setValue(16.0D);
} }
public ControllerLook getControllerLook() { public ControllerLook getControllerLook() {
@ -100,7 +100,7 @@ public abstract class EntityInsentient extends EntityLiving {
String s = this.r(); String s = this.r();
if (s != null) { 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_() { public void l_() {
super.l_(); super.l_();
if (!this.world.isStatic) { if (!this.world.isStatic) {
this.bB(); this.bF();
} }
} }
protected float f(float f, float f1) { protected float f(float f, float f1) {
if (this.bb()) { if (this.be()) {
this.bn.a(); this.bn.a();
return f1; return f1;
} else { } else {
@ -202,7 +202,7 @@ public abstract class EntityInsentient extends EntityLiving {
public void b(NBTTagCompound nbttagcompound) { public void b(NBTTagCompound nbttagcompound) {
super.b(nbttagcompound); super.b(nbttagcompound);
nbttagcompound.setBoolean("CanPickUpLoot", this.bz()); nbttagcompound.setBoolean("CanPickUpLoot", this.bD());
nbttagcompound.setBoolean("PersistenceRequired", this.persistent); nbttagcompound.setBoolean("PersistenceRequired", this.persistent);
NBTTagList nbttaglist = new NBTTagList(); NBTTagList nbttaglist = new NBTTagList();
@ -247,8 +247,6 @@ public abstract class EntityInsentient extends EntityLiving {
public void a(NBTTagCompound nbttagcompound) { public void a(NBTTagCompound nbttagcompound) {
super.a(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 // 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"); boolean data = nbttagcompound.getBoolean("CanPickUpLoot");
@ -304,7 +302,7 @@ public abstract class EntityInsentient extends EntityLiving {
public void c() { public void c() {
super.c(); super.c();
this.world.methodProfiler.a("looting"); 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)); List list = this.world.a(EntityItem.class, this.boundingBox.grow(1.0D, 0.0D, 1.0D));
Iterator iterator = list.iterator(); Iterator iterator = list.iterator();
@ -370,7 +368,7 @@ public abstract class EntityInsentient extends EntityLiving {
this.world.methodProfiler.b(); this.world.methodProfiler.b();
} }
protected boolean bb() { protected boolean be() {
return false; return false;
} }
@ -378,7 +376,7 @@ public abstract class EntityInsentient extends EntityLiving {
return true; return true;
} }
protected void bk() { protected void bo() {
if (this.persistent) { if (this.persistent) {
this.aV = 0; this.aV = 0;
} else { } else {
@ -403,10 +401,10 @@ public abstract class EntityInsentient extends EntityLiving {
} }
} }
protected void be() { protected void bh() {
++this.aV; ++this.aV;
this.world.methodProfiler.a("checkDespawn"); this.world.methodProfiler.a("checkDespawn");
this.bk(); this.bo();
this.world.methodProfiler.b(); this.world.methodProfiler.b();
this.world.methodProfiler.a("sensing"); this.world.methodProfiler.a("sensing");
this.bq.a(); this.bq.a();
@ -421,7 +419,7 @@ public abstract class EntityInsentient extends EntityLiving {
this.navigation.f(); this.navigation.f();
this.world.methodProfiler.b(); this.world.methodProfiler.b();
this.world.methodProfiler.a("mob tick"); this.world.methodProfiler.a("mob tick");
this.bg(); this.bj();
this.world.methodProfiler.b(); this.world.methodProfiler.b();
this.world.methodProfiler.a("controls"); this.world.methodProfiler.a("controls");
this.world.methodProfiler.a("move"); this.world.methodProfiler.a("move");
@ -434,11 +432,11 @@ public abstract class EntityInsentient extends EntityLiving {
this.world.methodProfiler.b(); this.world.methodProfiler.b();
} }
protected void bh() { protected void bk() {
super.bh(); super.bk();
this.be = 0.0F; this.be = 0.0F;
this.bf = 0.0F; this.bf = 0.0F;
this.bk(); this.bo();
float f = 8.0F; float f = 8.0F;
if (this.random.nextFloat() < 0.02F) { if (this.random.nextFloat() < 0.02F) {
@ -453,7 +451,7 @@ public abstract class EntityInsentient extends EntityLiving {
} }
if (this.bu != null) { 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)) { if (this.g-- <= 0 || this.bu.dead || this.bu.e((Entity) this) > (double) (f * f)) {
this.bu = null; this.bu = null;
} }
@ -474,7 +472,7 @@ public abstract class EntityInsentient extends EntityLiving {
} }
} }
public int bl() { public int bp() {
return 40; 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); 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; return 4;
} }
public int aq() { public int ar() {
if (this.getGoalTarget() == null) { if (this.getGoalTarget() == null) {
return 3; return 3;
} else { } else {
@ -536,7 +534,7 @@ public abstract class EntityInsentient extends EntityLiving {
} }
} }
public ItemStack aV() { public ItemStack aY() {
return this.equipment[0]; 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)) { if (this.random.nextFloat() < 0.15F * this.world.b(this.locX, this.locY, this.locZ)) {
int i = this.random.nextInt(2); int i = this.random.nextInt(2);
float f = this.world.difficulty == 3 ? 0.1F : 0.25F; 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); float f = this.world.b(this.locX, this.locY, this.locZ);
if (this.aV() != null && this.random.nextFloat() < 0.25F * f) { if (this.aY() != null && this.random.nextFloat() < 0.25F * f) {
EnchantmentManager.a(this.random, this.aV(), (int) (5.0F + f * (float) this.random.nextInt(18))); EnchantmentManager.a(this.random, this.aY(), (int) (5.0F + f * (float) this.random.nextInt(18)));
} }
for (int i = 0; i < 4; ++i) { for (int i = 0; i < 4; ++i) {
@ -717,11 +715,11 @@ public abstract class EntityInsentient extends EntityLiving {
} }
public GroupDataEntity a(GroupDataEntity groupdataentity) { 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; return groupdataentity;
} }
public boolean bu() { public boolean by() {
return false; return false;
} }
@ -729,7 +727,7 @@ public abstract class EntityInsentient extends EntityLiving {
return this.hasCustomName() ? this.getCustomName() : super.getLocalizedName(); return this.hasCustomName() ? this.getCustomName() : super.getLocalizedName();
} }
public void bv() { public void bz() {
this.persistent = true; this.persistent = true;
} }
@ -757,7 +755,7 @@ public abstract class EntityInsentient extends EntityLiving {
this.dropChances[i] = f; this.dropChances[i] = f;
} }
public boolean bz() { public boolean bD() {
return this.canPickUpLoot; return this.canPickUpLoot;
} }
@ -765,18 +763,18 @@ public abstract class EntityInsentient extends EntityLiving {
this.canPickUpLoot = flag; this.canPickUpLoot = flag;
} }
public boolean bA() { public boolean isPersistent() {
return this.persistent; return this.persistent;
} }
public final boolean c(EntityHuman entityhuman) { public final boolean c(EntityHuman entityhuman) {
if (this.bD() && this.bE() == entityhuman) { if (this.bH() && this.bI() == entityhuman) {
this.i(true); this.a(true, !entityhuman.abilities.canInstantlyBuild);
return true; return true;
} else { } else {
ItemStack itemstack = entityhuman.inventory.getItemInHand(); 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()) { if (!(this instanceof EntityTameableAnimal) || !((EntityTameableAnimal) this).isTamed()) {
this.b(entityhuman, true); this.b(entityhuman, true);
--itemstack.count; --itemstack.count;
@ -798,23 +796,23 @@ public abstract class EntityInsentient extends EntityLiving {
return false; return false;
} }
protected void bB() { protected void bF() {
if (this.bx != null) { if (this.bx != null) {
this.bF(); this.bJ();
} }
if (this.bv) { if (this.bv) {
if (this.bw == null || this.bw.dead) { 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) { if (this.bv) {
this.bv = false; this.bv = false;
this.bw = null; this.bw = null;
if (!this.world.isStatic) { if (!this.world.isStatic && flag1) {
this.b(Item.LEASH.id, 1); this.b(Item.LEASH.id, 1);
} }
@ -824,15 +822,15 @@ public abstract class EntityInsentient extends EntityLiving {
} }
} }
public boolean bC() { public boolean bG() {
return !this.bD() && !(this instanceof IMonster); return !this.bH() && !(this instanceof IMonster);
} }
public boolean bD() { public boolean bH() {
return this.bv; return this.bv;
} }
public Entity bE() { public Entity bI() {
return this.bw; 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.bv && this.bx != null) {
if (this.bx.hasKey("UUIDMost") && this.bx.hasKey("UUIDLeast")) { if (this.bx.hasKey("UUIDMost") && this.bx.hasKey("UUIDLeast")) {
UUID uuid = new UUID(this.bx.getLong("UUIDMost"), this.bx.getLong("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; this.bw = entityleash;
} else { } else {
this.i(false); this.a(false, true);
} }
} }

Datei anzeigen

@ -31,16 +31,16 @@ public class EntityIronGolem extends EntityGolem {
this.datawatcher.a(16, Byte.valueOf((byte) 0)); this.datawatcher.a(16, Byte.valueOf((byte) 0));
} }
public boolean bb() { public boolean be() {
return true; return true;
} }
protected void bg() { protected void bj() {
if (--this.bq <= 0) { if (--this.bq <= 0) {
this.bq = 70 + this.random.nextInt(50); 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); this.bp = this.world.villages.getClosestVillage(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ), 32);
if (this.bp == null) { if (this.bp == null) {
this.bN(); this.bR();
} else { } else {
ChunkCoordinates chunkcoordinates = this.bp.getCenter(); ChunkCoordinates chunkcoordinates = this.bp.getCenter();
@ -48,13 +48,13 @@ public class EntityIronGolem extends EntityGolem {
} }
} }
super.bg(); super.bj();
} }
protected void ax() { protected void ay() {
super.ax(); super.ay();
this.a(GenericAttributes.a).a(100.0D); this.getAttributeInstance(GenericAttributes.a).setValue(100.0D);
this.a(GenericAttributes.d).a(0.25D); this.getAttributeInstance(GenericAttributes.d).setValue(0.25D);
} }
protected int h(int i) { protected int h(int i) {
@ -62,7 +62,7 @@ public class EntityIronGolem extends EntityGolem {
} }
protected void n(Entity entity) { 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); this.setGoalTarget((EntityLiving) entity);
} }
@ -92,12 +92,12 @@ public class EntityIronGolem extends EntityGolem {
} }
public boolean a(Class oclass) { 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) { public void b(NBTTagCompound nbttagcompound) {
super.b(nbttagcompound); super.b(nbttagcompound);
nbttagcompound.setBoolean("PlayerCreated", this.bS()); nbttagcompound.setBoolean("PlayerCreated", this.bW());
} }
public void a(NBTTagCompound nbttagcompound) { public void a(NBTTagCompound nbttagcompound) {
@ -118,7 +118,7 @@ public class EntityIronGolem extends EntityGolem {
return flag; return flag;
} }
public Village bP() { public Village bT() {
return this.bp; return this.bp;
} }
@ -131,11 +131,11 @@ public class EntityIronGolem extends EntityGolem {
return "none"; return "none";
} }
protected String aK() { protected String aN() {
return "mob.irongolem.hit"; return "mob.irongolem.hit";
} }
protected String aL() { protected String aO() {
return "mob.irongolem.death"; return "mob.irongolem.death";
} }
@ -164,11 +164,11 @@ public class EntityIronGolem extends EntityGolem {
// CraftBukkit end // CraftBukkit end
} }
public int bR() { public int bV() {
return this.bs; return this.bs;
} }
public boolean bS() { public boolean bW() {
return (this.datawatcher.getByte(16) & 1) != 0; return (this.datawatcher.getByte(16) & 1) != 0;
} }
@ -183,7 +183,7 @@ public class EntityIronGolem extends EntityGolem {
} }
public void die(DamageSource damagesource) { 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); this.bp.a(this.killer.getName(), -5);
} }

Datei anzeigen

@ -266,7 +266,7 @@ public class EntityItem extends Entity {
return LocaleI18n.get("item." + this.getItemStack().a()); return LocaleI18n.get("item." + this.getItemStack().a());
} }
public boolean ao() { public boolean ap() {
return false; return false;
} }

Datei anzeigen

@ -70,9 +70,10 @@ public abstract class EntityLiving extends Entity {
public EntityLiving lastDamager; // CraftBukkit - private -> public public EntityLiving lastDamager; // CraftBukkit - private -> public
private int j; private int j;
private EntityLiving bn; private EntityLiving bn;
private float bo; private int bo;
private int bp; private float bp;
private float bq; private int bq;
private float br;
// CraftBukkit start // CraftBukkit start
public int expToDrop; public int expToDrop;
public int maxAirTicks = 300; public int maxAirTicks = 300;
@ -80,7 +81,7 @@ public abstract class EntityLiving extends Entity {
public EntityLiving(World world) { public EntityLiving(World world) {
super(world); super(world);
this.ax(); this.ay();
this.setHealth(this.getMaxHealth()); this.setHealth(this.getMaxHealth());
this.m = true; this.m = true;
this.aM = (float) (Math.random() + 1.0D) * 0.01F; 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)); this.datawatcher.a(6, Float.valueOf(1.0F));
} }
protected void ax() { protected void ay() {
this.aT().b(GenericAttributes.a); this.aW().b(GenericAttributes.a);
this.aT().b(GenericAttributes.c); this.aW().b(GenericAttributes.c);
this.aT().b(GenericAttributes.d); this.aW().b(GenericAttributes.d);
if (!this.bb()) { if (!this.be()) {
this.a(GenericAttributes.d).a(0.10000000149011612D); this.getAttributeInstance(GenericAttributes.d).setValue(0.10000000149011612D);
} }
} }
@ -134,7 +135,7 @@ public abstract class EntityLiving extends Entity {
super.a(d0, flag); super.a(d0, flag);
} }
public boolean ay() { public boolean az() {
return false; return false;
} }
@ -153,7 +154,7 @@ public abstract class EntityLiving extends Entity {
boolean flag = this instanceof EntityHuman && ((EntityHuman) this).abilities.isInvulnerable; boolean flag = this instanceof EntityHuman && ((EntityHuman) this).abilities.isInvulnerable;
if (this.isAlive() && this.a(Material.WATER)) { 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())); this.setAirTicks(this.h(this.getAirTicks()));
if (this.getAirTicks() == -20) { if (this.getAirTicks() == -20) {
this.setAirTicks(0); this.setAirTicks(0);
@ -171,7 +172,7 @@ public abstract class EntityLiving extends Entity {
} }
this.extinguish(); 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); this.mount((Entity) null);
} }
} else { } else {
@ -196,7 +197,7 @@ public abstract class EntityLiving extends Entity {
} }
if (this.getHealth() <= 0.0F) { if (this.getHealth() <= 0.0F) {
this.az(); this.aA();
} }
if (this.lastDamageByPlayerTime > 0) { if (this.lastDamageByPlayerTime > 0) {
@ -209,17 +210,11 @@ public abstract class EntityLiving extends Entity {
this.bn = null; this.bn = null;
} }
if (this.lastDamager != null) { if (this.lastDamager != null && !this.lastDamager.isAlive()) {
if (!this.lastDamager.isAlive()) { this.b((EntityLiving) null);
this.b((EntityLiving) null);
} else if (this.j > 0) {
--this.j;
} else {
this.b((EntityLiving) null);
}
} }
this.aF(); this.aI();
this.aZ = this.aY; this.aZ = this.aY;
this.aO = this.aN; this.aO = this.aN;
this.aQ = this.aP; this.aQ = this.aP;
@ -244,7 +239,7 @@ public abstract class EntityLiving extends Entity {
return false; return false;
} }
protected void az() { protected void aA() {
++this.deathTicks; ++this.deathTicks;
if (this.deathTicks >= 20 && !this.dead) { // CraftBukkit - (this.deathTicks == 20) -> (this.deathTicks >= 20 && !this.dead) if (this.deathTicks >= 20 && !this.dead) { // CraftBukkit - (this.deathTicks == 20) -> (this.deathTicks >= 20 && !this.dead)
int i; int i;
@ -286,7 +281,7 @@ public abstract class EntityLiving extends Entity {
return false; return false;
} }
public Random aB() { public Random aC() {
return this.random; return this.random;
} }
@ -294,22 +289,34 @@ public abstract class EntityLiving extends Entity {
return this.lastDamager; return this.lastDamager;
} }
public void b(EntityLiving entityliving) { public int aE() {
this.lastDamager = entityliving; return this.j;
this.j = this.lastDamager != null ? 100 : 0;
} }
public EntityLiving aD() { public void b(EntityLiving entityliving) {
this.lastDamager = entityliving;
this.j = this.ticksLived;
}
public EntityLiving aF() {
return this.bn; return this.bn;
} }
public int aG() {
return this.bo;
}
public void k(Entity entity) { public void k(Entity entity) {
if (entity instanceof EntityLiving) { if (entity instanceof EntityLiving) {
this.bn = (EntityLiving) entity; this.bn = (EntityLiving) entity;
} else {
this.bn = null;
} }
this.bo = this.ticksLived;
} }
public int aE() { public int aH() {
return this.aV; return this.aV;
} }
@ -319,7 +326,7 @@ public abstract class EntityLiving extends Entity {
nbttagcompound.setShort("HurtTime", (short) this.hurtTicks); nbttagcompound.setShort("HurtTime", (short) this.hurtTicks);
nbttagcompound.setShort("DeathTime", (short) this.deathTicks); nbttagcompound.setShort("DeathTime", (short) this.deathTicks);
nbttagcompound.setShort("AttackTime", (short) this.attackTicks); nbttagcompound.setShort("AttackTime", (short) this.attackTicks);
nbttagcompound.setFloat("AbsorptionAmount", this.bj()); nbttagcompound.setFloat("AbsorptionAmount", this.bm());
ItemStack[] aitemstack = this.getEquipment(); ItemStack[] aitemstack = this.getEquipment();
int i = aitemstack.length; 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(); aitemstack = this.getEquipment();
i = aitemstack.length; i = aitemstack.length;
@ -361,7 +368,7 @@ public abstract class EntityLiving extends Entity {
public void a(NBTTagCompound nbttagcompound) { public void a(NBTTagCompound nbttagcompound) {
this.m(nbttagcompound.getFloat("AbsorptionAmount")); this.m(nbttagcompound.getFloat("AbsorptionAmount"));
if (nbttagcompound.hasKey("Attributes") && this.world != null && !this.world.isStatic) { 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")) { if (nbttagcompound.hasKey("ActiveEffects")) {
@ -379,9 +386,9 @@ public abstract class EntityLiving extends Entity {
if (nbttagcompound.hasKey("Bukkit.MaxHealth")) { if (nbttagcompound.hasKey("Bukkit.MaxHealth")) {
NBTBase nbtbase = nbttagcompound.get("Bukkit.MaxHealth"); NBTBase nbtbase = nbttagcompound.get("Bukkit.MaxHealth");
if (nbtbase.getTypeId() == 5) { 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) { } 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 // CraftBukkit end
@ -405,7 +412,7 @@ public abstract class EntityLiving extends Entity {
this.attackTicks = nbttagcompound.getShort("AttackTime"); this.attackTicks = nbttagcompound.getShort("AttackTime");
} }
protected void aF() { protected void aI() {
Iterator iterator = this.effects.keySet().iterator(); Iterator iterator = this.effects.keySet().iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
@ -415,10 +422,10 @@ public abstract class EntityLiving extends Entity {
if (!mobeffect.tick(this)) { if (!mobeffect.tick(this)) {
if (!this.world.isStatic) { if (!this.world.isStatic) {
iterator.remove(); iterator.remove();
this.c(mobeffect); this.b(mobeffect);
} }
} else if (mobeffect.getDuration() % 600 == 0) { } 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(); Iterator iterator = this.effects.keySet().iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
@ -476,7 +483,7 @@ public abstract class EntityLiving extends Entity {
if (!this.world.isStatic) { if (!this.world.isStatic) {
iterator.remove(); iterator.remove();
this.c(mobeffect); this.b(mobeffect);
} }
} }
} }
@ -500,10 +507,10 @@ public abstract class EntityLiving extends Entity {
} }
public void addEffect(MobEffect mobeffect) { public void addEffect(MobEffect mobeffect) {
if (this.e(mobeffect)) { if (this.d(mobeffect)) {
if (this.effects.containsKey(Integer.valueOf(mobeffect.getEffectId()))) { if (this.effects.containsKey(Integer.valueOf(mobeffect.getEffectId()))) {
((MobEffect) this.effects.get(Integer.valueOf(mobeffect.getEffectId()))).a(mobeffect); ((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 { } else {
this.effects.put(Integer.valueOf(mobeffect.getEffectId()), mobeffect); this.effects.put(Integer.valueOf(mobeffect.getEffectId()), mobeffect);
this.a(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) { if (this.getMonsterType() == EnumMonsterType.UNDEAD) {
int i = mobeffect.getEffectId(); int i = mobeffect.getEffectId();
@ -523,7 +530,7 @@ public abstract class EntityLiving extends Entity {
return true; return true;
} }
public boolean aI() { public boolean aL() {
return this.getMonsterType() == EnumMonsterType.UNDEAD; return this.getMonsterType() == EnumMonsterType.UNDEAD;
} }
@ -531,32 +538,29 @@ public abstract class EntityLiving extends Entity {
MobEffect mobeffect = (MobEffect) this.effects.remove(Integer.valueOf(i)); MobEffect mobeffect = (MobEffect) this.effects.remove(Integer.valueOf(i));
if (mobeffect != null) { if (mobeffect != null) {
this.c(mobeffect); this.b(mobeffect);
} }
} }
protected void a(MobEffect mobeffect) { protected void a(MobEffect mobeffect) {
this.updateEffects = true; this.updateEffects = true;
if (!this.world.isStatic) { if (!this.world.isStatic) {
MobEffectList.byId[mobeffect.getEffectId()].b(this, this.aT(), mobeffect.getAmplifier()); MobEffectList.byId[mobeffect.getEffectId()].b(this, this.aW(), mobeffect.getAmplifier());
}
}
protected void a(MobEffect mobeffect, boolean flag) {
this.updateEffects = true;
if (flag && !this.world.isStatic) {
MobEffectList.byId[mobeffect.getEffectId()].a(this, this.aW(), mobeffect.getAmplifier());
MobEffectList.byId[mobeffect.getEffectId()].b(this, this.aW(), mobeffect.getAmplifier());
} }
} }
protected void b(MobEffect mobeffect) { protected void b(MobEffect mobeffect) {
this.updateEffects = true; this.updateEffects = true;
if (!this.world.isStatic) { if (!this.world.isStatic) {
MobEffectList.byId[mobeffect.getEffectId()].a(this, this.aT(), mobeffect.getAmplifier()); MobEffectList.byId[mobeffect.getEffectId()].a(this, this.aW(), mobeffect.getAmplifier());
}
if (!this.world.isStatic) {
MobEffectList.byId[mobeffect.getEffectId()].b(this, this.aT(), mobeffect.getAmplifier());
}
}
protected void c(MobEffect mobeffect) {
this.updateEffects = true;
if (!this.world.isStatic) {
MobEffectList.byId[mobeffect.getEffectId()].a(this, this.aT(), mobeffect.getAmplifier());
} }
} }
@ -677,12 +681,12 @@ public abstract class EntityLiving extends Entity {
if (this.getHealth() <= 0.0F) { if (this.getHealth() <= 0.0F) {
if (flag) { if (flag) {
this.makeSound(this.aL(), this.aW(), this.aX()); this.makeSound(this.aO(), this.aZ(), this.ba());
} }
this.die(damagesource); this.die(damagesource);
} else if (flag) { } else if (flag) {
this.makeSound(this.aK(), this.aW(), this.aX()); this.makeSound(this.aN(), this.aZ(), this.ba());
} }
return true; return true;
@ -709,7 +713,7 @@ public abstract class EntityLiving extends Entity {
public void die(DamageSource damagesource) { public void die(DamageSource damagesource) {
Entity entity = damagesource.getEntity(); Entity entity = damagesource.getEntity();
EntityLiving entityliving = this.aO(); EntityLiving entityliving = this.aR();
if (this.bb >= 0 && entityliving != null) { if (this.bb >= 0 && entityliving != null) {
entityliving.b(this, this.bb); entityliving.b(this, this.bb);
@ -748,7 +752,7 @@ public abstract class EntityLiving extends Entity {
protected void dropEquipment(boolean flag, int i) {} protected void dropEquipment(boolean flag, int i) {}
public void a(Entity entity, float f, double d0, double d1) { 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; this.an = true;
float f1 = MathHelper.sqrt(d0 * d0 + d1 * d1); float f1 = MathHelper.sqrt(d0 * d0 + d1 * d1);
float f2 = 0.4F; float f2 = 0.4F;
@ -765,11 +769,11 @@ public abstract class EntityLiving extends Entity {
} }
} }
protected String aK() { protected String aN() {
return "damage.hit"; return "damage.hit";
} }
protected String aL() { protected String aO() {
return "damage.hit"; return "damage.hit";
} }
@ -832,7 +836,7 @@ public abstract class EntityLiving extends Entity {
} }
} }
public int aM() { public int aP() {
int i = 0; int i = 0;
ItemStack[] aitemstack = this.getEquipment(); ItemStack[] aitemstack = this.getEquipment();
int j = aitemstack.length; int j = aitemstack.length;
@ -854,7 +858,7 @@ public abstract class EntityLiving extends Entity {
protected float b(DamageSource damagesource, float f) { protected float b(DamageSource damagesource, float f) {
if (!damagesource.ignoresArmor()) { if (!damagesource.ignoresArmor()) {
int i = 25 - this.aM(); int i = 25 - this.aP();
float f1 = f * (float) i; float f1 = f * (float) i;
this.h(f); this.h(f);
@ -904,31 +908,31 @@ public abstract class EntityLiving extends Entity {
f = this.c(damagesource, f); f = this.c(damagesource, f);
float f1 = f; float f1 = f;
f = Math.max(f - this.bj(), 0.0F); f = Math.max(f - this.bm(), 0.0F);
this.m(this.bj() - (f1 - f)); this.m(this.bm() - (f1 - f));
if (f != 0.0F) { if (f != 0.0F) {
float f2 = this.getHealth(); float f2 = this.getHealth();
this.setHealth(f2 - f); this.setHealth(f2 - f);
this.aN().a(damagesource, f2, f); this.aQ().a(damagesource, f2, f);
this.m(this.bj() - f); this.m(this.bm() - f);
} }
} }
} }
public CombatTracker aN() { public CombatTracker aQ() {
return this.combatTracker; 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))); return (EntityLiving) (this.combatTracker.c() != null ? this.combatTracker.c() : (this.killer != null ? this.killer : (this.lastDamager != null ? this.lastDamager : null)));
} }
public final float getMaxHealth() { 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); 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); 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) { if (!this.au || this.av >= this.h() / 2 || this.av < 0) {
this.av = -1; this.av = -1;
this.au = true; this.au = true;
@ -954,7 +958,7 @@ public abstract class EntityLiving extends Entity {
this.damageEntity(DamageSource.OUT_OF_WORLD, 4.0F); this.damageEntity(DamageSource.OUT_OF_WORLD, 4.0F);
} }
protected void aS() { protected void aV() {
int i = this.h(); int i = this.h();
if (this.au) { if (this.au) {
@ -970,17 +974,13 @@ public abstract class EntityLiving extends Entity {
this.aE = (float) this.av / (float) i; this.aE = (float) this.av / (float) i;
} }
public AttributeInstance a(IAttribute iattribute) { public AttributeInstance getAttributeInstance(IAttribute iattribute) {
return this.aT().a(iattribute); return this.aW().a(iattribute);
} }
public AttributeMapBase aT() { public AttributeMapBase aW() {
if (this.d == null) { if (this.d == null) {
if (this.world != null && !this.world.isStatic) { this.d = new AttributeMapServer();
this.d = new AttributeMapServer();
} else {
this.d = new AttributeMapClient();
}
} }
return this.d; return this.d;
@ -990,7 +990,7 @@ public abstract class EntityLiving extends Entity {
return EnumMonsterType.UNDEFINED; return EnumMonsterType.UNDEFINED;
} }
public abstract ItemStack aV(); public abstract ItemStack aY();
public abstract ItemStack getEquipment(int i); public abstract ItemStack getEquipment(int i);
@ -998,27 +998,28 @@ public abstract class EntityLiving extends Entity {
public void setSprinting(boolean flag) { public void setSprinting(boolean flag) {
super.setSprinting(flag); super.setSprinting(flag);
if (!this.world.isStatic) { AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.d);
AttributeInstance attributeinstance = this.a(GenericAttributes.d);
if (attributeinstance.a(b) != null) {
attributeinstance.b(c); attributeinstance.b(c);
if (flag) { }
attributeinstance.a(c);
} if (flag) {
attributeinstance.a(c);
} }
} }
public abstract ItemStack[] getEquipment(); public abstract ItemStack[] getEquipment();
protected float aW() { protected float aZ() {
return 1.0F; 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; 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; return this.getHealth() <= 0.0F;
} }
@ -1057,7 +1058,7 @@ public abstract class EntityLiving extends Entity {
this.enderTeleportTo(d0, d1, d2); this.enderTeleportTo(d0, d1, d2);
} }
protected void ba() { protected void bd() {
this.motY = 0.41999998688697815D; this.motY = 0.41999998688697815D;
if (this.hasEffect(MobEffectList.JUMP)) { if (this.hasEffect(MobEffectList.JUMP)) {
this.motY += (double) ((float) (this.getEffect(MobEffectList.JUMP).getAmplifier() + 1) * 0.1F); 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)) { if (this.G() && (!(this instanceof EntityHuman) || !((EntityHuman) this).abilities.isFlying)) {
d0 = this.locY; 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.move(this.motX, this.motY, this.motZ);
this.motX *= 0.800000011920929D; this.motX *= 0.800000011920929D;
this.motY *= 0.800000011920929D; this.motY *= 0.800000011920929D;
@ -1114,7 +1115,7 @@ public abstract class EntityLiving extends Entity {
float f4; float f4;
if (this.onGround) { if (this.onGround) {
f4 = this.bc() * f3; f4 = this.bf() * f3;
} else { } else {
f4 = this.aR; f4 = this.aR;
} }
@ -1194,16 +1195,16 @@ public abstract class EntityLiving extends Entity {
this.aH += this.aG; this.aH += this.aG;
} }
protected boolean bb() { protected boolean be() {
return false; return false;
} }
public float bc() { public float bf() {
return this.bb() ? this.bo : 0.1F; return this.be() ? this.bp : 0.1F;
} }
public void i(float f) { public void i(float f) {
this.bo = f; this.bp = f;
} }
public boolean m(Entity entity) { public boolean m(Entity entity) {
@ -1218,7 +1219,7 @@ public abstract class EntityLiving extends Entity {
public void l_() { public void l_() {
super.l_(); super.l_();
if (!this.world.isStatic) { if (!this.world.isStatic) {
int i = this.aQ(); int i = this.aT();
if (i > 0) { if (i > 0) {
if (this.aw <= 0) { if (this.aw <= 0) {
@ -1345,8 +1346,8 @@ public abstract class EntityLiving extends Entity {
} }
public void c() { public void c() {
if (this.bp > 0) { if (this.bq > 0) {
--this.bp; --this.bq;
} }
if (this.bh > 0) { if (this.bh > 0) {
@ -1360,7 +1361,7 @@ public abstract class EntityLiving extends Entity {
--this.bh; --this.bh;
this.setPosition(d0, d1, d2); this.setPosition(d0, d1, d2);
this.b(this.yaw, this.pitch); this.b(this.yaw, this.pitch);
} else if (!this.bi()) { } else if (!this.bl()) {
this.motX *= 0.98D; this.motX *= 0.98D;
this.motY *= 0.98D; this.motY *= 0.98D;
this.motZ *= 0.98D; this.motZ *= 0.98D;
@ -1379,19 +1380,19 @@ public abstract class EntityLiving extends Entity {
} }
this.world.methodProfiler.a("ai"); this.world.methodProfiler.a("ai");
if (this.aY()) { if (this.bb()) {
this.bd = false; this.bd = false;
this.be = 0.0F; this.be = 0.0F;
this.bf = 0.0F; this.bf = 0.0F;
this.bg = 0.0F; this.bg = 0.0F;
} else if (this.bi()) { } else if (this.bl()) {
if (this.bb()) { if (this.be()) {
this.world.methodProfiler.a("newAi"); this.world.methodProfiler.a("newAi");
this.be(); this.bh();
this.world.methodProfiler.b(); this.world.methodProfiler.b();
} else { } else {
this.world.methodProfiler.a("oldAi"); this.world.methodProfiler.a("oldAi");
this.bh(); this.bk();
this.world.methodProfiler.b(); this.world.methodProfiler.b();
this.aP = this.yaw; this.aP = this.yaw;
} }
@ -1401,15 +1402,15 @@ public abstract class EntityLiving extends Entity {
this.world.methodProfiler.a("jump"); this.world.methodProfiler.a("jump");
if (this.bd) { if (this.bd) {
if (!this.G() && !this.I()) { if (!this.G() && !this.I()) {
if (this.onGround && this.bp == 0) { if (this.onGround && this.bq == 0) {
this.ba(); this.bd();
this.bp = 10; this.bq = 10;
} }
} else { } else {
this.motY += 0.03999999910593033D; this.motY += 0.03999999910593033D;
} }
} else { } else {
this.bp = 0; this.bq = 0;
} }
this.world.methodProfiler.b(); this.world.methodProfiler.b();
@ -1421,15 +1422,15 @@ public abstract class EntityLiving extends Entity {
this.world.methodProfiler.b(); this.world.methodProfiler.b();
this.world.methodProfiler.a("push"); this.world.methodProfiler.a("push");
if (!this.world.isStatic) { if (!this.world.isStatic) {
this.bf(); this.bi();
} }
this.world.methodProfiler.b(); 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)); List list = this.world.getEntities(this, this.boundingBox.grow(0.20000000298023224D, 0.0D, 0.20000000298023224D));
if (list != null && !list.isEmpty()) { if (list != null && !list.isEmpty()) {
@ -1454,16 +1455,16 @@ public abstract class EntityLiving extends Entity {
entity.collide(this); entity.collide(this);
} }
public void T() { public void U() {
super.T(); super.U();
this.aW = this.aX; this.aW = this.aX;
this.aX = 0.0F; this.aX = 0.0F;
this.fallDistance = 0.0F; this.fallDistance = 0.0F;
} }
protected void bg() {} protected void bj() {}
protected void bh() { protected void bk() {
++this.aV; ++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; 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); 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; return !this.world.isStatic;
} }
@ -1538,15 +1539,15 @@ public abstract class EntityLiving extends Entity {
} }
protected void J() { 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() { public float getHeadRotation() {
return this.aP; return this.aP;
} }
public float bj() { public float bm() {
return this.bq; return this.br;
} }
public void m(float f) { public void m(float f) {
@ -1554,6 +1555,18 @@ public abstract class EntityLiving extends Entity {
f = 0.0F; 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;
} }
} }

Datei anzeigen

@ -7,16 +7,16 @@ public class EntityMagmaCube extends EntitySlime {
this.fireProof = true; this.fireProof = true;
} }
protected void ax() { protected void ay() {
super.ax(); super.ay();
this.a(GenericAttributes.d).a(0.20000000298023224D); this.getAttributeInstance(GenericAttributes.d).setValue(0.20000000298023224D);
} }
public boolean canSpawn() { 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); 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; return this.getSize() * 3;
} }
@ -24,11 +24,11 @@ public class EntityMagmaCube extends EntitySlime {
return 1.0F; return 1.0F;
} }
protected String bF() { protected String bJ() {
return "flame"; return "flame";
} }
protected EntitySlime bG() { protected EntitySlime bK() {
return new EntityMagmaCube(this.world); return new EntityMagmaCube(this.world);
} }
@ -61,38 +61,38 @@ public class EntityMagmaCube extends EntitySlime {
return false; return false;
} }
protected int bH() { protected int bL() {
return super.bH() * 4; return super.bL() * 4;
} }
protected void bI() { protected void bM() {
this.h *= 0.9F; this.h *= 0.9F;
} }
protected void ba() { protected void bd() {
this.motY = (double) (0.42F + (float) this.getSize() * 0.1F); this.motY = (double) (0.42F + (float) this.getSize() * 0.1F);
this.an = true; this.an = true;
} }
protected void b(float f) {} protected void b(float f) {}
protected boolean bJ() { protected boolean bN() {
return true; return true;
} }
protected int bK() { protected int bO() {
return super.bK() + 2; return super.bO() + 2;
} }
protected String aK() { protected String aN() {
return "mob.slime." + (this.getSize() > 1 ? "big" : "small"); return "mob.slime." + (this.getSize() > 1 ? "big" : "small");
} }
protected String aL() { protected String aO() {
return "mob.slime." + (this.getSize() > 1 ? "big" : "small"); return "mob.slime." + (this.getSize() > 1 ? "big" : "small");
} }
protected String bL() { protected String bP() {
return this.getSize() > 1 ? "mob.magmacube.big" : "mob.magmacube.small"; return this.getSize() > 1 ? "mob.magmacube.big" : "mob.magmacube.small";
} }
@ -100,7 +100,7 @@ public class EntityMagmaCube extends EntitySlime {
return false; return false;
} }
protected boolean bM() { protected boolean bQ() {
return true; return true;
} }
} }

Datei anzeigen

@ -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 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; 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 (true || minecraftserver.getAllowNether()) { // CraftBukkit - multi-world should still allow teleport even if default vanilla nether disabled
if (this.vehicle == null && this.aq++ >= i) { if (this.vehicle == null && this.aq++ >= i) {
this.aq = i; this.aq = i;
this.portalCooldown = this.aa(); this.portalCooldown = this.ab();
byte b0; byte b0;
if (this.world.worldProvider.dimension == -1) { if (this.world.worldProvider.dimension == -1) {

Datei anzeigen

@ -10,7 +10,7 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
} }
public void c() { public void c() {
this.aS(); this.aV();
float f = this.d(1.0F); float f = this.d(1.0F);
if (f > 0.5F) { if (f > 0.5F) {
@ -68,7 +68,7 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
} }
public boolean m(Entity entity) { public boolean m(Entity entity) {
float f = (float) this.a(GenericAttributes.e).e(); float f = (float) this.getAttributeInstance(GenericAttributes.e).getValue();
int i = 0; int i = 0;
if (entity instanceof EntityLiving) { 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(); return this.world.difficulty > 0 && this.i_() && super.canSpawn();
} }
protected void ax() { protected void ay() {
super.ax(); super.ay();
this.aT().b(GenericAttributes.e); this.aW().b(GenericAttributes.e);
} }
} }

Datei anzeigen

@ -27,7 +27,7 @@ public class EntityOcelot extends EntityTameableAnimal {
this.datawatcher.a(18, Byte.valueOf((byte) 0)); this.datawatcher.a(18, Byte.valueOf((byte) 0));
} }
public void bg() { public void bj() {
if (this.getControllerMove().a()) { if (this.getControllerMove().a()) {
double d0 = this.getControllerMove().b(); double d0 = this.getControllerMove().b();
@ -51,14 +51,14 @@ public class EntityOcelot extends EntityTameableAnimal {
return !this.isTamed() && this.ticksLived > 2400; return !this.isTamed() && this.ticksLived > 2400;
} }
public boolean bb() { public boolean be() {
return true; return true;
} }
protected void ax() { protected void ay() {
super.ax(); super.ay();
this.a(GenericAttributes.a).a(10.0D); this.getAttributeInstance(GenericAttributes.a).setValue(10.0D);
this.a(GenericAttributes.d).a(0.30000001192092896D); this.getAttributeInstance(GenericAttributes.d).setValue(0.30000001192092896D);
} }
protected void b(float f) {} protected void b(float f) {}
@ -74,18 +74,18 @@ public class EntityOcelot extends EntityTameableAnimal {
} }
protected String r() { 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"; return "mob.cat.hitt";
} }
protected String aL() { protected String aO() {
return "mob.cat.hitt"; return "mob.cat.hitt";
} }
protected float aW() { protected float aZ() {
return 0.4F; return 0.4F;
} }
@ -132,11 +132,11 @@ public class EntityOcelot extends EntityTameableAnimal {
this.setTamed(true); this.setTamed(true);
this.setCatType(1 + this.world.random.nextInt(3)); this.setCatType(1 + this.world.random.nextInt(3));
this.setOwnerName(entityhuman.getName()); this.setOwnerName(entityhuman.getName());
this.j(true); this.i(true);
this.bp.setSitting(true); this.bp.setSitting(true);
this.world.broadcastEntityEffect(this, (byte) 7); this.world.broadcastEntityEffect(this, (byte) 7);
} else { } else {
this.j(false); this.i(false);
this.world.broadcastEntityEffect(this, (byte) 6); this.world.broadcastEntityEffect(this, (byte) 6);
} }
} }
@ -173,7 +173,7 @@ public class EntityOcelot extends EntityTameableAnimal {
} else { } else {
EntityOcelot entityocelot = (EntityOcelot) entityanimal; EntityOcelot entityocelot = (EntityOcelot) entityanimal;
return !entityocelot.isTamed() ? false : this.bU() && entityocelot.bU(); return !entityocelot.isTamed() ? false : this.bY() && entityocelot.bY();
} }
} }

Datei anzeigen

@ -22,22 +22,22 @@ public class EntityPig extends EntityAnimal {
this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this)); this.goalSelector.a(8, new PathfinderGoalRandomLookaround(this));
} }
public boolean bb() { public boolean be() {
return true; return true;
} }
protected void ax() { protected void ay() {
super.ax(); super.ay();
this.a(GenericAttributes.a).a(10.0D); this.getAttributeInstance(GenericAttributes.a).setValue(10.0D);
this.a(GenericAttributes.d).a(0.25D); this.getAttributeInstance(GenericAttributes.d).setValue(0.25D);
} }
protected void be() { protected void bh() {
super.be(); super.bh();
} }
public boolean bu() { public boolean by() {
ItemStack itemstack = ((EntityHuman) this.passenger).aV(); ItemStack itemstack = ((EntityHuman) this.passenger).aY();
return itemstack != null && itemstack.id == Item.CARROT_STICK.id; return itemstack != null && itemstack.id == Item.CARROT_STICK.id;
} }
@ -61,11 +61,11 @@ public class EntityPig extends EntityAnimal {
return "mob.pig.say"; return "mob.pig.say";
} }
protected String aK() { protected String aN() {
return "mob.pig.say"; return "mob.pig.say";
} }
protected String aL() { protected String aO() {
return "mob.pig.death"; return "mob.pig.death";
} }
@ -153,7 +153,7 @@ public class EntityPig extends EntityAnimal {
return itemstack != null && itemstack.id == Item.CARROT.id; return itemstack != null && itemstack.id == Item.CARROT.id;
} }
public PathfinderGoalPassengerCarrotStick bQ() { public PathfinderGoalPassengerCarrotStick bU() {
return this.bp; return this.bp;
} }

Datei anzeigen

@ -21,20 +21,20 @@ public class EntityPigZombie extends EntityZombie {
this.fireProof = true; this.fireProof = true;
} }
protected void ax() { protected void ay() {
super.ax(); super.ay();
this.a(bp).a(0.0D); this.getAttributeInstance(bp).setValue(0.0D);
this.a(GenericAttributes.d).a(0.5D); this.getAttributeInstance(GenericAttributes.d).setValue(0.5D);
this.a(GenericAttributes.e).a(5.0D); this.getAttributeInstance(GenericAttributes.e).setValue(5.0D);
} }
protected boolean bb() { protected boolean be() {
return false; return false;
} }
public void l_() { public void l_() {
if (this.bu != this.target && !this.world.isStatic) { if (this.bu != this.target && !this.world.isStatic) {
AttributeInstance attributeinstance = this.a(GenericAttributes.d); AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.d);
attributeinstance.b(br); attributeinstance.b(br);
if (this.target != null) { if (this.target != null) {
@ -44,7 +44,7 @@ public class EntityPigZombie extends EntityZombie {
this.bu = this.target; this.bu = this.target;
if (this.soundDelay > 0 && --this.soundDelay == 0) { 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_(); super.l_();
@ -121,11 +121,11 @@ public class EntityPigZombie extends EntityZombie {
return "mob.zombiepig.zpig"; return "mob.zombiepig.zpig";
} }
protected String aK() { protected String aN() {
return "mob.zombiepig.zpighurt"; return "mob.zombiepig.zpighurt";
} }
protected String aL() { protected String aO() {
return "mob.zombiepig.zpigdeath"; return "mob.zombiepig.zpigdeath";
} }
@ -174,7 +174,7 @@ public class EntityPigZombie extends EntityZombie {
return Item.ROTTEN_FLESH.id; return Item.ROTTEN_FLESH.id;
} }
protected void bs() { protected void bw() {
this.setEquipment(0, new ItemStack(Item.GOLD_SWORD)); this.setEquipment(0, new ItemStack(Item.GOLD_SWORD));
} }

Datei anzeigen

@ -240,8 +240,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.bR = this.foodData.e() == 0.0F; this.bR = this.foodData.e() == 0.0F;
} }
if (this.getHealth() + this.bj() != this.bO) { if (this.getHealth() + this.bm() != this.bO) {
this.bO = this.getHealth() + this.bj(); this.bO = this.getHealth() + this.bm();
// CraftBukkit - Update ALL the scores! // CraftBukkit - Update ALL the scores!
this.world.getServer().getScoreboardManager().updateAllScoresForList(IScoreboardCriteria.f, this.getLocalizedName(), com.google.common.collect.ImmutableList.of(this)); 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(); String deathmessage = chatmessage.toString();
org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, deathmessage); org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, deathmessage);
@ -332,7 +332,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
scoreboardscore.incrementScore(); scoreboardscore.incrementScore();
} }
EntityLiving entityliving = this.aO(); EntityLiving entityliving = this.aR();
if (entityliving != null) { if (entityliving != null) {
entityliving.b(this, this.bb); entityliving.b(this, this.bb);
@ -475,6 +475,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
super.a(d0, flag); 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 public int nextContainerCounter() { // CraftBukkit - private void -> public int
this.containerCounter = this.containerCounter % 100 + 1; this.containerCounter = this.containerCounter % 100 + 1;
return this.containerCounter; // CraftBukkit return this.containerCounter; // CraftBukkit
@ -770,13 +777,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
this.playerConnection.sendPacket(new Packet41MobEffect(this.id, mobeffect)); this.playerConnection.sendPacket(new Packet41MobEffect(this.id, mobeffect));
} }
protected void b(MobEffect mobeffect) { protected void a(MobEffect mobeffect, boolean flag) {
super.b(mobeffect); super.a(mobeffect, flag);
this.playerConnection.sendPacket(new Packet41MobEffect(this.id, mobeffect)); this.playerConnection.sendPacket(new Packet41MobEffect(this.id, mobeffect));
} }
protected void c(MobEffect mobeffect) { protected void b(MobEffect mobeffect) {
super.c(mobeffect); super.b(mobeffect);
this.playerConnection.sendPacket(new Packet42RemoveMobEffect(this.id, mobeffect)); this.playerConnection.sendPacket(new Packet42RemoveMobEffect(this.id, mobeffect));
} }

Datei anzeigen

@ -151,7 +151,7 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
if (movingobjectposition != null) { if (movingobjectposition != null) {
if (movingobjectposition.type == EnumMovingObjectType.TILE && this.world.getTypeId(movingobjectposition.b, movingobjectposition.c, movingobjectposition.d) == Block.PORTAL.id) { if (movingobjectposition.type == EnumMovingObjectType.TILE && this.world.getTypeId(movingobjectposition.b, movingobjectposition.c, movingobjectposition.d) == Block.PORTAL.id) {
this.Z(); this.aa();
} else { } else {
this.a(movingobjectposition); this.a(movingobjectposition);
// CraftBukkit start // CraftBukkit start

Datei anzeigen

@ -32,13 +32,13 @@ public class EntitySheep extends EntityAnimal {
this.bq.resultInventory = new InventoryCraftResult(); // CraftBukkit - add result slot for event this.bq.resultInventory = new InventoryCraftResult(); // CraftBukkit - add result slot for event
} }
protected boolean bb() { protected boolean be() {
return true; return true;
} }
protected void be() { protected void bh() {
this.br = this.bs.f(); this.br = this.bs.f();
super.be(); super.bh();
} }
public void c() { public void c() {
@ -49,10 +49,10 @@ public class EntitySheep extends EntityAnimal {
super.c(); super.c();
} }
protected void ax() { protected void ay() {
super.ax(); super.ay();
this.a(GenericAttributes.a).a(8.0D); this.getAttributeInstance(GenericAttributes.a).setValue(8.0D);
this.a(GenericAttributes.d).a(0.23000000417232513D); this.getAttributeInstance(GenericAttributes.d).setValue(0.23000000417232513D);
} }
protected void a() { protected void a() {
@ -125,11 +125,11 @@ public class EntitySheep extends EntityAnimal {
return "mob.sheep.say"; return "mob.sheep.say";
} }
protected String aK() { protected String aN() {
return "mob.sheep.say"; return "mob.sheep.say";
} }
protected String aL() { protected String aO() {
return "mob.sheep.say"; return "mob.sheep.say";
} }

Datei anzeigen

@ -11,11 +11,11 @@ public class EntitySilverfish extends EntityMonster {
this.a(0.3F, 0.7F); this.a(0.3F, 0.7F);
} }
protected void ax() { protected void ay() {
super.ax(); super.ay();
this.a(GenericAttributes.a).a(8.0D); this.getAttributeInstance(GenericAttributes.a).setValue(8.0D);
this.a(GenericAttributes.d).a(0.6000000238418579D); this.getAttributeInstance(GenericAttributes.d).setValue(0.6000000238418579D);
this.a(GenericAttributes.e).a(1.0D); this.getAttributeInstance(GenericAttributes.e).setValue(1.0D);
} }
protected boolean e_() { protected boolean e_() {
@ -32,11 +32,11 @@ public class EntitySilverfish extends EntityMonster {
return "mob.silverfish.say"; return "mob.silverfish.say";
} }
protected String aK() { protected String aN() {
return "mob.silverfish.hit"; return "mob.silverfish.hit";
} }
protected String aL() { protected String aO() {
return "mob.silverfish.kill"; return "mob.silverfish.kill";
} }
@ -72,8 +72,8 @@ public class EntitySilverfish extends EntityMonster {
super.l_(); super.l_();
} }
protected void bh() { protected void bk() {
super.bh(); super.bk();
if (!this.world.isStatic) { if (!this.world.isStatic) {
int i; int i;
int j; 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); i = MathHelper.floor(this.locX);
j = MathHelper.floor(this.locY + 0.5D); j = MathHelper.floor(this.locY + 0.5D);
k = MathHelper.floor(this.locZ); k = MathHelper.floor(this.locZ);
@ -147,9 +147,9 @@ public class EntitySilverfish extends EntityMonster {
this.q(); this.q();
this.die(); this.die();
} else { } else {
this.bG(); this.bK();
} }
} else if (this.target != null && !this.bI()) { } else if (this.target != null && !this.bM()) {
this.target = null; this.target = null;
} }
} }

Datei anzeigen

@ -20,13 +20,13 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, false)); this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, false));
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityHuman.class, 0, true)); this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityHuman.class, 0, true));
if (world != null && !world.isStatic) { if (world != null && !world.isStatic) {
this.bP(); this.bT();
} }
} }
protected void ax() { protected void ay() {
super.ax(); super.ay();
this.a(GenericAttributes.d).a(0.25D); this.getAttributeInstance(GenericAttributes.d).setValue(0.25D);
} }
protected void a() { protected void a() {
@ -34,7 +34,7 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
this.datawatcher.a(13, new Byte((byte) 0)); this.datawatcher.a(13, new Byte((byte) 0));
} }
public boolean bb() { public boolean be() {
return true; return true;
} }
@ -42,11 +42,11 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
return "mob.skeleton.say"; return "mob.skeleton.say";
} }
protected String aK() { protected String aN() {
return "mob.skeleton.hurt"; return "mob.skeleton.hurt";
} }
protected String aL() { protected String aO() {
return "mob.skeleton.death"; return "mob.skeleton.death";
} }
@ -110,8 +110,8 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
super.c(); super.c();
} }
public void T() { public void U() {
super.T(); super.U();
if (this.vehicle instanceof EntityCreature) { if (this.vehicle instanceof EntityCreature) {
EntityCreature entitycreature = (EntityCreature) this.vehicle; EntityCreature entitycreature = (EntityCreature) this.vehicle;
@ -182,22 +182,22 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
return null; // CraftBukkit return null; // CraftBukkit
} }
protected void bs() { protected void bw() {
super.bs(); super.bw();
this.setEquipment(0, new ItemStack(Item.BOW)); this.setEquipment(0, new ItemStack(Item.BOW));
} }
public GroupDataEntity a(GroupDataEntity groupdataentity) { public GroupDataEntity a(GroupDataEntity groupdataentity) {
groupdataentity = super.a(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.goalSelector.a(4, this.bq);
this.setSkeletonType(1); this.setSkeletonType(1);
this.setEquipment(0, new ItemStack(Item.STONE_SWORD)); this.setEquipment(0, new ItemStack(Item.STONE_SWORD));
this.a(GenericAttributes.e).a(4.0D); this.getAttributeInstance(GenericAttributes.e).setValue(4.0D);
} else { } else {
this.goalSelector.a(4, this.bp); this.goalSelector.a(4, this.bp);
this.bs(); this.bw();
this.bt(); this.bx();
} }
this.h(this.random.nextFloat() < 0.55F * this.world.b(this.locX, this.locY, this.locZ)); 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; return groupdataentity;
} }
public void bP() { public void bT() {
this.goalSelector.a((PathfinderGoal) this.bq); this.goalSelector.a((PathfinderGoal) this.bq);
this.goalSelector.a((PathfinderGoal) this.bp); this.goalSelector.a((PathfinderGoal) this.bp);
ItemStack itemstack = this.aV(); ItemStack itemstack = this.aY();
if (itemstack != null && itemstack.id == Item.BOW.id) { if (itemstack != null && itemstack.id == Item.BOW.id) {
this.goalSelector.a(4, this.bp); this.goalSelector.a(4, this.bp);
@ -227,8 +227,8 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
public void a(EntityLiving entityliving, float f) { public void a(EntityLiving entityliving, float f) {
EntityArrow entityarrow = new EntityArrow(this.world, this, entityliving, 1.6F, (float) (14 - this.world.difficulty * 4)); 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 i = EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_DAMAGE.id, this.aY());
int j = EnchantmentManager.getEnchantmentLevel(Enchantment.ARROW_KNOCKBACK.id, this.aV()); 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)); entityarrow.b((double) (f * 2.0F) + this.random.nextGaussian() * 0.25D + (double) ((float) this.world.difficulty * 0.11F));
if (i > 0) { if (i > 0) {
@ -239,11 +239,11 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
entityarrow.a(j); 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); 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); this.world.addEntity(entityarrow);
} }
@ -269,7 +269,7 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
this.setSkeletonType(b0); this.setSkeletonType(b0);
} }
this.bP(); this.bT();
} }
public void b(NBTTagCompound nbttagcompound) { public void b(NBTTagCompound nbttagcompound) {
@ -280,11 +280,11 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
public void setEquipment(int i, ItemStack itemstack) { public void setEquipment(int i, ItemStack itemstack) {
super.setEquipment(i, itemstack); super.setEquipment(i, itemstack);
if (!this.world.isStatic && i == 0) { if (!this.world.isStatic && i == 0) {
this.bP(); this.bT();
} }
} }
public double V() { public double W() {
return super.V() - 0.5D; return super.W() - 0.5D;
} }
} }

Datei anzeigen

@ -34,7 +34,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
this.datawatcher.watch(16, new Byte((byte) i)); this.datawatcher.watch(16, new Byte((byte) i));
this.a(0.6F * (float) i, 0.6F * (float) i); this.a(0.6F * (float) i, 0.6F * (float) i);
this.setPosition(this.locX, this.locY, this.locZ); 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.setHealth(this.getMaxHealth());
this.b = i; this.b = i;
} }
@ -53,11 +53,11 @@ public class EntitySlime extends EntityInsentient implements IMonster {
this.setSize(nbttagcompound.getInt("Size") + 1); this.setSize(nbttagcompound.getInt("Size") + 1);
} }
protected String bF() { protected String bJ() {
return "slime"; return "slime";
} }
protected String bL() { protected String bP() {
return "mob.slime." + (this.getSize() > 1 ? "big" : "small"); 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 f2 = MathHelper.sin(f) * (float) i * 0.5F * f1;
float f3 = MathHelper.cos(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()) { if (this.bQ()) {
this.makeSound(this.bL(), this.aW(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) / 0.8F); this.makeSound(this.bP(), this.aZ(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) / 0.8F);
} }
this.h = -0.5F; this.h = -0.5F;
@ -94,15 +94,15 @@ public class EntitySlime extends EntityInsentient implements IMonster {
this.h = 1.0F; this.h = 1.0F;
} }
this.bI(); this.bM();
if (this.world.isStatic) { if (this.world.isStatic) {
i = this.getSize(); i = this.getSize();
this.a(0.6F * (float) i, 0.6F * (float) i); this.a(0.6F * (float) i, 0.6F * (float) i);
} }
} }
protected void bh() { protected void bk() {
this.bk(); this.bo();
// CraftBukkit start // CraftBukkit start
Entity entityhuman = this.world.findNearbyVulnerablePlayer(this, 16.0D); // EntityHuman -> Entity Entity entityhuman = this.world.findNearbyVulnerablePlayer(this, 16.0D); // EntityHuman -> Entity
EntityTargetEvent event = null; EntityTargetEvent event = null;
@ -125,14 +125,14 @@ public class EntitySlime extends EntityInsentient implements IMonster {
} }
if (this.onGround && this.jumpDelay-- <= 0) { if (this.onGround && this.jumpDelay-- <= 0) {
this.jumpDelay = this.bH(); this.jumpDelay = this.bL();
if (entityhuman != null) { if (entityhuman != null) {
this.jumpDelay /= 3; this.jumpDelay /= 3;
} }
this.bd = true; this.bd = true;
if (this.bO()) { if (this.bS()) {
this.makeSound(this.bL(), this.aW(), ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F) * 0.8F); 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; 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; this.h *= 0.6F;
} }
protected int bH() { protected int bL() {
return this.random.nextInt(20) + 10; return this.random.nextInt(20) + 10;
} }
protected EntitySlime bG() { protected EntitySlime bK() {
return new EntitySlime(this.world); return new EntitySlime(this.world);
} }
@ -178,7 +178,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
for (int k = 0; k < j; ++k) { for (int k = 0; k < j; ++k) {
float f = ((float) (k % 2) - 0.5F) * (float) i / 4.0F; float f = ((float) (k % 2) - 0.5F) * (float) i / 4.0F;
float f1 = ((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.setSize(i / 2);
entityslime.setPositionRotation(this.locX + (double) f, this.locY + 0.5D, this.locZ + (double) f1, this.random.nextFloat() * 360.0F, 0.0F); 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) { public void b_(EntityHuman entityhuman) {
if (this.bJ()) { if (this.bN()) {
int i = this.getSize(); 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); 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; return this.getSize() > 1;
} }
protected int bK() { protected int bO() {
return this.getSize(); return this.getSize();
} }
protected String aK() { protected String aN() {
return "mob.slime." + (this.getSize() > 1 ? "big" : "small"); return "mob.slime." + (this.getSize() > 1 ? "big" : "small");
} }
protected String aL() { protected String aO() {
return "mob.slime." + (this.getSize() > 1 ? "big" : "small"); 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(); return 0.4F * (float) this.getSize();
} }
public int bl() { public int bp() {
return 0; return 0;
} }
protected boolean bO() { protected boolean bS() {
return this.getSize() > 0; return this.getSize() > 0;
} }
protected boolean bM() { protected boolean bQ() {
return this.getSize() > 2; return this.getSize() > 2;
} }
} }

Datei anzeigen

@ -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)); this.targetSelector.a(1, new PathfinderGoalNearestAttackableTarget(this, EntityInsentient.class, 0, true, false, IMonster.a));
} }
public boolean bb() { public boolean be() {
return true; return true;
} }
protected void ax() { protected void ay() {
super.ax(); super.ay();
this.a(GenericAttributes.a).a(4.0D); this.getAttributeInstance(GenericAttributes.a).setValue(4.0D);
this.a(GenericAttributes.d).a(0.20000000298023224D); this.getAttributeInstance(GenericAttributes.d).setValue(0.20000000298023224D);
} }
public void c() { public void c() {
@ -87,7 +87,7 @@ public class EntitySnowman extends EntityGolem implements IRangedEntity {
float f1 = MathHelper.sqrt(d0 * d0 + d2 * d2) * 0.2F; float f1 = MathHelper.sqrt(d0 * d0 + d2 * d2) * 0.2F;
entitysnowball.shoot(d0, d1 + (double) f1, d2, 1.6F, 12.0F); 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); this.world.addEntity(entitysnowball);
} }
} }

Datei anzeigen

@ -21,10 +21,10 @@ public class EntitySpider extends EntityMonster {
} }
} }
protected void ax() { protected void ay() {
super.ax(); super.ay();
this.a(GenericAttributes.a).a(16.0D); this.getAttributeInstance(GenericAttributes.a).setValue(16.0D);
this.a(GenericAttributes.d).a(0.800000011920929D); this.getAttributeInstance(GenericAttributes.d).setValue(0.800000011920929D);
} }
protected Entity findTarget() { protected Entity findTarget() {
@ -43,11 +43,11 @@ public class EntitySpider extends EntityMonster {
return "mob.spider.say"; return "mob.spider.say";
} }
protected String aK() { protected String aN() {
return "mob.spider.say"; return "mob.spider.say";
} }
protected String aL() { protected String aO() {
return "mob.spider.death"; return "mob.spider.death";
} }
@ -116,20 +116,20 @@ public class EntitySpider extends EntityMonster {
} }
public boolean e() { public boolean e() {
return this.bP(); return this.bT();
} }
public void ak() {} public void al() {}
public EnumMonsterType getMonsterType() { public EnumMonsterType getMonsterType() {
return EnumMonsterType.ARTHROPOD; return EnumMonsterType.ARTHROPOD;
} }
public boolean e(MobEffect mobeffect) { public boolean d(MobEffect mobeffect) {
return mobeffect.getEffectId() == MobEffectList.POISON.id ? false : super.e(mobeffect); return mobeffect.getEffectId() == MobEffectList.POISON.id ? false : super.d(mobeffect);
} }
public boolean bP() { public boolean bT() {
return (this.datawatcher.getByte(16) & 1) != 0; return (this.datawatcher.getByte(16) & 1) != 0;
} }

Datei anzeigen

@ -25,24 +25,24 @@ public class EntitySquid extends EntityWaterAnimal {
this.by = 1.0F / (this.random.nextFloat() + 1.0F) * 0.2F; this.by = 1.0F / (this.random.nextFloat() + 1.0F) * 0.2F;
} }
protected void ax() { protected void ay() {
super.ax(); super.ay();
this.a(GenericAttributes.a).a(10.0D); this.getAttributeInstance(GenericAttributes.a).setValue(10.0D);
} }
protected String r() { protected String r() {
return null; return null;
} }
protected String aK() { protected String aN() {
return null; return null;
} }
protected String aL() { protected String aO() {
return null; return null;
} }
protected float aW() { protected float aZ() {
return 0.4F; return 0.4F;
} }
@ -135,7 +135,7 @@ public class EntitySquid extends EntityWaterAnimal {
this.move(this.motX, this.motY, this.motZ); this.move(this.motX, this.motY, this.motZ);
} }
protected void bh() { protected void bk() {
++this.aV; ++this.aV;
if (this.aV > 100) { if (this.aV > 100) {
this.bA = this.bB = this.bC = 0.0F; 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.bC = MathHelper.sin(f) * 0.2F;
} }
this.bk(); this.bo();
} }
public boolean canSpawn() { public boolean canSpawn() {

Datei anzeigen

@ -246,7 +246,7 @@ public class EntityTrackerEntry {
} }
if (this.tracker instanceof EntityLiving) { if (this.tracker instanceof EntityLiving) {
AttributeMapServer attributemapserver = (AttributeMapServer) ((EntityLiving) this.tracker).aT(); AttributeMapServer attributemapserver = (AttributeMapServer) ((EntityLiving) this.tracker).aW();
Set set = attributemapserver.b(); Set set = attributemapserver.b();
if (!set.isEmpty()) { if (!set.isEmpty()) {
@ -318,7 +318,7 @@ public class EntityTrackerEntry {
} }
if (this.tracker instanceof EntityLiving) { if (this.tracker instanceof EntityLiving) {
AttributeMapServer attributemapserver = (AttributeMapServer) ((EntityLiving) this.tracker).aT(); AttributeMapServer attributemapserver = (AttributeMapServer) ((EntityLiving) this.tracker).aW();
Collection collection = attributemapserver.c(); Collection collection = attributemapserver.c();
if (!collection.isEmpty()) { if (!collection.isEmpty()) {
@ -340,8 +340,8 @@ public class EntityTrackerEntry {
entityplayer.playerConnection.sendPacket(new Packet39AttachEntity(0, this.tracker.passenger, this.tracker)); entityplayer.playerConnection.sendPacket(new Packet39AttachEntity(0, this.tracker.passenger, this.tracker));
} }
if (this.tracker instanceof EntityInsentient && ((EntityInsentient) this.tracker).bE() != null) { if (this.tracker instanceof EntityInsentient && ((EntityInsentient) this.tracker).bI() != null) {
entityplayer.playerConnection.sendPacket(new Packet39AttachEntity(1, this.tracker, ((EntityInsentient) this.tracker).bE())); entityplayer.playerConnection.sendPacket(new Packet39AttachEntity(1, this.tracker, ((EntityInsentient) this.tracker).bI()));
} }
// CraftBukkit end // CraftBukkit end

Datei anzeigen

@ -31,11 +31,11 @@ public class EntityWitch extends EntityMonster implements IRangedEntity {
return "mob.witch.idle"; return "mob.witch.idle";
} }
protected String aK() { protected String aN() {
return "mob.witch.hurt"; return "mob.witch.hurt";
} }
protected String aL() { protected String aO() {
return "mob.witch.death"; 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))); this.getDataWatcher().watch(21, Byte.valueOf((byte) (flag ? 1 : 0)));
} }
public boolean bP() { public boolean bT() {
return this.getDataWatcher().getByte(21) == 1; return this.getDataWatcher().getByte(21) == 1;
} }
protected void ax() { protected void ay() {
super.ax(); super.ay();
this.a(GenericAttributes.a).a(26.0D); this.getAttributeInstance(GenericAttributes.a).setValue(26.0D);
this.a(GenericAttributes.d).a(0.25D); this.getAttributeInstance(GenericAttributes.d).setValue(0.25D);
} }
public boolean bb() { public boolean be() {
return true; return true;
} }
public void c() { public void c() {
if (!this.world.isStatic) { if (!this.world.isStatic) {
if (this.bP()) { if (this.bT()) {
if (this.bs-- <= 0) { if (this.bs-- <= 0) {
this.a(false); this.a(false);
ItemStack itemstack = this.aV(); ItemStack itemstack = this.aY();
this.setEquipment(0, (ItemStack) null); this.setEquipment(0, (ItemStack) null);
if (itemstack != null && itemstack.id == Item.POTION.id) { 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 { } else {
short short1 = -1; short short1 = -1;
@ -96,9 +96,9 @@ public class EntityWitch extends EntityMonster implements IRangedEntity {
if (short1 > -1) { if (short1 > -1) {
this.setEquipment(0, new ItemStack(Item.POTION, 1, short1)); this.setEquipment(0, new ItemStack(Item.POTION, 1, short1));
this.bs = this.aV().n(); this.bs = this.aY().n();
this.a(true); this.a(true);
AttributeInstance attributeinstance = this.a(GenericAttributes.d); AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.d);
attributeinstance.b(bq); attributeinstance.b(bq);
attributeinstance.a(bq); attributeinstance.a(bq);
@ -148,7 +148,7 @@ public class EntityWitch extends EntityMonster implements IRangedEntity {
} }
public void a(EntityLiving entityliving, float f) { public void a(EntityLiving entityliving, float f) {
if (!this.bP()) { if (!this.bT()) {
EntityPotion entitypotion = new EntityPotion(this.world, this, 32732); EntityPotion entitypotion = new EntityPotion(this.world, this, 32732);
entitypotion.pitch -= -20.0F; entitypotion.pitch -= -20.0F;

Datei anzeigen

@ -44,7 +44,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
public void b(NBTTagCompound nbttagcompound) { public void b(NBTTagCompound nbttagcompound) {
super.b(nbttagcompound); super.b(nbttagcompound);
nbttagcompound.setInt("Invul", this.bQ()); nbttagcompound.setInt("Invul", this.bU());
} }
public void a(NBTTagCompound nbttagcompound) { public void a(NBTTagCompound nbttagcompound) {
@ -56,11 +56,11 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
return "mob.wither.idle"; return "mob.wither.idle";
} }
protected String aK() { protected String aN() {
return "mob.wither.hurt"; return "mob.wither.hurt";
} }
protected String aL() { protected String aO() {
return "mob.wither.death"; return "mob.wither.death";
} }
@ -74,7 +74,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
Entity entity = this.world.getEntity(this.q(0)); Entity entity = this.world.getEntity(this.q(0));
if (entity != null) { 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) { if (this.motY < 0.0D) {
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) { for (j = 0; j < 3; ++j) {
double d8 = this.r(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) { 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); 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; int i;
if (this.bQ() > 0) { if (this.bU() > 0) {
i = this.bQ() - 1; i = this.bU() - 1;
if (i <= 0) { if (i <= 0) {
// CraftBukkit start // CraftBukkit start
ExplosionPrimeEvent event = new ExplosionPrimeEvent(this.getBukkitEntity(), 7.0F, false); 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 this.heal(10.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.WITHER_SPAWN); // CraftBukkit
} }
} else { } else {
super.be(); super.bh();
int j; int j;
@ -284,14 +284,14 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
} }
} }
public void bP() { public void bT() {
this.p(220); this.p(220);
this.setHealth(this.getMaxHealth() / 3.0F); this.setHealth(this.getMaxHealth() / 3.0F);
} }
public void ak() {} public void al() {}
public int aM() { public int aP() {
return 4; return 4;
} }
@ -368,12 +368,12 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
return false; return false;
} else if (damagesource == DamageSource.DROWN) { } else if (damagesource == DamageSource.DROWN) {
return false; return false;
} else if (this.bQ() > 0) { } else if (this.bU() > 0) {
return false; return false;
} else { } else {
Entity entity; Entity entity;
if (this.bR()) { if (this.bV()) {
entity = damagesource.h(); entity = damagesource.h();
if (entity instanceof EntityArrow) { if (entity instanceof EntityArrow) {
return false; return false;
@ -405,7 +405,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
// CraftBukkit end // CraftBukkit end
} }
protected void bk() { protected void bo() {
this.aV = 0; this.aV = 0;
} }
@ -418,18 +418,18 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
public void addEffect(MobEffect mobeffect) {} public void addEffect(MobEffect mobeffect) {}
protected boolean bb() { protected boolean be() {
return true; return true;
} }
protected void ax() { protected void ay() {
super.ax(); super.ay();
this.a(GenericAttributes.a).a(300.0D); this.getAttributeInstance(GenericAttributes.a).setValue(300.0D);
this.a(GenericAttributes.d).a(0.6000000238418579D); this.getAttributeInstance(GenericAttributes.d).setValue(0.6000000238418579D);
this.a(GenericAttributes.b).a(40.0D); this.getAttributeInstance(GenericAttributes.b).setValue(40.0D);
} }
public int bQ() { public int bU() {
return this.datawatcher.getInt(20); return this.datawatcher.getInt(20);
} }
@ -445,7 +445,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
this.datawatcher.watch(17 + i, Integer.valueOf(j)); this.datawatcher.watch(17 + i, Integer.valueOf(j));
} }
public boolean bR() { public boolean bV() {
return this.getHealth() <= this.getMaxHealth() / 2.0F; return this.getHealth() <= this.getMaxHealth() / 2.0F;
} }

Datei anzeigen

@ -1,8 +1,5 @@
package net.minecraft.server; package net.minecraft.server;
import java.util.Iterator;
import java.util.List;
public class EntityWolf extends EntityTameableAnimal { public class EntityWolf extends EntityTameableAnimal {
private float bq; private float bq;
@ -33,44 +30,30 @@ public class EntityWolf extends EntityTameableAnimal {
this.setTamed(false); this.setTamed(false);
} }
protected void ax() { protected void ay() {
super.ax(); super.ay();
this.a(GenericAttributes.d).a(0.30000001192092896D); this.getAttributeInstance(GenericAttributes.d).setValue(0.30000001192092896D);
if (this.isTamed()) { if (this.isTamed()) {
this.a(GenericAttributes.a).a(20.0D); this.getAttributeInstance(GenericAttributes.a).setValue(20.0D);
} else { } else {
this.a(GenericAttributes.a).a(8.0D); this.getAttributeInstance(GenericAttributes.a).setValue(8.0D);
} }
} }
public boolean bb() { public boolean be() {
return true; return true;
} }
public void setGoalTarget(EntityLiving entityliving) { public void setGoalTarget(EntityLiving entityliving) {
super.setGoalTarget(entityliving); super.setGoalTarget(entityliving);
if (entityliving == null) { if (entityliving == null) {
if (!this.isAngry()) {
return;
}
this.setAngry(false); 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)); } else if (!this.isTamed()) {
Iterator iterator = list.iterator();
while (iterator.hasNext()) {
EntityWolf entitywolf = (EntityWolf) iterator.next();
if (this != entitywolf) {
entitywolf.setAngry(false);
}
}
} else {
this.setAngry(true); this.setAngry(true);
} }
} }
protected void bg() { protected void bj() {
this.datawatcher.watch(18, Float.valueOf(this.getHealth())); 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"); 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"; return "mob.wolf.hurt";
} }
protected String aL() { protected String aO() {
return "mob.wolf.death"; return "mob.wolf.death";
} }
protected float aW() { protected float aZ() {
return 0.4F; return 0.4F;
} }
@ -122,7 +105,7 @@ public class EntityWolf extends EntityTameableAnimal {
public void c() { public void c() {
super.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.bt = true;
this.bu = 0.0F; this.bu = 0.0F;
this.bv = 0.0F; this.bv = 0.0F;
@ -133,13 +116,13 @@ public class EntityWolf extends EntityTameableAnimal {
public void l_() { public void l_() {
super.l_(); super.l_();
this.br = this.bq; this.br = this.bq;
if (this.ca()) { if (this.ce()) {
this.bq += (1.0F - this.bq) * 0.4F; this.bq += (1.0F - this.bq) * 0.4F;
} else { } else {
this.bq += (0.0F - this.bq) * 0.4F; this.bq += (0.0F - this.bq) * 0.4F;
} }
if (this.ca()) { if (this.ce()) {
this.g = 10; this.g = 10;
} }
@ -150,7 +133,7 @@ public class EntityWolf extends EntityTameableAnimal {
this.bv = 0.0F; this.bv = 0.0F;
} else if ((this.bs || this.bt) && this.bt) { } else if ((this.bs || this.bt) && this.bt) {
if (this.bu == 0.0F) { 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; this.bv = this.bu;
@ -180,8 +163,8 @@ public class EntityWolf extends EntityTameableAnimal {
return this.length * 0.8F; return this.length * 0.8F;
} }
public int bl() { public int bp() {
return this.isSitting() ? 20 : super.bl(); return this.isSitting() ? 20 : super.bp();
} }
public boolean damageEntity(DamageSource damagesource, float f) { public boolean damageEntity(DamageSource damagesource, float f) {
@ -208,9 +191,9 @@ public class EntityWolf extends EntityTameableAnimal {
public void setTamed(boolean flag) { public void setTamed(boolean flag) {
super.setTamed(flag); super.setTamed(flag);
if (flag) { if (flag) {
this.a(GenericAttributes.a).a(20.0D); this.getAttributeInstance(GenericAttributes.a).setValue(20.0D);
} else { } 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.bp.setSitting(!this.isSitting());
this.bd = false; this.bd = false;
this.setPathEntity((PathEntity) null); this.setPathEntity((PathEntity) null);
this.setTarget((Entity) null);
this.setGoalTarget((EntityLiving) null);
} }
} else if (itemstack != null && itemstack.id == Item.BONE.id && !this.isAngry()) { } else if (itemstack != null && itemstack.id == Item.BONE.id && !this.isAngry()) {
if (!entityhuman.abilities.canInstantlyBuild) { if (!entityhuman.abilities.canInstantlyBuild) {
@ -271,10 +256,10 @@ public class EntityWolf extends EntityTameableAnimal {
this.bp.setSitting(true); this.bp.setSitting(true);
this.setHealth(this.getMaxHealth()); // CraftBukkit - 20.0 -> getMaxHealth() this.setHealth(this.getMaxHealth()); // CraftBukkit - 20.0 -> getMaxHealth()
this.setOwnerName(entityhuman.getName()); this.setOwnerName(entityhuman.getName());
this.j(true); this.i(true);
this.world.broadcastEntityEffect(this, (byte) 7); this.world.broadcastEntityEffect(this, (byte) 7);
} else { } else {
this.j(false); this.i(false);
this.world.broadcastEntityEffect(this, (byte) 6); 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()); 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; return 8;
} }
@ -327,7 +312,7 @@ public class EntityWolf extends EntityTameableAnimal {
return entitywolf; return entitywolf;
} }
public void n(boolean flag) { public void m(boolean flag) {
if (flag) { if (flag) {
this.datawatcher.watch(19, Byte.valueOf((byte) 1)); this.datawatcher.watch(19, Byte.valueOf((byte) 1));
} else { } else {
@ -345,11 +330,11 @@ public class EntityWolf extends EntityTameableAnimal {
} else { } else {
EntityWolf entitywolf = (EntityWolf) entityanimal; 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; return this.datawatcher.getByte(19) == 1;
} }
@ -357,6 +342,22 @@ public class EntityWolf extends EntityTameableAnimal {
return !this.isTamed() && this.ticksLived > 2400; 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) { public EntityAgeable createChild(EntityAgeable entityageable) {
return this.b(entityageable); return this.b(entityageable);
} }

Datei anzeigen

@ -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"); 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 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 bs;
private int lastTick = MinecraftServer.currentTick; // CraftBukkit 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)); this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityVillager.class, 0, false));
} }
protected void ax() { protected void ay() {
super.ax(); super.ay();
this.a(GenericAttributes.b).a(40.0D); this.getAttributeInstance(GenericAttributes.b).setValue(40.0D);
this.a(GenericAttributes.d).a(0.23000000417232513D); this.getAttributeInstance(GenericAttributes.d).setValue(0.23000000417232513D);
this.a(GenericAttributes.e).a(3.0D); this.getAttributeInstance(GenericAttributes.e).setValue(3.0D);
this.aT().b(bp).a(this.random.nextDouble() * 0.10000000149011612D); this.aW().b(bp).setValue(this.random.nextDouble() * 0.10000000149011612D);
} }
protected void a() { protected void a() {
@ -49,8 +49,8 @@ public class EntityZombie extends EntityMonster {
this.getDataWatcher().a(14, Byte.valueOf((byte) 0)); this.getDataWatcher().a(14, Byte.valueOf((byte) 0));
} }
public int aM() { public int aP() {
int i = super.aM() + 2; int i = super.aP() + 2;
if (i > 20) { if (i > 20) {
i = 20; i = 20;
@ -59,7 +59,7 @@ public class EntityZombie extends EntityMonster {
return i; return i;
} }
protected boolean bb() { protected boolean be() {
return true; return true;
} }
@ -70,7 +70,7 @@ public class EntityZombie extends EntityMonster {
public void setBaby(boolean flag) { public void setBaby(boolean flag) {
this.getDataWatcher().watch(12, Byte.valueOf((byte) (flag ? 1 : 0))); this.getDataWatcher().watch(12, Byte.valueOf((byte) (flag ? 1 : 0)));
if (this.world != null && !this.world.isStatic) { if (this.world != null && !this.world.isStatic) {
AttributeInstance attributeinstance = this.a(GenericAttributes.d); AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.d);
attributeinstance.b(br); attributeinstance.b(br);
if (flag) { if (flag) {
@ -129,15 +129,15 @@ public class EntityZombie extends EntityMonster {
} else { } else {
EntityLiving entityliving = this.getGoalTarget(); EntityLiving entityliving = this.getGoalTarget();
if (entityliving == null && this.bJ() instanceof EntityLiving) { if (entityliving == null && this.bN() instanceof EntityLiving) {
entityliving = (EntityLiving) this.bJ(); entityliving = (EntityLiving) this.bN();
} }
if (entityliving == null && damagesource.getEntity() instanceof EntityLiving) { if (entityliving == null && damagesource.getEntity() instanceof EntityLiving) {
entityliving = (EntityLiving) damagesource.getEntity(); 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 i = MathHelper.floor(this.locX);
int j = MathHelper.floor(this.locY); int j = MathHelper.floor(this.locY);
int k = MathHelper.floor(this.locZ); int k = MathHelper.floor(this.locZ);
@ -154,8 +154,8 @@ public class EntityZombie extends EntityMonster {
this.world.addEntity(entityzombie); this.world.addEntity(entityzombie);
entityzombie.setGoalTarget(entityliving); entityzombie.setGoalTarget(entityliving);
entityzombie.a((GroupDataEntity) null); entityzombie.a((GroupDataEntity) null);
this.a(bp).a(new AttributeModifier("Zombie reinforcement caller charge", -0.05000000074505806D, 0)); this.getAttributeInstance(bp).a(new AttributeModifier("Zombie reinforcement caller charge", -0.05000000074505806D, 0));
entityzombie.a(bp).a(new AttributeModifier("Zombie reinforcement callee charge", -0.05000000074505806D, 0)); entityzombie.getAttributeInstance(bp).a(new AttributeModifier("Zombie reinforcement callee charge", -0.05000000074505806D, 0));
break; break;
} }
} }
@ -167,8 +167,8 @@ public class EntityZombie extends EntityMonster {
} }
public void l_() { public void l_() {
if (!this.world.isStatic && this.bR()) { if (!this.world.isStatic && this.bV()) {
int i = this.bT(); int i = this.bX();
// CraftBukkit start - Use wall time instead of ticks for villager conversion // CraftBukkit start - Use wall time instead of ticks for villager conversion
int elapsedTicks = MinecraftServer.currentTick - this.lastTick; int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
@ -178,7 +178,7 @@ public class EntityZombie extends EntityMonster {
this.bs -= i; this.bs -= i;
if (this.bs <= 0) { if (this.bs <= 0) {
this.bS(); this.bW();
} }
} }
@ -188,7 +188,7 @@ public class EntityZombie extends EntityMonster {
public boolean m(Entity entity) { public boolean m(Entity entity) {
boolean flag = super.m(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 // CraftBukkit start
EntityCombustByEntityEvent event = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), 2 * this.world.difficulty); EntityCombustByEntityEvent event = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), 2 * this.world.difficulty);
this.world.getServer().getPluginManager().callEvent(event); this.world.getServer().getPluginManager().callEvent(event);
@ -206,11 +206,11 @@ public class EntityZombie extends EntityMonster {
return "mob.zombie.say"; return "mob.zombie.say";
} }
protected String aK() { protected String aN() {
return "mob.zombie.hurt"; return "mob.zombie.hurt";
} }
protected String aL() { protected String aO() {
return "mob.zombie.death"; return "mob.zombie.death";
} }
@ -241,8 +241,8 @@ public class EntityZombie extends EntityMonster {
} }
// CraftBukkit end // CraftBukkit end
protected void bs() { protected void bw() {
super.bs(); super.bw();
if (this.random.nextFloat() < (this.world.difficulty == 3 ? 0.05F : 0.01F)) { if (this.random.nextFloat() < (this.world.difficulty == 3 ? 0.05F : 0.01F)) {
int i = this.random.nextInt(3); int i = this.random.nextInt(3);
@ -264,7 +264,7 @@ public class EntityZombie extends EntityMonster {
nbttagcompound.setBoolean("IsVillager", true); 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) { public void a(NBTTagCompound nbttagcompound) {
@ -305,16 +305,28 @@ public class EntityZombie extends EntityMonster {
} }
public GroupDataEntity a(GroupDataEntity groupdataentity) { 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); float f = this.world.b(this.locX, this.locY, this.locZ);
this.h(this.random.nextFloat() < 0.55F * f); this.h(this.random.nextFloat() < 0.55F * f);
if (this.world.random.nextFloat() < 0.05F) { if (object == null) {
this.setVillager(true); object = new GroupDataZombie(this, this.world.random.nextFloat() < 0.05F, this.world.random.nextFloat() < 0.05F, (EmptyClass4) null);
} }
this.bs(); if (object instanceof GroupDataZombie) {
this.bt(); GroupDataZombie groupdatazombie = (GroupDataZombie) object;
if (groupdatazombie.b) {
this.setVillager(true);
}
if (groupdatazombie.a) {
this.setBaby(true);
}
}
this.bw();
this.bx();
if (this.getEquipment(4) == null) { if (this.getEquipment(4) == null) {
Calendar calendar = this.world.W(); 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.getAttributeInstance(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.b).a(new AttributeModifier("Random zombie-spawn bonus", this.random.nextDouble() * 1.5D, 2));
if (this.random.nextFloat() < f * 0.05F) { 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.getAttributeInstance(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(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) { 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 (itemstack != null && itemstack.getItem() == Item.GOLDEN_APPLE && itemstack.getData() == 0 && this.isVillager() && this.hasEffect(MobEffectList.WEAKNESS)) {
if (!entityhuman.abilities.canInstantlyBuild) { if (!entityhuman.abilities.canInstantlyBuild) {
@ -365,19 +377,19 @@ public class EntityZombie extends EntityMonster {
} }
protected boolean isTypeNotPersistent() { protected boolean isTypeNotPersistent() {
return !this.bR(); return !this.bV();
} }
public boolean bR() { public boolean bV() {
return this.getDataWatcher().getByte(14) == 1; return this.getDataWatcher().getByte(14) == 1;
} }
protected void bS() { protected void bW() {
EntityVillager entityvillager = new EntityVillager(this.world); EntityVillager entityvillager = new EntityVillager(this.world);
entityvillager.j(this); entityvillager.j(this);
entityvillager.a((GroupDataEntity) null); entityvillager.a((GroupDataEntity) null);
entityvillager.bT(); entityvillager.bX();
if (this.isBaby()) { if (this.isBaby()) {
entityvillager.setAge(-24000); 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); 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; int i = 1;
if (this.random.nextFloat() < 0.01F) { if (this.random.nextFloat() < 0.01F) {

Datei anzeigen

@ -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; ++this.foodTickTimer;
if (this.foodTickTimer >= 80) { if (this.foodTickTimer >= 80) {
// CraftBukkit - added RegainReason // CraftBukkit - added RegainReason

Datei anzeigen

@ -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);
}
}

Datei anzeigen

@ -82,7 +82,9 @@ public class ItemBlock extends Item {
org.bukkit.block.BlockState blockstate = org.bukkit.craftbukkit.block.CraftBlockState.getBlockState(world, x, y, z); org.bukkit.block.BlockState blockstate = org.bukkit.craftbukkit.block.CraftBlockState.getBlockState(world, x, y, z);
world.callingPlaceEvent = true; 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); org.bukkit.event.block.BlockPlaceEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPlaceEvent(world, entityhuman, blockstate, clickedX, clickedY, clickedZ);
if (event.isCancelled() || !event.canBuild()) { if (event.isCancelled() || !event.canBuild()) {

Datei anzeigen

@ -42,7 +42,7 @@ public class ItemBoat extends Item {
Entity entity = (Entity) list.get(i); Entity entity = (Entity) list.get(i);
if (entity.K()) { if (entity.K()) {
float f10 = entity.X(); float f10 = entity.Y();
AxisAlignedBB axisalignedbb = entity.boundingBox.grow((double) f10, (double) f10, (double) f10); AxisAlignedBB axisalignedbb = entity.boundingBox.grow((double) f10, (double) f10, (double) f10);
if (axisalignedbb.a(vec3d)) { if (axisalignedbb.a(vec3d)) {

Datei anzeigen

@ -153,15 +153,12 @@ public class ItemBucket extends Item {
if (this.a <= 0) { if (this.a <= 0) {
return false; return false;
} else { } 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) { if (!world.isEmpty(i, j, k) && !flag) {
return false; return false;
} else { } else {
if (!world.isStatic && flag) {
world.setAir(i, j, k, true);
}
if (world.worldProvider.f && this.a == Block.WATER.id) { 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); 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); world.addParticle("largesmoke", (double) i + Math.random(), (double) j + Math.random(), (double) k + Math.random(), 0.0D, 0.0D, 0.0D);
} }
} else { } else {
if (!world.isStatic && flag && !material.isLiquid()) {
world.setAir(i, j, k, true);
}
world.setTypeIdAndData(i, j, k, this.a, 0, 3); world.setTypeIdAndData(i, j, k, this.a, 0, 3);
} }

Datei anzeigen

@ -16,7 +16,7 @@ public class ItemFishingRod extends Item {
int i = entityhuman.hookedFish.c(); int i = entityhuman.hookedFish.c();
itemstack.damage(i, entityhuman); itemstack.damage(i, entityhuman);
entityhuman.aR(); entityhuman.aU();
} else { } else {
// CraftBukkit start // CraftBukkit start
EntityFishingHook hook = new EntityFishingHook(world, entityhuman); EntityFishingHook hook = new EntityFishingHook(world, entityhuman);
@ -32,7 +32,7 @@ public class ItemFishingRod extends Item {
world.addEntity(hook); // CraftBukkit - moved creation up world.addEntity(hook); // CraftBukkit - moved creation up
} }
entityhuman.aR(); entityhuman.aU();
} }
return itemstack; return itemstack;

Datei anzeigen

@ -39,17 +39,19 @@ public class ItemSign extends Item {
return false; return false;
} else if (!Block.SIGN_POST.canPlace(world, i, j, k)) { } else if (!Block.SIGN_POST.canPlace(world, i, j, k)) {
return false; return false;
} else if (world.isStatic) {
return true;
} else { } else {
// CraftBukkit start // CraftBukkit start
final Block block; final Block block;
if (l == 1) { if (l == 1) {
int i1 = MathHelper.floor((double) ((entityhuman.yaw + 180.0F) * 16.0F / 360.0F) + 0.5D) & 15; 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; block = Block.SIGN_POST;
l = i1; l = i1;
} else { } 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; block = Block.WALL_SIGN;
} }
if (!ItemBlock.processBlockPlace(world, entityhuman, null, i, j, k, block.id, l, clickedX, clickedY, clickedZ)) { if (!ItemBlock.processBlockPlace(world, entityhuman, null, i, j, k, block.id, l, clickedX, clickedY, clickedZ)) {

Datei anzeigen

@ -206,7 +206,7 @@ public final class ItemStack {
public void damage(int i, EntityLiving entityliving) { public void damage(int i, EntityLiving entityliving) {
if (!(entityliving instanceof EntityHuman) || !((EntityHuman) entityliving).abilities.canInstantlyBuild) { if (!(entityliving instanceof EntityHuman) || !((EntityHuman) entityliving).abilities.canInstantlyBuild) {
if (this.g()) { if (this.g()) {
if (this.isDamaged(i, entityliving.aB())) { if (this.isDamaged(i, entityliving.aC())) {
entityliving.a(this); entityliving.a(this);
--this.count; --this.count;
if (entityliving instanceof EntityHuman) { if (entityliving instanceof EntityHuman) {
@ -214,7 +214,7 @@ public final class ItemStack {
entityhuman.a(StatisticList.F[this.id], 1); entityhuman.a(StatisticList.F[this.id], 1);
if (this.count == 0 && this.getItem() instanceof ItemBow) { if (this.count == 0 && this.getItem() instanceof ItemBow) {
entityhuman.bu(); entityhuman.by();
} }
} }

Datei anzeigen

@ -755,7 +755,7 @@ public abstract class MinecraftServer implements ICommandListener, Runnable, IMo
} }
public String getVersion() { public String getVersion() {
return "1.6.1"; return "1.6.2";
} }
public int A() { public int A() {

Datei anzeigen

@ -96,8 +96,8 @@ public class MobEffectList {
if (!entityliving.world.isStatic) { if (!entityliving.world.isStatic) {
((EntityHuman) entityliving).getFoodData().eat(i + 1, 1.0F); ((EntityHuman) entityliving).getFoodData().eat(i + 1, 1.0F);
} }
} else if ((this.id != HEAL.id || entityliving.aI()) && (this.id != HARM.id || !entityliving.aI())) { } else if ((this.id != HEAL.id || entityliving.aL()) && (this.id != HARM.id || !entityliving.aL())) {
if (this.id == HARM.id && !entityliving.aI() || this.id == HEAL.id && entityliving.aI()) { if (this.id == HARM.id && !entityliving.aL() || this.id == HEAL.id && entityliving.aL()) {
entityliving.damageEntity(DamageSource.MAGIC, (float) (6 << i)); entityliving.damageEntity(DamageSource.MAGIC, (float) (6 << i));
} }
} else { } else {
@ -114,8 +114,8 @@ public class MobEffectList {
// CraftBukkit end // CraftBukkit end
int j; int j;
if ((this.id != HEAL.id || entityliving1.aI()) && (this.id != HARM.id || !entityliving1.aI())) { if ((this.id != HEAL.id || entityliving1.aL()) && (this.id != HARM.id || !entityliving1.aL())) {
if (this.id == HARM.id && !entityliving1.aI() || this.id == HEAL.id && entityliving1.aI()) { if (this.id == HARM.id && !entityliving1.aL() || this.id == HEAL.id && entityliving1.aL()) {
j = (int) (d0 * (double) (6 << i) + 0.5D); j = (int) (d0 * (double) (6 << i) + 0.5D);
if (entityliving == null) { if (entityliving == null) {
entityliving1.damageEntity(DamageSource.MAGIC, (float) j); entityliving1.damageEntity(DamageSource.MAGIC, (float) j);

Datei anzeigen

@ -13,6 +13,8 @@ import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicInteger;
import javax.crypto.SecretKey; import javax.crypto.SecretKey;
@ -30,7 +32,7 @@ public class NetworkManager implements INetworkManager {
private volatile DataOutputStream output; private volatile DataOutputStream output;
private volatile boolean n = true; private volatile boolean n = true;
private volatile boolean o; 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 highPriorityQueue = Collections.synchronizedList(new ArrayList());
private List lowPriorityQueue = Collections.synchronizedList(new ArrayList()); private List lowPriorityQueue = Collections.synchronizedList(new ArrayList());
private Connection connection; private Connection connection;
@ -282,7 +284,7 @@ public class NetworkManager implements INetworkManager {
int i = 1000; int i = 1000;
while (!this.inboundQueue.isEmpty() && i-- >= 0) { while (!this.inboundQueue.isEmpty() && i-- >= 0) {
Packet packet = (Packet) this.inboundQueue.poll(); // CraftBukkit - remove -> poll Packet packet = (Packet) this.inboundQueue.poll();
// CraftBukkit start // CraftBukkit start
if (this.connection instanceof PendingConnection ? ((PendingConnection) this.connection).b : ((PlayerConnection) this.connection).disconnected) { if (this.connection instanceof PendingConnection ? ((PendingConnection) this.connection).b : ((PlayerConnection) this.connection).disconnected) {
@ -290,7 +292,9 @@ public class NetworkManager implements INetworkManager {
} }
// CraftBukkit end // CraftBukkit end
packet.handle(this.connection); if (packet != null && !this.connection.c()) {
packet.handle(this.connection);
}
} }
this.a(); this.a();

Datei anzeigen

@ -321,6 +321,7 @@ public abstract class Packet {
a(130, true, true, Packet130UpdateSign.class); a(130, true, true, Packet130UpdateSign.class);
a(131, true, false, Packet131ItemData.class); a(131, true, false, Packet131ItemData.class);
a(132, true, false, Packet132TileEntityData.class); a(132, true, false, Packet132TileEntityData.class);
a(133, true, false, Packet133OpenTileEntity.class);
a(200, true, false, Packet200Statistic.class); a(200, true, false, Packet200Statistic.class);
a(201, true, false, Packet201PlayerInfo.class); a(201, true, false, Packet201PlayerInfo.class);
a(202, true, true, Packet202Abilities.class); a(202, true, true, Packet202Abilities.class);

Datei anzeigen

@ -31,7 +31,7 @@ public class PathfinderGoalBreakDoor extends PathfinderGoalDoorInteract {
public void e() { public void e() {
super.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); this.a.world.triggerEffect(1010, this.b, this.c, this.d, 0);
} }

Datei anzeigen

@ -20,7 +20,7 @@ public class PathfinderGoalBreed extends PathfinderGoal {
} }
public boolean a() { public boolean a() {
if (!this.d.bU()) { if (!this.d.bY()) {
return false; return false;
} else { } else {
this.e = this.f(); this.e = this.f();
@ -29,7 +29,7 @@ public class PathfinderGoalBreed extends PathfinderGoal {
} }
public boolean b() { 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() { public void d() {
@ -38,7 +38,7 @@ public class PathfinderGoalBreed extends PathfinderGoal {
} }
public void e() { 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.d.getNavigation().a((Entity) this.e, this.c);
++this.b; ++this.b;
if (this.b >= 60 && this.d.e(this.e) < 9.0D) { if (this.b >= 60 && this.d.e(this.e) < 9.0D) {
@ -71,12 +71,12 @@ public class PathfinderGoalBreed extends PathfinderGoal {
if (entityageable != null) { if (entityageable != null) {
this.d.setAge(6000); this.d.setAge(6000);
this.e.setAge(6000); this.e.setAge(6000);
this.d.bV(); this.d.bZ();
this.e.bV(); this.e.bZ();
entityageable.setAge(-24000); entityageable.setAge(-24000);
entityageable.setPositionRotation(this.d.locX, this.d.locY, this.d.locZ, 0.0F, 0.0F); 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 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) { for (int i = 0; i < 7; ++i) {
double d0 = random.nextGaussian() * 0.02D; double d0 = random.nextGaussian() * 0.02D;

Datei anzeigen

@ -18,7 +18,7 @@ public class PathfinderGoalEatTile extends PathfinderGoal {
} }
public boolean a() { 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; return false;
} else { } else {
int i = MathHelper.floor(this.b.locX); int i = MathHelper.floor(this.b.locX);

Datei anzeigen

@ -68,7 +68,7 @@ public class PathfinderGoalMeleeAttack extends PathfinderGoal {
this.b.getControllerLook().a(entityliving, 30.0F, 30.0F); this.b.getControllerLook().a(entityliving, 30.0F, 30.0F);
if ((this.e || this.b.getEntitySenses().canSee(entityliving)) && --this.h <= 0) { 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); 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.b.e(entityliving.locX, entityliving.boundingBox.b, entityliving.locZ) <= d0) {
if (this.c <= 0) { if (this.c <= 0) {
this.c = 20; this.c = 20;
if (this.b.aV() != null) { if (this.b.aY() != null) {
this.b.aR(); this.b.aU();
} }
this.b.m(entityliving); this.b.m(entityliving);

Datei anzeigen

@ -53,9 +53,9 @@ public abstract class PathfinderGoalTarget extends PathfinderGoal {
} }
protected double f() { 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() { public void c() {
@ -144,7 +144,7 @@ public abstract class PathfinderGoalTarget extends PathfinderGoal {
} }
private boolean a(EntityLiving entityliving) { 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); PathEntity pathentity = this.c.getNavigation().a(entityliving);
if (pathentity == null) { if (pathentity == null) {

Datei anzeigen

@ -38,9 +38,9 @@ public class PendingConnection extends Connection {
} }
// CraftBukkit end // CraftBukkit end
public void c() { public void d() {
if (this.h) { if (this.h) {
this.d(); this.e();
} }
if (this.f++ == 600) { if (this.f++ == 600) {
@ -71,8 +71,8 @@ public class PendingConnection extends Connection {
} else { } else {
PublicKey publickey = this.server.H().getPublic(); PublicKey publickey = this.server.H().getPublic();
if (packet2handshake.d() != 73) { if (packet2handshake.d() != 74) {
if (packet2handshake.d() > 73) { if (packet2handshake.d() > 74) {
this.disconnect("Outdated server!"); this.disconnect("Outdated server!");
} else { } else {
this.disconnect("Outdated client!"); this.disconnect("Outdated client!");
@ -115,7 +115,7 @@ public class PendingConnection extends Connection {
public void a(Packet1Login packet1login) {} public void a(Packet1Login packet1login) {}
public void d() { public void e() {
// CraftBukkit start // CraftBukkit start
EntityPlayer s = this.server.getPlayerList().attemptLogin(this, this.g, this.hostname); 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(); s = pingEvent.getMotd() + "\u00A7" + playerlist.getPlayerCount() + "\u00A7" + pingEvent.getMaxPlayers();
} else { } else {
// CraftBukkit start - Don't create a list from an array // 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(); StringBuilder builder = new StringBuilder();
for (Object object : list) { for (Object object : list) {
@ -197,6 +197,10 @@ public class PendingConnection extends Connection {
return true; return true;
} }
public boolean c() {
return this.b;
}
static String a(PendingConnection pendingconnection) { static String a(PendingConnection pendingconnection) {
return pendingconnection.loginKey; return pendingconnection.loginKey;
} }

Datei anzeigen

@ -124,7 +124,7 @@ class PlayerChunk {
i = this.location.x * 16 + (this.dirtyBlocks[0] >> 12 & 15); i = this.location.x * 16 + (this.dirtyBlocks[0] >> 12 & 15);
j = this.dirtyBlocks[0] & 255; j = this.dirtyBlocks[0] & 255;
k = this.location.z * 16 + (this.dirtyBlocks[0] >> 8 & 15); 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)) { if (PlayerChunkMap.a(this.playerChunkMap).isTileEntity(i, j, k)) {
this.sendTileEntity(PlayerChunkMap.a(this.playerChunkMap).getTileEntity(i, j, k)); this.sendTileEntity(PlayerChunkMap.a(this.playerChunkMap).getTileEntity(i, j, k));
} }
@ -134,7 +134,7 @@ class PlayerChunk {
if (this.dirtyCount == 64) { if (this.dirtyCount == 64) {
i = this.location.x * 16; i = this.location.x * 16;
j = this.location.z * 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) { for (k = 0; k < 16; ++k) {
if ((this.f & 1 << k) != 0) { if ((this.f & 1 << k) != 0) {

Datei anzeigen

@ -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. 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 // CraftBukkit end
public void d() { public void e() {
this.g = false; this.g = false;
++this.e; ++this.e;
this.minecraftServer.methodProfiler.a("packetflow"); this.minecraftServer.methodProfiler.a("packetflow");
@ -263,47 +263,26 @@ public class PlayerConnection extends Connection {
double d1; double d1;
double d2; double d2;
double d3; double d3;
double d4;
if (this.player.vehicle != null) { if (this.player.vehicle != null) {
float f = this.player.yaw; float f = this.player.yaw;
float f1 = this.player.pitch; float f1 = this.player.pitch;
this.player.vehicle.U(); this.player.vehicle.V();
d1 = this.player.locX; d1 = this.player.locX;
d2 = this.player.locY; d2 = this.player.locY;
d3 = this.player.locZ; d3 = this.player.locZ;
double d5 = 0.0D;
d4 = 0.0D;
if (packet10flying.hasLook) { if (packet10flying.hasLook) {
f = packet10flying.yaw; f = packet10flying.yaw;
f1 = packet10flying.pitch; 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.onGround = packet10flying.g;
this.player.h(); 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.setLocation(d1, d2, d3, f, f1);
this.player.motX = d5;
this.player.motZ = d4;
if (this.player.vehicle != null) { if (this.player.vehicle != null) {
// worldserver.vehicleEnteredWorld(this.player.vehicle, true); // CraftBukkit - removed this.player.vehicle.V();
}
if (this.player.vehicle != null) {
this.player.vehicle.U();
} }
this.minecraftServer.getPlayerList().d(this.player); this.minecraftServer.getPlayerList().d(this.player);
@ -338,6 +317,8 @@ public class PlayerConnection extends Connection {
packet10flying.hasPos = false; packet10flying.hasPos = false;
} }
double d4;
if (packet10flying.hasPos) { if (packet10flying.hasPos) {
d1 = packet10flying.x; d1 = packet10flying.x;
d2 = packet10flying.y; d2 = packet10flying.y;
@ -369,17 +350,17 @@ public class PlayerConnection extends Connection {
} }
d4 = d1 - this.player.locX; d4 = d1 - this.player.locX;
double d6 = d2 - this.player.locY; double d5 = d2 - this.player.locY;
double d7 = d3 - this.player.locZ; double d6 = d3 - this.player.locZ;
// CraftBukkit start - min to max // CraftBukkit start - min to max
double d8 = Math.max(Math.abs(d4), Math.abs(this.player.motX)); double d7 = Math.max(Math.abs(d4), Math.abs(this.player.motX));
double d9 = Math.max(Math.abs(d6), Math.abs(this.player.motY)); double d8 = Math.max(Math.abs(d5), Math.abs(this.player.motY));
double d10 = Math.max(Math.abs(d7), Math.abs(this.player.motZ)); double d9 = Math.max(Math.abs(d6), Math.abs(this.player.motZ));
// CraftBukkit end // 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 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 + "," + d6 + "," + d7 + " (" + d8 + ", " + d9 + ", " + d10 + ")"); 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); this.a(this.y, this.z, this.p, this.player.yaw, this.player.pitch);
return; return;
} }
@ -387,26 +368,26 @@ public class PlayerConnection extends Connection {
float f4 = 0.0625F; float f4 = 0.0625F;
boolean flag = worldserver.getCubes(this.player, this.player.boundingBox.clone().shrink((double) f4, (double) f4, (double) f4)).isEmpty(); 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.a(0.2F);
} }
this.player.move(d4, d6, d7); this.player.move(d4, d5, d6);
this.player.onGround = packet10flying.g; this.player.onGround = packet10flying.g;
this.player.checkMovement(d4, d6, d7); this.player.checkMovement(d4, d5, d6);
double d12 = d6; double d11 = d5;
d4 = d1 - this.player.locX; d4 = d1 - this.player.locX;
d6 = d2 - this.player.locY; d5 = d2 - this.player.locY;
if (d6 > -0.5D || d6 < 0.5D) { if (d5 > -0.5D || d5 < 0.5D) {
d6 = 0.0D; d5 = 0.0D;
} }
d7 = d3 - this.player.locZ; d6 = d3 - this.player.locZ;
d11 = d4 * d4 + d6 * d6 + d7 * d7; d10 = d4 * d4 + d5 * d5 + d6 * d6;
boolean flag1 = false; 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; flag1 = true;
this.minecraftServer.getLogger().warning(this.player.getName() + " moved wrongly!"); 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); 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 (!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; ++this.f;
if (this.f > 80) { if (this.f > 80) {
this.minecraftServer.getLogger().warning(this.player.getName() + " was kicked for floating too long!"); 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) { } else if (packet14blockdig.e == 3) {
this.player.a(true); this.player.a(true);
} else if (packet14blockdig.e == 5) { } else if (packet14blockdig.e == 5) {
this.player.bo(); this.player.bs();
} else { } else {
boolean flag = false; boolean flag = false;
@ -1029,7 +1010,7 @@ public class PlayerConnection extends Connection {
if (event.isCancelled()) return; if (event.isCancelled()) return;
// CraftBukkit end // CraftBukkit end
this.player.aR(); this.player.aU();
} }
} }
@ -1108,7 +1089,7 @@ public class PlayerConnection extends Connection {
if (event.isCancelled()) { if (event.isCancelled()) {
if (itemInHand != null && itemInHand.id == Item.LEASH.id && entity instanceof EntityInsentient) { if (itemInHand != null && itemInHand.id == Item.LEASH.id && entity instanceof EntityInsentient) {
// Refresh the current leash state // 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) { if (itemInHand != null && itemInHand.id == Item.NAME_TAG.id && entity instanceof EntityInsentient) {
// Refresh the current entity metadata // Refresh the current entity metadata
@ -1564,7 +1545,7 @@ public class PlayerConnection extends Connection {
if (tileentity instanceof TileEntitySign) { if (tileentity instanceof TileEntitySign) {
TileEntitySign tileentitysign = (TileEntitySign) tileentity; 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.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 this.sendPacket(new Packet130UpdateSign(packet130updatesign.x, packet130updatesign.y, packet130updatesign.z, tileentitysign.lines)); // CraftBukkit
return; return;
@ -1824,4 +1805,8 @@ public class PlayerConnection extends Connection {
} }
} }
} }
public boolean c() {
return this.disconnected;
}
} }

Datei anzeigen

@ -261,7 +261,7 @@ public class PlayerInteractManager {
event.setCancelled(this.gamemode.isAdventure() && !this.player.d(i, j, k)); event.setCancelled(this.gamemode.isAdventure() && !this.player.d(i, j, k));
// Sword + Creative mode pre-cancel // 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 // Calculate default block experience
Block nmsBlock = Block.byId[block.getTypeId()]; Block nmsBlock = Block.byId[block.getTypeId()];
@ -311,13 +311,13 @@ public class PlayerInteractManager {
if (this.isCreative()) { if (this.isCreative()) {
this.player.playerConnection.sendPacket(new Packet53BlockChange(i, j, k, this.world)); this.player.playerConnection.sendPacket(new Packet53BlockChange(i, j, k, this.world));
} else { } else {
ItemStack itemstack = this.player.bt(); ItemStack itemstack = this.player.bx();
boolean flag1 = this.player.a(Block.byId[l]); boolean flag1 = this.player.a(Block.byId[l]);
if (itemstack != null) { if (itemstack != null) {
itemstack.a(this.world, l, i, j, k, this.player); itemstack.a(this.world, l, i, j, k, this.player);
if (itemstack.count == 0) { if (itemstack.count == 0) {
this.player.bu(); this.player.by();
} }
} }
@ -356,7 +356,7 @@ public class PlayerInteractManager {
entityhuman.inventory.items[entityhuman.inventory.itemInHandIndex] = null; entityhuman.inventory.items[entityhuman.inventory.itemInHandIndex] = null;
} }
if (!entityhuman.bm()) { if (!entityhuman.bq()) {
((EntityPlayer) entityhuman).updateInventory(entityhuman.defaultContainer); ((EntityPlayer) entityhuman).updateInventory(entityhuman.defaultContainer);
} }

Datei anzeigen

@ -1,5 +1,6 @@
package net.minecraft.server; package net.minecraft.server;
import com.google.common.base.Charsets;
import java.io.File; import java.io.File;
import java.net.SocketAddress; import java.net.SocketAddress;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
@ -91,6 +92,7 @@ public abstract class PlayerList {
entityplayer.getBukkitEntity().sendSupportedChannels(); entityplayer.getBukkitEntity().sendSupportedChannels();
// CraftBukkit end // 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 Packet6SpawnPosition(chunkcoordinates.x, chunkcoordinates.y, chunkcoordinates.z));
playerconnection.sendPacket(new Packet202Abilities(entityplayer.abilities)); playerconnection.sendPacket(new Packet202Abilities(entityplayer.abilities));
playerconnection.sendPacket(new Packet16BlockItemSwitch(entityplayer.inventory.itemInHandIndex)); playerconnection.sendPacket(new Packet16BlockItemSwitch(entityplayer.inventory.itemInHandIndex));
@ -260,9 +262,9 @@ public abstract class PlayerList {
this.b(entityplayer); this.b(entityplayer);
WorldServer worldserver = entityplayer.p(); 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); worldserver.removeEntity(entityplayer.vehicle);
System.out.println("removing player mount"); // System.out.println("removing player mount"); // CraftBukkit - Removed debug message
} }
worldserver.kill(entityplayer); 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 ((world == null || entityplayer.world == world) && (s == null || flag1 != s.equalsIgnoreCase(entityplayer.getLocalizedName()))) {
if (s1 != null) { if (s1 != null) {
ScoreboardTeam scoreboardteam = entityplayer.getScoreboardTeam(); ScoreboardTeamBase scoreboardteambase = entityplayer.getScoreboardTeam();
String s2 = scoreboardteam == null ? "" : scoreboardteam.getName(); String s2 = scoreboardteambase == null ? "" : scoreboardteambase.getName();
if (flag2 == s1.equalsIgnoreCase(s2)) { if (flag2 == s1.equalsIgnoreCase(s2)) {
continue; continue;

Datei anzeigen

@ -215,7 +215,7 @@ public class PortalTravelAgent {
j2 = 1; j2 = 1;
} }
int k2 = entity.ar(); int k2 = entity.as();
if (j2 > -1) { if (j2 > -1) {
int l2 = Direction.h[j2]; int l2 = Direction.h[j2];

Datei anzeigen

@ -160,7 +160,7 @@ public final class SpawnerCreature {
groupdataentity = entityinsentient.a(groupdataentity); groupdataentity = entityinsentient.a(groupdataentity);
worldserver.addEntity(entityinsentient, SpawnReason.NATURAL); worldserver.addEntity(entityinsentient, SpawnReason.NATURAL);
// CraftBukkit end // CraftBukkit end
if (j2 >= entityinsentient.br()) { if (j2 >= entityinsentient.bv()) {
continue label110; continue label110;
} }
} }

Datei anzeigen

@ -266,7 +266,7 @@ public class TileEntityHopper extends TileEntity implements IHopper {
} }
} }
} else { } 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) { if (entityitem != null) {
return addEntityItem(ihopper, entityitem); return addEntityItem(ihopper, entityitem);
@ -423,7 +423,7 @@ public class TileEntityHopper extends TileEntity implements IHopper {
} }
public static IInventory getSourceInventory(IHopper 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) { 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))); 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; return (double) this.x;
} }
public double aA() { public double aB() {
return (double) this.y; return (double) this.y;
} }
public double aB() { public double aC() {
return (double) this.z; return (double) this.z;
} }

Datei anzeigen

@ -5,6 +5,7 @@ public class TileEntitySign extends TileEntity {
public String[] lines = new String[] { "", "", "", ""}; public String[] lines = new String[] { "", "", "", ""};
public int b = -1; public int b = -1;
public boolean isEditable = true; // CraftBukkit - private -> public public boolean isEditable = true; // CraftBukkit - private -> public
private EntityHuman d;
public TileEntitySign() {} public TileEntitySign() {}
@ -47,4 +48,12 @@ public class TileEntitySign extends TileEntity {
public boolean a() { public boolean a() {
return this.isEditable; return this.isEditable;
} }
public void a(EntityHuman entityhuman) {
this.d = entityhuman;
}
public EntityHuman b() {
return this.d;
}
} }

Datei anzeigen

@ -1347,10 +1347,10 @@ public abstract class World implements IBlockAccess {
entity.lastYaw = entity.yaw; entity.lastYaw = entity.yaw;
entity.lastPitch = entity.pitch; entity.lastPitch = entity.pitch;
if (flag && entity.ai) { if (flag && entity.ai) {
++entity.ticksLived;
if (entity.vehicle != null) { if (entity.vehicle != null) {
entity.T(); entity.U();
} else { } else {
++entity.ticksLived;
entity.l_(); 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(); vec3d = vec3d.a();
double d1 = 0.014D; 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 // CraftBukkit start - Split out persistent check, don't apply it to special persistent mobs
if (entity instanceof EntityInsentient) { if (entity instanceof EntityInsentient) {
EntityInsentient entityinsentient = (EntityInsentient) entity; EntityInsentient entityinsentient = (EntityInsentient) entity;
if (entityinsentient.isTypeNotPersistent() && entityinsentient.bA()) { // Should be isPersistent if (entityinsentient.isTypeNotPersistent() && entityinsentient.isPersistent()) {
continue; continue;
} }
} }
@ -2565,7 +2565,7 @@ public abstract class World implements IBlockAccess {
} }
if (entityhuman1.isInvisible()) { if (entityhuman1.isInvisible()) {
float f = entityhuman1.bs(); float f = entityhuman1.bw();
if (f < 0.1F) { if (f < 0.1F) {
f = 0.1F; f = 0.1F;

Datei anzeigen

@ -610,24 +610,10 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
entity.die(); entity.die();
} }
if (!(entity.passenger instanceof EntityHuman)) { super.entityJoinedWorld(entity, flag);
super.entityJoinedWorld(entity, flag);
}
} }
// CraftBukkit end */ // 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() { protected IChunkProvider j() {
IChunkLoader ichunkloader = this.dataManager.createChunkLoader(this.worldProvider); 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) { protected void a(Entity entity) {
super.a(entity); super.a(entity);
this.entitiesById.a(entity.id, entity); this.entitiesById.a(entity.id, entity);
Entity[] aentity = entity.am(); Entity[] aentity = entity.an();
if (aentity != null) { if (aentity != null) {
for (int i = 0; i < aentity.length; ++i) { 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) { protected void b(Entity entity) {
super.b(entity); super.b(entity);
this.entitiesById.d(entity.id); this.entitiesById.d(entity.id);
Entity[] aentity = entity.am(); Entity[] aentity = entity.an();
if (aentity != null) { if (aentity != null) {
for (int i = 0; i < aentity.length; ++i) { for (int i = 0; i < aentity.length; ++i) {

Datei anzeigen

@ -90,7 +90,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public void setMaxHealth(double amount) { public void setMaxHealth(double amount) {
Validate.isTrue(amount > 0, "Max health must be greater than 0"); 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) { if (getHealth() > amount) {
setHealth(amount); setHealth(amount);

Datei anzeigen

@ -64,6 +64,12 @@ public class CraftPotionEffectType extends PotionEffectType {
return "POISON"; return "POISON";
case 20: case 20:
return "WITHER"; return "WITHER";
case 21:
return "HEALTH_BOOST";
case 22:
return "ABSORPTION";
case 23:
return "SATURATION";
default: default:
return "UNKNOWN_EFFECT_TYPE_" + handle.id; return "UNKNOWN_EFFECT_TYPE_" + handle.id;
} }