Update CraftBukkit to Minecraft 1.5.2

By: Travis Watkins <amaranth@ubuntu.com>
This commit is contained in:
CraftBukkit/Spigot 2013-04-27 04:40:05 -05:00
parent f06e7acda5
commit 9fdae1c35b
8 changed files with 21 additions and 17 deletions

View file

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

View file

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

View file

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

View file

@ -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) {

View file

@ -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) {

View file

@ -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() {

View file

@ -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() {}
}

View file

@ -81,4 +81,6 @@ public class NormalChunkGenerator extends InternalChunkGenerator {
public String getName() {
return "NormalWorldGenerator";
}
public void b() {}
}