Archiviert
13
0

Update for 1.7.3

Dieser Commit ist enthalten in:
Dinnerbone 2011-07-08 13:25:53 +01:00
Ursprung cc635ed51c
Commit 2f218ba6b1
18 geänderte Dateien mit 99 neuen und 59 gelöschten Zeilen

Datei anzeigen

@ -204,4 +204,8 @@ public class BlockDoor extends Block {
public static boolean e(int i) {
return (i & 4) != 0;
}
public int e() {
return 1;
}
}

Datei anzeigen

@ -12,7 +12,8 @@ public class BlockIce extends BlockBreakable {
this.a(true);
}
public void remove(World world, int i, int j, int k) {
public void a(World world, EntityHuman entityhuman, int i, int j, int k, int l) {
super.a(world, entityhuman, i, j, k, l);
Material material = world.getMaterial(i, j - 1, k);
if (material.isSolid() || material.isLiquid()) {
@ -42,4 +43,8 @@ public class BlockIce extends BlockBreakable {
world.setTypeId(i, j, k, Block.STATIONARY_WATER.id);
}
}
public int e() {
return 0;
}
}

Datei anzeigen

@ -205,14 +205,14 @@ public class ConsoleCommandHandler {
if ("add".equalsIgnoreCase(s3)) {
for (k = 0; k < this.server.worlds.size(); ++k) { // CraftBukkit
worldserver1 = this.server.worlds.get(k); // CraftBukkit
worldserver1.setTime(worldserver1.getTime() + (long) j);
worldserver1.setTimeAndFixTicklists(worldserver1.getTime() + (long) j);
}
this.print(s1, "Added " + j + " to time");
} else if ("set".equalsIgnoreCase(s3)) {
for (k = 0; k < this.server.worlds.size(); ++k) { // CraftBukkit
worldserver1 = this.server.worlds.get(k); // CraftBukkit
worldserver1.setTime((long) j);
worldserver1.setTimeAndFixTicklists((long) j);
}
this.print(s1, "Set time to " + j);

Datei anzeigen

@ -65,7 +65,7 @@ public class ContainerWorkbench extends Container {
}
public boolean b(EntityHuman entityhuman) {
return this.c.getTypeId(this.h, this.i, this.j) != Block.WORKBENCH.id ? false : entityhuman.d((double) this.h + 0.5D, (double) this.i + 0.5D, (double) this.j + 0.5D) <= 64.0D;
return this.c.getTypeId(this.h, this.i, this.j) != Block.WORKBENCH.id ? false : entityhuman.e((double) this.h + 0.5D, (double) this.i + 0.5D, (double) this.j + 0.5D) <= 64.0D;
}
public ItemStack a(int i) {

Datei anzeigen

@ -334,7 +334,7 @@ public abstract class Entity {
this.die();
}
public boolean b(double d0, double d1, double d2) {
public boolean d(double d0, double d1, double d2) {
AxisAlignedBB axisalignedbb = this.boundingBox.c(d0, d1, d2);
List list = this.world.getEntities(this, axisalignedbb);
@ -798,7 +798,7 @@ public abstract class Entity {
return MathHelper.c(f * f + f1 * f1 + f2 * f2);
}
public double d(double d0, double d1, double d2) {
public double e(double d0, double d1, double d2) {
double d3 = this.locX - d0;
double d4 = this.locY - d1;
double d5 = this.locZ - d2;
@ -806,7 +806,7 @@ public abstract class Entity {
return d3 * d3 + d4 * d4 + d5 * d5;
}
public double e(double d0, double d1, double d2) {
public double f(double d0, double d1, double d2) {
double d3 = this.locX - d0;
double d4 = this.locY - d1;
double d5 = this.locZ - d2;
@ -846,13 +846,13 @@ public abstract class Entity {
d1 *= 0.05000000074505806D;
d0 *= (double) (1.0F - this.bu);
d1 *= (double) (1.0F - this.bu);
this.f(-d0, 0.0D, -d1);
entity.f(d0, 0.0D, d1);
this.b(-d0, 0.0D, -d1);
entity.b(d0, 0.0D, d1);
}
}
}
public void f(double d0, double d1, double d2) {
public void b(double d0, double d1, double d2) {
this.motX += d0;
this.motY += d1;
this.motZ += d2;

Datei anzeigen

@ -511,7 +511,7 @@ public abstract class EntityLiving extends Entity {
this.motY *= 0.800000011920929D;
this.motZ *= 0.800000011920929D;
this.motY -= 0.02D;
if (this.positionChanged && this.b(this.motX, this.motY + 0.6000000238418579D - this.locY + d0, this.motZ)) {
if (this.positionChanged && this.d(this.motX, this.motY + 0.6000000238418579D - this.locY + d0, this.motZ)) {
this.motY = 0.30000001192092896D;
}
} else if (this.ae()) {
@ -522,7 +522,7 @@ public abstract class EntityLiving extends Entity {
this.motY *= 0.5D;
this.motZ *= 0.5D;
this.motY -= 0.02D;
if (this.positionChanged && this.b(this.motX, this.motY + 0.6000000238418579D - this.locY + d0, this.motZ)) {
if (this.positionChanged && this.d(this.motX, this.motY + 0.6000000238418579D - this.locY + d0, this.motZ)) {
this.motY = 0.30000001192092896D;
}
} else {

Datei anzeigen

@ -769,13 +769,13 @@ public class EntityMinecart extends Entity implements IInventory {
if (((EntityMinecart) entity).type == 2 && this.type != 2) {
this.motX *= 0.20000000298023224D;
this.motZ *= 0.20000000298023224D;
this.f(entity.motX - d0, 0.0D, entity.motZ - d1);
this.b(entity.motX - d0, 0.0D, entity.motZ - d1);
entity.motX *= 0.699999988079071D;
entity.motZ *= 0.699999988079071D;
} else if (((EntityMinecart) entity).type != 2 && this.type == 2) {
entity.motX *= 0.20000000298023224D;
entity.motZ *= 0.20000000298023224D;
entity.f(this.motX + d0, 0.0D, this.motZ + d1);
entity.b(this.motX + d0, 0.0D, this.motZ + d1);
this.motX *= 0.699999988079071D;
this.motZ *= 0.699999988079071D;
} else {
@ -783,14 +783,14 @@ public class EntityMinecart extends Entity implements IInventory {
d8 /= 2.0D;
this.motX *= 0.20000000298023224D;
this.motZ *= 0.20000000298023224D;
this.f(d7 - d0, 0.0D, d8 - d1);
this.b(d7 - d0, 0.0D, d8 - d1);
entity.motX *= 0.20000000298023224D;
entity.motZ *= 0.20000000298023224D;
entity.f(d7 + d0, 0.0D, d8 + d1);
entity.b(d7 + d0, 0.0D, d8 + d1);
}
} else {
this.f(-d0, 0.0D, -d1);
entity.f(d0 / 4.0D, 0.0D, d1 / 4.0D);
this.b(-d0, 0.0D, -d1);
entity.b(d0 / 4.0D, 0.0D, d1 / 4.0D);
}
}
}

Datei anzeigen

@ -248,4 +248,18 @@ public class EntityPainting extends Entity {
this.b(this.a);
}
public void a(double d0, double d1, double d2) {
if (!this.world.isStatic && d0 * d0 + d1 * d1 + d2 * d2 > 0.0D) {
this.die();
this.world.addEntity(new EntityItem(this.world, this.locX, this.locY, this.locZ, new ItemStack(Item.PAINTING)));
}
}
public void b(double d0, double d1, double d2) {
if (!this.world.isStatic && d0 * d0 + d1 * d1 + d2 * d2 > 0.0D) {
this.die();
this.world.addEntity(new EntityItem(this.world, this.locX, this.locY, this.locZ, new ItemStack(Item.PAINTING)));
}
}
}

Datei anzeigen

@ -50,7 +50,7 @@ public class EntityTrackerEntry {
public void track(List list) {
this.m = false;
if (!this.r || this.tracker.d(this.o, this.p, this.q) > 16.0D) {
if (!this.r || this.tracker.e(this.o, this.p, this.q) > 16.0D) {
this.o = this.tracker.locX;
this.p = this.tracker.locY;
this.q = this.tracker.locZ;

Datei anzeigen

@ -102,7 +102,7 @@ public class Explosion {
for (int k2 = 0; k2 < list.size(); ++k2) {
Entity entity = (Entity) list.get(k2);
double d7 = entity.e(this.posX, this.posY, this.posZ) / (double) this.size;
double d7 = entity.f(this.posX, this.posY, this.posZ) / (double) this.size;
if (d7 <= 1.0D) {
d0 = entity.locX - this.posX;

Datei anzeigen

@ -89,7 +89,7 @@ public class MinecraftServer implements Runnable, ICommandListener {
System.setErr(new PrintStream(new LoggerOutputStream(log, Level.SEVERE), true));
// CraftBukkit end
log.info("Starting minecraft server version Beta 1.7.2");
log.info("Starting minecraft server version Beta 1.7.3");
if (Runtime.getRuntime().maxMemory() / 1024L / 1024L < 512L) {
log.warning("**** NOT ENOUGH RAM!");
log.warning("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");

Datei anzeigen

@ -970,7 +970,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
for (int l = 0; l < 4; ++l) {
tileentitysign1.lines[l] = event.getLine(l);
}
tileentitysign1.setEditable(false);
tileentitysign1.a(false);
}
// CraftBukkit end

Datei anzeigen

@ -94,6 +94,6 @@ public class TileEntityChest extends TileEntity implements IInventory {
}
public boolean a_(EntityHuman entityhuman) {
return this.world.getTileEntity(this.x, this.y, this.z) != this ? false : entityhuman.d((double) this.x + 0.5D, (double) this.y + 0.5D, (double) this.z + 0.5D) <= 64.0D;
return this.world.getTileEntity(this.x, this.y, this.z) != this ? false : entityhuman.e((double) this.x + 0.5D, (double) this.y + 0.5D, (double) this.z + 0.5D) <= 64.0D;
}
}

Datei anzeigen

@ -124,6 +124,6 @@ public class TileEntityDispenser extends TileEntity implements IInventory {
}
public boolean a_(EntityHuman entityhuman) {
return this.world.getTileEntity(this.x, this.y, this.z) != this ? false : entityhuman.d((double) this.x + 0.5D, (double) this.y + 0.5D, (double) this.z + 0.5D) <= 64.0D;
return this.world.getTileEntity(this.x, this.y, this.z) != this ? false : entityhuman.e((double) this.x + 0.5D, (double) this.y + 0.5D, (double) this.z + 0.5D) <= 64.0D;
}
}

Datei anzeigen

@ -243,6 +243,6 @@ public class TileEntityFurnace extends TileEntity implements IInventory {
}
public boolean a_(EntityHuman entityhuman) {
return this.world.getTileEntity(this.x, this.y, this.z) != this ? false : entityhuman.d((double) this.x + 0.5D, (double) this.y + 0.5D, (double) this.z + 0.5D) <= 64.0D;
return this.world.getTileEntity(this.x, this.y, this.z) != this ? false : entityhuman.e((double) this.x + 0.5D, (double) this.y + 0.5D, (double) this.z + 0.5D) <= 64.0D;
}
}

Datei anzeigen

@ -48,9 +48,7 @@ public class TileEntitySign extends TileEntity {
return this.isEditable;
}
// CraftBukkit start
public void setEditable(boolean editable) {
this.isEditable = editable;
public void a(boolean flag) {
this.isEditable = flag;
}
// CraftBukkit end
}

Datei anzeigen

@ -1577,11 +1577,11 @@ public class World implements IBlockAccess {
} else {
++this.M;
boolean flag;
try {
int i = 500;
boolean flag;
while (this.C.size() > 0) {
--i;
if (i <= 0) {
@ -1593,10 +1593,11 @@ public class World implements IBlockAccess {
}
flag = false;
return flag;
} finally {
--this.M;
}
return flag;
}
}
@ -1609,12 +1610,18 @@ public class World implements IBlockAccess {
++A;
try {
if (A != 50) {
if (A == 50) {
return;
}
int k1 = (l + i) / 2;
int l1 = (j1 + k) / 2;
if (this.isLoaded(k1, 64, l1)) {
if (!this.getChunkAtWorldCoords(k1, l1).isEmpty()) {
if (this.getChunkAtWorldCoords(k1, l1).isEmpty()) {
return;
}
int i2 = this.C.size();
int j2;
@ -1639,8 +1646,8 @@ public class World implements IBlockAccess {
System.out.println("More than " + j2 + " updates, aborting lighting updates");
this.C.clear();
}
}
}
return;
}
} finally {
--A;
@ -1866,7 +1873,7 @@ public class World implements IBlockAccess {
if (l1 == 0 && this.k(l, k1, j1) <= this.random.nextInt(8) && this.a(EnumSkyBlock.SKY, l, k1, j1) <= 0) {
EntityHuman entityhuman1 = this.a((double) l + 0.5D, (double) k1 + 0.5D, (double) j1 + 0.5D, 8.0D);
if (entityhuman1 != null && entityhuman1.d((double) l + 0.5D, (double) k1 + 0.5D, (double) j1 + 0.5D) > 4.0D) {
if (entityhuman1 != null && entityhuman1.e((double) l + 0.5D, (double) k1 + 0.5D, (double) j1 + 0.5D) > 4.0D) {
this.makeSound((double) l + 0.5D, (double) k1 + 0.5D, (double) j1 + 0.5D, "ambient.cave.cave", 0.7F, 0.8F + this.random.nextFloat() * 0.2F);
this.Q = this.random.nextInt(12000) + 6000;
}
@ -2152,7 +2159,7 @@ public class World implements IBlockAccess {
continue;
}
// CraftBukkit end
double d5 = entityhuman1.d(d0, d1, d2);
double d5 = entityhuman1.e(d0, d1, d2);
if ((d3 < 0.0D || d5 < d3 * d3) && (d4 == -1.0D || d5 < d4)) {
d4 = d5;
@ -2230,6 +2237,18 @@ public class World implements IBlockAccess {
this.worldData.a(i);
}
public void setTimeAndFixTicklists(long i) {
long j = i - this.worldData.f();
NextTickListEntry nextticklistentry;
for (Iterator iterator = this.F.iterator(); iterator.hasNext(); nextticklistentry.e += j) {
nextticklistentry = (NextTickListEntry) iterator.next();
}
this.setTime(i);
}
public long getSeed() {
return this.worldData.getSeed();
}

Datei anzeigen

@ -65,7 +65,7 @@ import org.bukkit.util.config.ConfigurationNode;
public final class CraftServer implements Server {
private final String serverName = "Craftbukkit";
private final String serverVersion;
private final String protocolVersion = "1.7.2";
private final String protocolVersion = "1.7.3";
private final ServicesManager servicesManager = new SimpleServicesManager();
private final BukkitScheduler scheduler = new CraftScheduler(this);
private final SimpleCommandMap commandMap = new SimpleCommandMap(this);