@@ -47,7 +47,7 @@ public Item getItem() {

@Override
public World getWorld() {
return getEntity().X.world;
return getEntity().bf.world;
}

}
@@ -35,7 +35,7 @@ public OEntityLiving getEntity() {
* @return health
*/
public int getHealth() {
return getEntity().bq;
return getEntity().ao;
}

/**
@@ -45,7 +45,7 @@ public int getHealth() {
* amount of health to increase the players health with.
*/
public void increaseHealth(int health) {
getEntity().c(health);
getEntity().d(health);
}

/**
@@ -60,7 +60,7 @@ public void setHealth(int health) {
if (health > 20) {
health = 20;
}
getEntity().bq = health;
getEntity().ao = health;
}

/**
@@ -69,7 +69,7 @@ public void setHealth(int health) {
* @return
*/
public int getDeathTicks() {
return getEntity().bj;
return getEntity().au;
}

/**
@@ -78,7 +78,7 @@ public int getDeathTicks() {
* @param ticks
*/
public void setDeathTicks(int ticks) {
getEntity().ag = ticks;
getEntity().au = ticks;
}

/**
@@ -88,7 +88,7 @@ public void setDeathTicks(int ticks) {
* @return
*/
public int getBaseNoDamageTicks() {
return getEntity().aU;
return getEntity().S;
}

/**
@@ -98,7 +98,7 @@ public int getBaseNoDamageTicks() {
* @param ticks
*/
public void setBaseNoDamageTicks(int ticks) {
getEntity().aU = ticks;
getEntity().S = ticks;
}

/**
@@ -107,7 +107,7 @@ public void setBaseNoDamageTicks(int ticks) {
* @return
*/
public int getLastDamage() {
return getEntity().bB;
return getEntity().aR;
}

/**
@@ -117,6 +117,6 @@ public int getLastDamage() {
* @param amount
*/
public void setLastDamage(int amount) {
getEntity().ax = amount;
getEntity().aR = amount;
}
}
@@ -1,9 +1,13 @@

import java.io.IOException;

/**
* Location.java - Used for passing a location to other functions and such.
*
* @author James
*/
public class Location {
public class Location implements java.io.Serializable {
private static final long serialVersionUID = 1L;

/**
* X location
@@ -98,8 +102,55 @@ public Location(World world, double X, double Y, double Z, float rotation, float
this.dimension = world.getType().getId();
}

/**
* Returns the world for this loacation's dimension.
*
* @return a <tt>World</tt>-object representing the world at this location's
* dimension.
*/
public World getWorld() {
return etc.getServer().getWorld(dimension);
}

/**
* Used to get the distance to another location.
* If other location is in another world, this method returns <tt>-1</tt>.
*
* @param other the <tt>Location</tt> to get the distance to.
* @return the distance to <tt>other</tt> if it is in the same world,
* <tt>-1</tt> otherwise.
*/
public double distanceTo(Location other) {
if (this.dimension != other.dimension)
return -1;
double dx = Math.abs(this.x - other.x),
dy = Math.abs(this.y - other.y),
dz = Math.abs(this.z - other.z);
return Math.sqrt(dx*dx + dy*dy + dz*dz);
}

@Override
public boolean equals(Object obj) {
return (obj instanceof Location) && this.hashCode() == obj.hashCode();
}

@Override
public int hashCode() {
int hash = 3;
hash = 19 * hash + (int) (Double.doubleToLongBits(this.x) ^ (Double.doubleToLongBits(this.x) >>> 32));
hash = 19 * hash + (int) (Double.doubleToLongBits(this.z) ^ (Double.doubleToLongBits(this.z) >>> 32));
hash = 19 * hash + (int) (Double.doubleToLongBits(this.y) ^ (Double.doubleToLongBits(this.y) >>> 32));
hash = 19 * hash + Float.floatToIntBits(this.rotX);
hash = 19 * hash + Float.floatToIntBits(this.rotY);
hash = 19 * hash + this.dimension;
return hash;
}

// Used by Java to read it, this makes it read all fields and not error out
// on extra fields.
private void readObject(java.io.ObjectInputStream in)
throws java.io.IOException, ClassNotFoundException {
in.defaultReadObject();
}

}
@@ -85,7 +85,7 @@ public OEntityMinecart getEntity() {
* over 40 and you "kill" the mineentity
*/
public void setDamage(int damage) {
getEntity().e_(damage);
getEntity().b(damage);
}

/**
@@ -94,7 +94,7 @@ public void setDamage(int damage) {
* @return returns current damage
*/
public int getDamage() {
return getEntity().o();
return getEntity().k();
}

/**
@@ -7,8 +7,6 @@
*/
public class Mob extends LivingEntity {

OEntityCreature MobcEnt = null;

/**
* Creates a mob interface
*
@@ -75,6 +73,7 @@ public void spawn(Mob rider) {
*
* @return name
*/
@Override
public String getName() {
return OEntityList.b(entity);
}
@@ -85,18 +84,16 @@ public String getName() {
* @return OEntity
*/
public OEntity getTarget() {
MobcEnt = (OEntityCreature) this.getEntity();
return this.MobcEnt.a;
return this.getEntity().d;
}

/**
* Sets the mobs target
*
* @param entity
* @param target the entity to target
*/
public void setTarget(OEntity target) {
MobcEnt = (OEntityCreature) this.getEntity();
this.MobcEnt.a = target;
this.getEntity().d = target;
}

/**
@@ -142,6 +139,7 @@ public static boolean isValid(String mob) {

/**
* Returns Mob location
* @return this mob's location
*/
public Location getLocation() {
Location loc = new Location();
@@ -155,4 +153,9 @@ public Location getLocation() {
return loc;
}

@Override
public OEntityCreature getEntity() {
return (OEntityCreature) entity;
}

}
@@ -18,28 +18,34 @@ public MobSpawner(OTileEntityMobSpawner spawner) {
this.spawner = spawner;
}

@Override
public int getX() {
return spawner.l;
}

@Override
public int getY() {
return spawner.m;
}

@Override
public int getZ() {
return spawner.n;
}

@Override
public Block getBlock() {
return getWorld().getBlockAt(getX(), getY(), getZ());
}

@Override
public World getWorld() {
return spawner.k.world;
}

@Override
public void update() {
spawner.h();
spawner.i();
}

/**
@@ -62,9 +68,9 @@ public String getSpawn() {
}

/**
* Allows delay of what to spawn to change on-the-fly Modification of this
* is near-useless as delays get randomized after spawn. See:
* Block.setSpawnData() if you want to adjust this value.
* Allows delay of what to spawn to change on-the-fly.
* Modification of this is near-useless as delays get randomized after
* spawn.
*
* @param delay
*/
@@ -50,7 +50,7 @@ public abstract class OEntity {
protected Random bP;
public int bQ;
public int bR;
private int c;
protected int c; // CanaryMod: private -> protected
protected boolean bS;
public int bT;
private boolean d;
@@ -14,7 +14,7 @@ public boolean a(OItemStack var1, OEntityPlayer var2, OWorld var3, int var4, int
int var8 = var3.a(var4, var5, var6);
int var9 = var3.a(var4, var5 + 1, var6);

if ((var7 == 0 || var9 != 0 || var8 != OBlock.u.bM) && var8 != OBlock.v.bM) {
if ((var7 == 0 || var9 != 0 || var8 != OBlock.w.bO) && var8 != OBlock.x.bO) {
return false;
} else {
// CanaryMod: Hoes
@@ -27,18 +27,11 @@ public boolean a(OItemStack var1, OEntityPlayer var2, OWorld var3, int var4, int
if (var2 instanceof OEntityPlayerMP) {
Player player = ((OEntityPlayerMP) var2).getPlayer();

<<<<<<<
if ((Boolean) etc.getLoader().callHook(PluginLoader.Hook.ITEM_USE, player, blockPlaced, blockClicked, new Item(var1))) {
return false;
}
}
OBlock var10 = OBlock.aA;
=======
if ((var7 == 0 || var9 != 0 || var8 != OBlock.w.bO) && var8 != OBlock.x.bO) {
return false;
} else {
OBlock var10 = OBlock.aC;
>>>>>>>

var3.a((double) ((float) var4 + 0.5F), (double) ((float) var5 + 0.5F), (double) ((float) var6 + 0.5F), var10.bZ.c(), (var10.bZ.a() + 1.0F) / 2.0F, var10.bZ.b() * 0.8F);
if (var3.I) {
@@ -11,12 +11,7 @@ public boolean a(OItemStack var1, OEntityPlayer var2, OWorld var3, int var4, int

blockClicked.setFaceClicked(Block.Face.fromId(var7));

<<<<<<<
if (var3.a(var4, var5, var6) != OBlock.aS.bM) {
=======
public boolean a(OItemStack var1, OEntityPlayer var2, OWorld var3, int var4, int var5, int var6, int var7) {
if (var3.a(var4, var5, var6) != OBlock.aU.bO) {
>>>>>>>
if (var7 == 0) {
--var5;
}
@@ -49,7 +44,7 @@ public boolean a(OItemStack var1, OEntityPlayer var2, OWorld var3, int var4, int
if (!var2.d(var4, var5, var6)) {
return false;
} else {
if (OBlock.av.d(var3, var4, var5, var6)) {
if (OBlock.ax.c(var3, var4, var5, var6)) {
// CanaryMod: Redstone dust hook!
Block blockPlaced = new Block(var3.world, Block.Type.RedstoneWire.getType(), var4, var5, var6);
Player player = ((OEntityPlayerMP) var2).getPlayer();
@@ -58,13 +53,6 @@ public boolean a(OItemStack var1, OEntityPlayer var2, OWorld var3, int var4, int
return false;
}

<<<<<<<
=======
if (!var2.d(var4, var5, var6)) {
return false;
} else {
if (OBlock.ax.c(var3, var4, var5, var6)) {
>>>>>>>
--var1.a;
var3.e(var4, var5, var6, OBlock.ax.bO);
}
@@ -49,7 +49,6 @@ public boolean a(OItemStack var1, OEntityPlayer var2, OWorld var3, int var4, int
return false;
} else {
if (var3.a(this.a, var4, var5, var6, false, var7)) {
<<<<<<<
// CanaryMod: Reed placement
Block blockPlaced = new Block(var3.world, var3.a(var4, var5, var6), var4, var5, var6);

@@ -60,10 +59,7 @@ public boolean a(OItemStack var1, OEntityPlayer var2, OWorld var3, int var4, int
return false;
}

OBlock var9 = OBlock.k[this.a];
=======
OBlock var9 = OBlock.m[this.a];
>>>>>>>

if (var3.e(var4, var5, var6, this.a)) {
if (var3.a(var4, var5, var6) == this.a) {
@@ -16,14 +16,7 @@ public boolean a(OItemStack var1, OEntityPlayer var2, OWorld var3, int var4, int
} else if (var2.d(var4, var5, var6) && var2.d(var4, var5 + 1, var6)) {
int var8 = var3.a(var4, var5, var6);

<<<<<<<
if (var8 == this.b && var3.b(var4, var5 + 1, var6)) {
=======
if (var8 == this.b && var3.f(var4, var5 + 1, var6)) {
var3.e(var4, var5 + 1, var6, this.a);
--var1.a;
return true;
>>>>>>>
// CanaryMod: Seeds
Block blockClicked = new Block(var3.world, var8, var4, var5, var6);

@@ -43,7 +43,7 @@ public boolean a(OItemStack var1, OEntityPlayer var2, OWorld var3, int var4, int
return false;
} else {
// CanaryMod: Now we can call itemUse :)
Block blockPlaced = new Block(var3.world, (var7 == 1 ? OBlock.aD.bM : OBlock.aI.bM), var4, var5, var6);
Block blockPlaced = new Block(var3.world, (var7 == 1 ? OBlock.aF.bO : OBlock.aK.bO), var4, var5, var6);

if (var2 instanceof OEntityPlayerMP && (Boolean) etc.getLoader().callHook(PluginLoader.Hook.ITEM_USE, ((OEntityPlayerMP) var2).getPlayer(), blockPlaced, blockClicked, new Item(var1))) {
return false;
@@ -94,12 +94,7 @@ public OItemStack b(OWorld var1, OEntityPlayer var2) {
}

public ONBTTagCompound b(ONBTTagCompound var1) {
<<<<<<<
// CanaryMod: fix jarjar
var1.a("id", (short) this.c);
=======
var1.a("ORegionFileChunkBuffer", (short) this.c);
>>>>>>>
var1.a("id", (short) this.c); // CanaryMod: fix jarjar
var1.a("Count", (byte) this.a);
var1.a("Damage", (short) this.e);
if (this.d != null) {
@@ -110,12 +105,7 @@ public ONBTTagCompound b(ONBTTagCompound var1) {
}

public void c(ONBTTagCompound var1) {
<<<<<<<
// CanaryMod: fix jarjar
this.c = var1.e("id");
=======
this.c = var1.e("ORegionFileChunkBuffer");
>>>>>>>
this.c = var1.e("id"); // CanaryMod: fix jarjar
this.a = var1.d("Count");
this.e = var1.e("Damage");
if (var1.c("tag")) {
@@ -254,12 +244,7 @@ public static OItemStack b(OItemStack var0) {
}

public String toString() {
<<<<<<<
// CanaryMod: fix jarjar
return this.a + "x" + OItem.d[this.c].b() + "@" + this.e;
=======
return this.a + "OSlotEnchantmentTable" + OItem.d[this.c].b() + "@" + this.e;
>>>>>>>
return this.a + "x" + OItem.d[this.c].b() + "@" + this.e; // CanaryMod: fix jarjar
}

public void a(OWorld var1, OEntity var2, int var3, boolean var4) {
@@ -327,11 +312,7 @@ public void a(OEnchantment var1, int var2) {
ONBTTagList var3 = (ONBTTagList) this.d.b("ench");
ONBTTagCompound var4 = new ONBTTagCompound();

<<<<<<<
var4.a("id", (short) var1.t); // CanaryMod: fix jarjar
=======
var4.a("ORegionFileChunkBuffer", (short) var1.t);
>>>>>>>
var4.a("lvl", (short) ((byte) var2));
var3.a((ONBTBase) var4);
}
@@ -94,35 +94,9 @@ public void b(OPacket1Login var1) {
var2.c.b(var3.r().n());
ONetServerHandler var5 = new ONetServerHandler(this.e, this.b, var2);
// CanaryMod - if seed is hidden send 0 instead.
OPacket1Login var10001 = new OPacket1Login("", var2.S, (etc.getInstance().getHideSeed() == true) ? 0 : var3.m(), var2.c.a(), (byte) var3.y.g, (byte) var3.v, (byte) var3.c, (byte) this.e.h.k());

<<<<<<<
var5.b((OPacket) var10001);
=======
var5.b((OPacket) (new OPacket1Login("", var2.ba, var3.m(), var2.c.a(), (byte) var3.y.g, (byte) var3.v, (byte) var3.c, (byte) this.e.h.k())));
>>>>>>>
var5.b((OPacket) (new OPacket1Login("", var2.ba, etc.getInstance().getHideSeed() == true ? 0 : var3.m(), var2.c.a(), (byte) var3.y.g, (byte) var3.v, (byte) var3.c, (byte) this.e.h.k())));
var5.b((OPacket) (new OPacket6SpawnPosition(var4.a, var4.b, var4.c)));
this.e.h.a(var2, var3);
<<<<<<<
=======
this.e.h.a((OPacket) (new OPacket3Chat("\u00a7e" + var2.v + " joined the game.")));
this.e.h.c(var2);
var5.a(var2.bj, var2.bk, var2.bl, var2.bp, var2.bq);
this.e.c.a(var5);
var5.b((OPacket) (new OPacket4UpdateTime(var3.n())));
Iterator var6 = var2.as().iterator();

while (var6.hasNext()) {
OPotionEffect var7 = (OPotionEffect) var6.next();

var5.b((OPacket) (new OPacket41EntityEffect(var2.ba, var7)));
}

var2.u();
}

this.c = true;
>>>>>>>
// CanaryMod - onConnect Hook
HookParametersConnect hookResult = new HookParametersConnect(String.format(Colors.Yellow + "%s joined the game.", var2.v), true);

@@ -132,22 +106,22 @@ public void b(OPacket1Login var1) {
}
var2.getPlayer().refreshCreativeMode();
this.e.h.c(var2);
var5.a(var2.ab, var2.ac, var2.ad, var2.ah, var2.ai);
var5.a(var2.bj, var2.bk, var2.bl, var2.bp, var2.bq);
this.e.c.a(var5);
var5.b((OPacket) (new OPacket4UpdateTime(var3.n())));

// CanaryMod - enable/disable potion effects on login
if (hookResult.applyPotionsEffects()) {
Iterator var6 = var2.ay().iterator();
Iterator var6 = var2.as().iterator();

while (var6.hasNext()) {
OPotionEffect var7 = (OPotionEffect) var6.next();

var5.b((OPacket) (new OPacket41EntityEffect(var2.S, var7)));
var5.b((OPacket) (new OPacket41EntityEffect(var2.ba, var7)));
}
}

var2.k();
var2.u();
}

this.c = true;
@@ -88,9 +88,9 @@ public void a(OPacket10Flying var1) {

Location to = new Location();

to.x = etc.floor(e.ab);
to.y = etc.floor(e.ac);
to.z = etc.floor(e.ad);
to.x = etc.floor(e.bj);
to.y = etc.floor(e.bk);
to.z = etc.floor(e.bl);
to.rotX = player.getRotation();
to.rotY = player.getPitch();

@@ -377,21 +377,15 @@ public void a(OPacket14BlockDig var1) {
this.e.a.b((OPacket) (new OPacket53BlockChange(var5, var6, var7, var2)));
}
} else if (var1.e == 3) {
<<<<<<<
// CanaryMod: Send block update
Block block = new Block(var2.world, type, x, y, z);

block.setStatus(3); // Send update for block
OEntity.manager.callHook(PluginLoader.Hook.BLOCK_DESTROYED, player, block);

double var19 = this.e.ab - ((double) var5 + 0.5D);
double var21 = this.e.ac - ((double) var6 + 0.5D);
double var23 = this.e.ad - ((double) var7 + 0.5D);
=======
double var19 = this.e.bj - ((double) var5 + 0.5D);
double var21 = this.e.bk - ((double) var6 + 0.5D);
double var23 = this.e.bl - ((double) var7 + 0.5D);
>>>>>>>
double var25 = var19 * var19 + var21 * var21 + var23 * var23;

if (var25 < 256.0D) {
@@ -408,22 +402,15 @@ public void a(OPacket14BlockDig var1) {

public void a(OPacket15Place var1) {
OWorldServer var2 = this.d.a(this.e.w);
<<<<<<<
OItemStack var3 = this.e.k.a();
=======
OItemStack var3 = this.e.k.d();
boolean var4 = var2.K = var2.y.g != 0 || this.d.h.h(this.e.v);

if (var1.d == 255) {
>>>>>>>

// CanaryMod: Store block data to call hooks
// CanaryMod START
Block blockClicked = null;
Block blockPlaced = null;

// We allow admins and ops to build!
boolean var4 = var2.D = var2.y.g != 0 || this.d.h.h(this.e.v) || getPlayer().isAdmin();
boolean var4 = var2.K = var2.y.g != 0 || this.d.h.h(this.e.v) || getPlayer().isAdmin();

if (var1.d == 255) {
// ITEM_USE -- if we have a lastRightClicked then it could be a
@@ -476,13 +463,8 @@ public void a(OPacket15Place var1) {
blockPlaced.setType(var2.world.getBlockIdAt(blockPlaced.getX(), blockPlaced.getY(), blockPlaced.getZ()));
}

<<<<<<<
if (var3 == null) {
return;
=======
if (this.p && this.e.e((double) var5 + 0.5D, (double) var6 + 0.5D, (double) var7 + 0.5D) < 64.0D && (var11 > 16 || var4)) {
this.e.c.a(this.e, var2, var3, var5, var6, var7, var8);
>>>>>>>
}

((Digging) this.e.c).a(this.e, var2, var3, blockPlaced, blockClicked);
@@ -510,7 +492,7 @@ public void a(OPacket15Place var1) {
OEntity.manager.callHook(PluginLoader.Hook.BLOCK_CREATED, player, blockPlaced, blockClicked, item.getItemId());
// CanaryMod: If we were building inside spawn, bail! (unless ops/admin)

if (this.p && this.e.g((double) var5 + 0.5D, (double) var6 + 0.5D, (double) var7 + 0.5D) < 64.0D && (var11 > 16 || var4)) {
if (this.p && this.e.e((double) var5 + 0.5D, (double) var6 + 0.5D, (double) var7 + 0.5D) < 64.0D && (var11 > 16 || var4)) {
this.e.c.a(this.e, var2, var3, var5, var6, var7, var8);
} else {
// CanaryMod: No point sending the client to update the blocks, you weren't allowed to place!
@@ -606,13 +588,9 @@ private void c(String var1) {// Handled by PlayerCommands class

public void a(OPacket18Animation var1) {
if (var1.b == 1) {
<<<<<<<
// CanaryMod: Swing the arm!
OEntity.manager.callHook(PluginLoader.Hook.ARM_SWING, getPlayer());
this.e.o_();
=======
this.e.r_();
>>>>>>>
}

}
@@ -834,8 +812,8 @@ public boolean c() {
* @return item
*/
public int getItemInHand() {
if (e.k.a() != null) {
return e.k.a().c;
if (e.k.d() != null) {
return e.k.d().c;
}
return -1;
}
@@ -71,31 +71,20 @@ public void a(OEntityLiving var1, int var2) {
var1.d(1);
}
} else if (this.H == u.H) {
<<<<<<<
if (var1.ar() > 1) {
if (var1.ai() > 1) {
// Canarymod: DAMAGE From Poison
if (!(Boolean) etc.getLoader().callHook(PluginLoader.Hook.DAMAGE, PluginLoader.DamageType.POTION, null, var1.entity, 1)) {
var1.a(ODamageSource.l, 1);
}
=======
if (var1.ai() > 1) {
var1.a(ODamageSource.l, 1);
>>>>>>>
}
} else if (this.H == s.H && var1 instanceof OEntityPlayer) {
((OEntityPlayer) var1).c(0.025F * (float) (var2 + 1));
<<<<<<<
} else if ((this.H != h.H || var1.az()) && (this.H != i.H || !var1.az())) {
if (this.H == i.H && !var1.az() || this.H == h.H && var1.az()) {
} else if ((this.H != h.H || var1.at()) && (this.H != i.H || !var1.at())) {
if (this.H == i.H && !var1.at() || this.H == h.H && var1.at()) {
// Canarymod: call to DAMAGE on 1.9?
if (!(Boolean) etc.getLoader().callHook(PluginLoader.Hook.DAMAGE, PluginLoader.DamageType.POTION, null, var1.entity, 4 << var2)) {
var1.a(ODamageSource.l, 6 << var2);
}
=======
} else if ((this.H != h.H || var1.at()) && (this.H != i.H || !var1.at())) {
if (this.H == i.H && !var1.at() || this.H == h.H && var1.at()) {
var1.a(ODamageSource.l, 6 << var2);
>>>>>>>
}
} else {
var1.d(6 << var2);
@@ -33,11 +33,7 @@ public ORegionFile(File var1) {
this.h = var1.lastModified();
}

<<<<<<<
this.c = new RandomAccessFile(var1, "rw");
=======
this.c = new RandomAccessFile(var1, "OBiomeGenDesert");
>>>>>>>
int var2;

if (this.c.length() < 4096L) {
@@ -47,18 +47,10 @@ public OServerConfigurationManager(MinecraftServer var1) {
}

this.c = var1;
<<<<<<<
this.j = var1.f("banned-players.txt");
this.k = var1.f("banned-ips.txt");
this.l = var1.f("ops.txt");
// CanaryMod - Disable Notchian whitelist
// this.m = var1.f("white-list.txt");
=======
this.j = var1.a("banned-players.txt");
this.k = var1.a("banned-ips.txt");
this.l = var1.a("ops.txt");
this.m = var1.a("white-list.txt");
>>>>>>>
//this.m = var1.a("white-list.txt"); //CanaryMod: disable Notchian whitelist
int var2 = var1.d.a("view-distance", 10);

this.d[0] = new OPlayerManager(var1, 0, var2);
@@ -27,17 +27,10 @@ private static void a(Class var0, String var1) {
}
}

<<<<<<<
public void b(ONBTTagCompound var1) {
public void a(ONBTTagCompound var1) {
this.l = var1.f("x");
this.m = var1.f("y");
this.n = var1.f("z");
=======
public void a(ONBTTagCompound var1) {
this.l = var1.f("OSlotEnchantmentTable");
this.m = var1.f("OIEnchantmentModifier");
this.n = var1.f("ORecipesArmor");
>>>>>>>
}

public void b(ONBTTagCompound var1) {
@@ -46,17 +39,10 @@ public void b(ONBTTagCompound var1) {
if (var2 == null) {
throw new RuntimeException(this.getClass() + " is missing a mapping! This is a bug!");
} else {
<<<<<<<
var1.a("id", var2);
var1.a("x", this.l);
var1.a("y", this.m);
var1.a("z", this.n);
=======
var1.a("ORegionFileChunkBuffer", var2);
var1.a("OSlotEnchantmentTable", this.l);
var1.a("OIEnchantmentModifier", this.m);
var1.a("ORecipesArmor", this.n);
>>>>>>>
}
}

@@ -66,11 +52,7 @@ public static OTileEntity c(ONBTTagCompound var0) {
OTileEntity var1 = null;

try {
<<<<<<<
Class var2 = (Class) a.get(var0.j("id"));
=======
Class var2 = (Class) a.get(var0.j("ORegionFileChunkBuffer"));
>>>>>>>

if (var2 != null) {
var1 = (OTileEntity) var2.newInstance();
@@ -82,11 +64,7 @@ public static OTileEntity c(ONBTTagCompound var0) {
if (var1 != null) {
var1.a(var0);
} else {
<<<<<<<
System.out.println("Skipping TileEntity with id " + var0.j("id"));
=======
System.out.println("Skipping TileEntity with id " + var0.j("ORegionFileChunkBuffer"));
>>>>>>>
}

return var1;
@@ -238,34 +238,37 @@ public void i() {
super.i();
}

@Override
public OItemStack[] getContents() {
return Arrays.copyOf(i, getContentsSize());
}

@Override
public void setContents(OItemStack[] values) {
int size = getContentsSize();

for (int i = 0; i < size; i++) {
setContentsAt(i, values[i]);
}
i = Arrays.copyOf(values, getContentsSize());
}

@Override
public OItemStack getContentsAt(int index) {
return c(index);
return c_(index);
}

@Override
public void setContentsAt(int index, OItemStack value) {
a(index, value);
}

@Override
public int getContentsSize() {
return d();
return c();
}

@Override
public String getName() {
return name;
}

@Override
public void setName(String value) {
name = value;
}
@@ -119,30 +119,37 @@ public void f() {}

public void g() {}

@Override
public OItemStack[] getContents() {
return Arrays.copyOf(a, getContentsSize());
}

@Override
public void setContents(OItemStack[] values) {
a = Arrays.copyOf(values, getContentsSize());
}

@Override
public OItemStack getContentsAt(int index) {
return c_(index);
}

@Override
public void setContentsAt(int index, OItemStack value) {
a(index, value);
}

@Override
public int getContentsSize() {
return c();
}

@Override
public String getName() {
return name;
}

@Override
public void setName(String value) {
name = value;
}
@@ -190,37 +190,39 @@ public boolean a(OEntityPlayer var1) {

public void f() {}

<<<<<<<
public void z_() {}
=======
public void g() {}
}
>>>>>>>

@Override
public OItemStack[] getContents() {
return Arrays.copyOf(d, getContentsSize());
}

@Override
public void setContents(OItemStack[] values) {
d = Arrays.copyOf(values, getContentsSize());
}

@Override
public OItemStack getContentsAt(int index) {
return c(index);
return c_(index);
}

@Override
public void setContentsAt(int index, OItemStack value) {
a(index, value);
}

@Override
public int getContentsSize() {
return d();
return c();
}

@Override
public String getName() {
return name;
}

@Override
public void setName(String value) {
name = value;
}
@@ -83,9 +83,8 @@ private void e() {
this.a = 200 + this.k.w.nextInt(600);
}

<<<<<<<
public void b(ONBTTagCompound var1) {
super.b(var1);
public void a(ONBTTagCompound var1) {
super.a(var1);
// CanaryMod - There is no more Monster class
String entityId = var1.j("EntityId");

@@ -94,11 +93,6 @@ public void b(ONBTTagCompound var1) {
} else {
this.d = entityId;
}
=======
public void a(ONBTTagCompound var1) {
super.a(var1);
this.d = var1.j("EntityId");
>>>>>>>
this.a = var1.e("Delay");
}

@@ -755,8 +755,8 @@ public void teleportTo(double x, double y, double z, float rotation, float pitch
OEntityPlayerMP player = getEntity();

// If player is in vehicle - eject them before they are teleported.
if (player.W != null) {
player.a(player.W);
if (player.be != null) {
player.a(player.be);
}
player.a.a(x, y, z, rotation, pitch);
}
@@ -810,7 +810,7 @@ public int getItemInHand() {
* @return Item
*/
public Item getItemStackInHand() {
OItemStack result = getEntity().k.a();
OItemStack result = getEntity().k.d();

if (result != null) {
return new Item(result, getEntity().k.c);
@@ -833,7 +833,7 @@ public Inventory getInventory() {
* @return true if sneaking
*/
public boolean getSneaking() {
return getEntity().aj();
return getEntity().aD();
}

/**
@@ -843,7 +843,7 @@ public boolean getSneaking() {
* true if sneaking
*/
public void setSneaking(boolean sneaking) {
getEntity().c(sneaking);
getEntity().e(sneaking);
OPacket19EntityAction sneakUpdate = new OPacket19EntityAction();

sneakUpdate.a = getId();
@@ -862,7 +862,9 @@ public List<String> getOnlyOneUseKits() {

/**
* Switch to the other dimension at the according position.
* @deprecated use {@link #switchWorlds(int) } instead.
*/
@Deprecated
public void switchWorlds() {
MinecraftServer mcServer = etc.getMCServer();
OEntityPlayerMP ent = getEntity();
@@ -872,8 +874,8 @@ public void switchWorlds() {
return;
}
// Dismount first or get buggy
if (ent.W != null) {
ent.c(ent.W);
if (ent.be != null) {
ent.c(ent.be);
}

if (getWorld().getType().getId() == 0) {
@@ -900,78 +902,58 @@ public void switchWorlds(int world) {
return;
}
// Dismount first or get buggy
if (ent.W != null) {
ent.c(ent.W);
if (ent.be != null) {
ent.c(ent.be);
}

ent.a((OStatBase) OAchievementList.B);
OChunkCoordinates var2 = ent.b.a(world).d();
OChunkCoordinates var2 = mcServer.a(world).d();

if (var2 != null) {
ent.a.a((double) var2.a, (double) var2.b, (double) var2.c, 0.0F, 0.0F);
}

ent.b.h.a(ent, world);
mcServer.h.a(ent, world);

refreshCreativeMode();
}

@Override
public void teleportTo(BaseEntity ent) {
if (!getWorld().equals(ent.getWorld())) {
switchWorlds();
switchWorlds(ent.getWorld().getType().getId());
}
super.teleportTo(ent);
}

@Override
public void teleportTo(Location location) {
if (!getWorld().equals(location.getWorld())) {
switchWorlds();
switchWorlds(location.dimension);
}
super.teleportTo(location);
}

/**
* Returns a String representation of this Player
*
* @return String representation of this Player
*/
@Override
public String toString() {
return String.format("Player[id=%d, name=%s]", id, getName());
}

/**
* Tests the given object to see if it equals this object
*
* @param obj
* the object to test
* @return true if the two objects match
*/
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
if (!(obj instanceof Player)) {
return false;
}
final Player other = (Player) obj;

return getName().equals(other.getName());
}

/**
* Returns a unique hashcode for this Player
*
* @return hashcode
*/
@Override
public int hashCode() {
int hash = 7;

hash = 71 * hash + id;
hash = 89 * hash + this.id;
hash = 89 * hash + (this.getName() != null ? this.getName().hashCode() : 0);
return hash;
}

@@ -1007,7 +989,9 @@ public int getCreativeMode() {
/**
* Check to see if this Player is in creative mode
*
* @return
* @param player the Player to check.
* @return <tt>true</tt> if the given Player is in creative mode,
* <tt>null</tt> otherwise.
*/
public static boolean getMode(Player player) {
if (modes.contains(player)) {
@@ -1049,6 +1033,7 @@ public int getLevel() {
/**
* Add experience points to total for this Player.
*
* @param i the amount of experience points to add.
*/
public void addXP(int i) {
getEntity().addXP(i);
@@ -1058,6 +1043,7 @@ public void addXP(int i) {
/**
* Remove experience points from total for this Player.
*
* @param i the amount of experience points to remove.
*/
public void removeXP(int i) {
if (getXP() > 0) {
@@ -1071,9 +1057,10 @@ public void removeXP(int i) {
/**
* Set total experience points for this Player.
*
* @param i the new amount of experience points.
*/
public void setXP(int i) {
if (getXP() >= 0) {
if (i >= 0) {
getEntity().setXP(i);
updateXP();
} else {
@@ -1096,7 +1083,7 @@ public void updateXP() {
public void updateLevels() {
OEntityPlayerMP entityMP = getEntity();

entityMP.a.b((OPacket) (new OPacket8UpdateHealth(entityMP.bq, entityMP.n.a(), entityMP.n.c())));
entityMP.a.b((OPacket) (new OPacket8UpdateHealth(getHealth(), getFoodLevel(), getFoodSaturationLevel())));
}

/**
@@ -1156,7 +1143,7 @@ public void updateInventory() {
* Get Players food saturationLevel
* @return
*/
public Object getFoodSaturationLevel() {
public float getFoodSaturationLevel() {
return getEntity().n.b;
}

@@ -1182,11 +1169,12 @@ public void addPotionEffect(PotionEffect effect) {
/**
* Removes a potion Effect from player
*
* @param effect The potion effect to remove
*/
public void removePotionEffect(PotionEffect effect) {
OPotionEffect var3 = (OPotionEffect) getEntity().bL.get(effect.getType().getId());
OPotionEffect var3 = (OPotionEffect) getEntity().aJ.get(effect.getType().getId());

getEntity().bL.remove(Integer.valueOf(effect.getType().getId()));
getEntity().aJ.remove(Integer.valueOf(effect.getType().getId()));
getEntity().c(var3);
}

@@ -1196,7 +1184,7 @@ public void removePotionEffect(PotionEffect effect) {
* @return List of potion effects
*/
public List<PotionEffect> getPotionEffects() {
Collection ay = getEntity().ay();
Collection ay = getEntity().as();
ArrayList<PotionEffect> list = new ArrayList<PotionEffect>();

for (Iterator<OPotionEffect> iterator = ay.iterator(); iterator.hasNext();) {
@@ -434,7 +434,7 @@ public Block getBlockAt(int x, int y, int z) {
*/
@Deprecated
public int getBlockData(int x, int y, int z) {
return server.a(0).e(x, y, z);
return server.a(0).c(x, y, z);
}

/**
@@ -583,7 +583,7 @@ public ComplexBlock getOnlyComplexBlock(Block block) {
*/
@Deprecated
public ComplexBlock getOnlyComplexBlock(int x, int y, int z) {
OTileEntity localav = server.a(0).l(x, y, z);
OTileEntity localav = server.a(0).b(x, y, z);

if (localav != null) {
if (localav instanceof OTileEntityChest) {
@@ -762,7 +762,7 @@ public boolean isChunkLoaded(Block block) {
*/
@Deprecated
public boolean isChunkLoaded(int x, int y, int z) {
return server.a(0).J.c(x >> 4, z >> 4);
return server.a(0).J.a(x >> 4, z >> 4);
}

/**
@@ -1014,7 +1014,7 @@ public World getWorld(int dimension) {
public void addRecipe(Item item, Object... recipe) {
for (int i = 0; i < recipe.length; i++) {
if (recipe[i] instanceof Block.Type) {
recipe[i] = OBlock.k[((Block.Type) recipe[i]).getType()];
recipe[i] = OBlock.m[((Block.Type) recipe[i]).getType()];
} else if (recipe[i] instanceof Item.Type) {
recipe[i] = OItem.d[((Item.Type) recipe[i]).getId()];
}
@@ -1032,7 +1032,7 @@ public void addRecipe(Item item, Object... recipe) {
public void addShapelessRecipe(Item item, Object... recipe) {
for (int i = 0; i < recipe.length; i++) {
if (recipe[i] instanceof Block.Type) {
recipe[i] = OBlock.k[((Block.Type) recipe[i]).getType()];
recipe[i] = OBlock.m[((Block.Type) recipe[i]).getType()];
} else if (recipe[i] instanceof Item.Type) {
recipe[i] = OItem.d[((Item.Type) recipe[i]).getId()];
}
@@ -445,7 +445,7 @@ public ComplexBlock getOnlyComplexBlock(Block block) {
* @return complex block
*/
public ComplexBlock getOnlyComplexBlock(int x, int y, int z) {
OTileEntity localav = world.l(x, y, z);
OTileEntity localav = world.b(x, y, z);

if (localav != null) {
if (localav instanceof OTileEntityChest) {
@@ -621,7 +621,7 @@ public boolean isChunkLoaded(int x, int y, int z) {
* @return true if the chunk is loaded
*/
public boolean isChunkLoaded(int x, int z) {
return world.J.c(x, z);
return world.J.a(x, z);
}

/**
@@ -663,7 +663,7 @@ public Chunk loadChunk(int x, int y, int z) {
* @return chunk
*/
public Chunk loadChunk(int x, int z) {
return world.J.a(x, z).chunk;
return world.J.c(x, z).chunk;
}

/**