From 9fdae1c35bb163f5ac823217ad8cec2dd6f265cb Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sat, 27 Apr 2013 04:40:05 -0500 Subject: [PATCH] Update CraftBukkit to Minecraft 1.5.2 By: Travis Watkins --- paper-server/pom.xml | 6 +++--- .../java/org/bukkit/craftbukkit/CraftChunk.java | 14 +++++++------- .../org/bukkit/craftbukkit/CraftTravelAgent.java | 4 ++-- .../craftbukkit/entity/CraftHumanEntity.java | 2 +- .../bukkit/craftbukkit/entity/CraftItemFrame.java | 2 +- .../craftbukkit/entity/CraftLivingEntity.java | 2 +- .../generator/CustomChunkGenerator.java | 6 ++++-- .../generator/NormalChunkGenerator.java | 2 ++ 8 files changed, 21 insertions(+), 17 deletions(-) diff --git a/paper-server/pom.xml b/paper-server/pom.xml index 9ff95c68e5..01a7a8954b 100644 --- a/paper-server/pom.xml +++ b/paper-server/pom.xml @@ -4,7 +4,7 @@ org.bukkit craftbukkit jar - 1.5.1-R0.3-SNAPSHOT + 1.5.2-R0.1-SNAPSHOT CraftBukkit http://www.bukkit.org @@ -12,8 +12,8 @@ UTF-8 unknown 4.11 - 1.5.1 - 1_5_R2 + 1.5.2 + 1_5_R3 diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftChunk.java index 79c3893848..1a2151604a 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftChunk.java @@ -166,15 +166,15 @@ public class CraftChunk implements Chunk { sectionEmpty[i] = true; } else { /* Not empty */ short[] blockids = new short[4096]; - byte[] baseids = cs[i].g(); + byte[] baseids = cs[i].getIdArray(); /* Copy base IDs */ for (int j = 0; j < 4096; j++) { blockids[j] = (short) (baseids[j] & 0xFF); } - if (cs[i].i() != null) { /* If we've got extended IDs */ - byte[] extids = cs[i].i().a; + if (cs[i].getExtendedIdArray() != null) { /* If we've got extended IDs */ + byte[] extids = cs[i].getExtendedIdArray().a; for (int j = 0; j < 2048; j++) { short b = (short) (extids[j] & 0xFF); @@ -192,15 +192,15 @@ public class CraftChunk implements Chunk { /* Get block data nibbles */ sectionBlockData[i] = new byte[2048]; - System.arraycopy(cs[i].j().a, 0, sectionBlockData[i], 0, 2048); // Should be getData - if (cs[i].l() == null) { + System.arraycopy(cs[i].getDataArray().a, 0, sectionBlockData[i], 0, 2048); + if (cs[i].getSkyLightArray() == null) { sectionSkyLights[i] = emptyData; } else { sectionSkyLights[i] = new byte[2048]; - System.arraycopy(cs[i].l().a, 0, sectionSkyLights[i], 0, 2048); // Should be getSkyLight + System.arraycopy(cs[i].getSkyLightArray().a, 0, sectionSkyLights[i], 0, 2048); } sectionEmitLights[i] = new byte[2048]; - System.arraycopy(cs[i].k().a, 0, sectionEmitLights[i], 0, 2048); // Should be getBlockLight + System.arraycopy(cs[i].getEmittedLightArray().a, 0, sectionEmitLights[i], 0, 2048); } } diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftTravelAgent.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftTravelAgent.java index fad2d8aac8..123315981e 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftTravelAgent.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftTravelAgent.java @@ -41,13 +41,13 @@ public class CraftTravelAgent extends PortalTravelAgent implements TravelAgent { } public Location findPortal(Location location) { - PortalTravelAgent pta = ((CraftWorld) location.getWorld()).getHandle().s(); + PortalTravelAgent pta = ((CraftWorld) location.getWorld()).getHandle().t(); // Should be getTravelAgent ChunkCoordinates found = pta.findPortal(location.getX(), location.getY(), location.getZ(), this.getSearchRadius()); return found != null ? new Location(location.getWorld(), found.x, found.y, found.z, location.getYaw(), location.getPitch()) : null; } public boolean createPortal(Location location) { - PortalTravelAgent pta = ((CraftWorld) location.getWorld()).getHandle().s(); + PortalTravelAgent pta = ((CraftWorld) location.getWorld()).getHandle().t(); return pta.createPortal(location.getX(), location.getY(), location.getZ(), this.getCreationRadius()); } diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java index eac032a803..aca2e62e77 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -322,7 +322,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { } public boolean isBlocking() { - return getHandle().bk(); // Should be isBlocking + return getHandle().isBlocking(); } public boolean setWindowProperty(InventoryView.Property prop, int value) { diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java index f69480cf1f..037ba207fe 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java @@ -50,7 +50,7 @@ public class CraftItemFrame extends CraftHanging implements ItemFrame { public void setRotation(Rotation rotation) { Validate.notNull(rotation, "Rotation cannot be null"); - getHandle().b(toInteger(rotation)); // Should be setRotation + getHandle().setRotation(toInteger(rotation)); } static int toInteger(Rotation rotation) { diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java index 58c7db0902..666d8e0918 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -332,7 +332,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { } public boolean hasLineOfSight(Entity other) { - return getHandle().aD().canSee(((CraftEntity) other).getHandle()); // az should be getEntitySenses + return getHandle().getEntitySenses().canSee(((CraftEntity) other).getHandle()); } public boolean getRemoveWhenFarAway() { diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java index 11e79f54e0..096af8e834 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java @@ -138,7 +138,7 @@ public class CustomChunkGenerator extends InternalChunkGenerator { if (blk != 0) { // If non-empty if (cs == null) { // If no section yet, get one cs = csect[sec] = new ChunkSection(sec << 4, true); - csbytes = cs.g(); + csbytes = cs.getIdArray(); } csbytes[(cy << 8) | (cz << 4) | cx] = blk; } @@ -147,7 +147,7 @@ public class CustomChunkGenerator extends InternalChunkGenerator { } // If section built, finish prepping its state if (cs != null) { - cs.d(); + cs.recalcBlockCounts(); } } } @@ -225,4 +225,6 @@ public class CustomChunkGenerator extends InternalChunkGenerator { public String getName() { return "CustomChunkGenerator"; } + + public void b() {} } diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java index c24c5247dc..8af999183f 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java @@ -81,4 +81,6 @@ public class NormalChunkGenerator extends InternalChunkGenerator { public String getName() { return "NormalWorldGenerator"; } + + public void b() {} }