geforkt von Mirrors/Paper
Update CraftBukkit to Minecraft 1.5.2
By: Travis Watkins <amaranth@ubuntu.com>
Dieser Commit ist enthalten in:
Ursprung
f06e7acda5
Commit
9fdae1c35b
@ -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.5.1-R0.3-SNAPSHOT</version>
|
<version>1.5.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.5.1</minecraft.version>
|
<minecraft.version>1.5.2</minecraft.version>
|
||||||
<minecraft_version>1_5_R2</minecraft_version>
|
<minecraft_version>1_5_R3</minecraft_version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<scm>
|
<scm>
|
||||||
|
@ -166,15 +166,15 @@ public class CraftChunk implements Chunk {
|
|||||||
sectionEmpty[i] = true;
|
sectionEmpty[i] = true;
|
||||||
} else { /* Not empty */
|
} else { /* Not empty */
|
||||||
short[] blockids = new short[4096];
|
short[] blockids = new short[4096];
|
||||||
byte[] baseids = cs[i].g();
|
byte[] baseids = cs[i].getIdArray();
|
||||||
|
|
||||||
/* Copy base IDs */
|
/* Copy base IDs */
|
||||||
for (int j = 0; j < 4096; j++) {
|
for (int j = 0; j < 4096; j++) {
|
||||||
blockids[j] = (short) (baseids[j] & 0xFF);
|
blockids[j] = (short) (baseids[j] & 0xFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cs[i].i() != null) { /* If we've got extended IDs */
|
if (cs[i].getExtendedIdArray() != null) { /* If we've got extended IDs */
|
||||||
byte[] extids = cs[i].i().a;
|
byte[] extids = cs[i].getExtendedIdArray().a;
|
||||||
|
|
||||||
for (int j = 0; j < 2048; j++) {
|
for (int j = 0; j < 2048; j++) {
|
||||||
short b = (short) (extids[j] & 0xFF);
|
short b = (short) (extids[j] & 0xFF);
|
||||||
@ -192,15 +192,15 @@ public class CraftChunk implements Chunk {
|
|||||||
|
|
||||||
/* Get block data nibbles */
|
/* Get block data nibbles */
|
||||||
sectionBlockData[i] = new byte[2048];
|
sectionBlockData[i] = new byte[2048];
|
||||||
System.arraycopy(cs[i].j().a, 0, sectionBlockData[i], 0, 2048); // Should be getData
|
System.arraycopy(cs[i].getDataArray().a, 0, sectionBlockData[i], 0, 2048);
|
||||||
if (cs[i].l() == null) {
|
if (cs[i].getSkyLightArray() == null) {
|
||||||
sectionSkyLights[i] = emptyData;
|
sectionSkyLights[i] = emptyData;
|
||||||
} else {
|
} else {
|
||||||
sectionSkyLights[i] = new byte[2048];
|
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];
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,13 +41,13 @@ public class CraftTravelAgent extends PortalTravelAgent implements TravelAgent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Location findPortal(Location location) {
|
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());
|
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;
|
return found != null ? new Location(location.getWorld(), found.x, found.y, found.z, location.getYaw(), location.getPitch()) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean createPortal(Location location) {
|
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());
|
return pta.createPortal(location.getX(), location.getY(), location.getZ(), this.getCreationRadius());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -322,7 +322,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isBlocking() {
|
public boolean isBlocking() {
|
||||||
return getHandle().bk(); // Should be isBlocking
|
return getHandle().isBlocking();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean setWindowProperty(InventoryView.Property prop, int value) {
|
public boolean setWindowProperty(InventoryView.Property prop, int value) {
|
||||||
|
@ -50,7 +50,7 @@ public class CraftItemFrame extends CraftHanging implements ItemFrame {
|
|||||||
|
|
||||||
public void setRotation(Rotation rotation) {
|
public void setRotation(Rotation rotation) {
|
||||||
Validate.notNull(rotation, "Rotation cannot be null");
|
Validate.notNull(rotation, "Rotation cannot be null");
|
||||||
getHandle().b(toInteger(rotation)); // Should be setRotation
|
getHandle().setRotation(toInteger(rotation));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int toInteger(Rotation rotation) {
|
static int toInteger(Rotation rotation) {
|
||||||
|
@ -332,7 +332,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasLineOfSight(Entity other) {
|
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() {
|
public boolean getRemoveWhenFarAway() {
|
||||||
|
@ -138,7 +138,7 @@ public class CustomChunkGenerator extends InternalChunkGenerator {
|
|||||||
if (blk != 0) { // If non-empty
|
if (blk != 0) { // If non-empty
|
||||||
if (cs == null) { // If no section yet, get one
|
if (cs == null) { // If no section yet, get one
|
||||||
cs = csect[sec] = new ChunkSection(sec << 4, true);
|
cs = csect[sec] = new ChunkSection(sec << 4, true);
|
||||||
csbytes = cs.g();
|
csbytes = cs.getIdArray();
|
||||||
}
|
}
|
||||||
csbytes[(cy << 8) | (cz << 4) | cx] = blk;
|
csbytes[(cy << 8) | (cz << 4) | cx] = blk;
|
||||||
}
|
}
|
||||||
@ -147,7 +147,7 @@ public class CustomChunkGenerator extends InternalChunkGenerator {
|
|||||||
}
|
}
|
||||||
// If section built, finish prepping its state
|
// If section built, finish prepping its state
|
||||||
if (cs != null) {
|
if (cs != null) {
|
||||||
cs.d();
|
cs.recalcBlockCounts();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -225,4 +225,6 @@ public class CustomChunkGenerator extends InternalChunkGenerator {
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return "CustomChunkGenerator";
|
return "CustomChunkGenerator";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void b() {}
|
||||||
}
|
}
|
||||||
|
@ -81,4 +81,6 @@ public class NormalChunkGenerator extends InternalChunkGenerator {
|
|||||||
public String getName() {
|
public String getName() {
|
||||||
return "NormalWorldGenerator";
|
return "NormalWorldGenerator";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void b() {}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren