Archiviert
13
0

Implemented 1.0.1 fixes. This fixes BUKKIT-3, BUKKIT-39, BUKKIT-150

Dieser Commit ist enthalten in:
Nathan Adams 2011-12-01 21:43:54 +00:00
Ursprung 650717ad32
Commit 062d94d6bc
4 geänderte Dateien mit 18 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -143,7 +143,7 @@ public class BlockDoor extends Block {
world.setTypeId(i, j, k, 0);
}
if (l > 0 && Block.byId[l].isPowerSource()) {
if (l > 0 && l != this.id) {
this.doPhysics(world, i, j - 1, k, l);
}
} else {
@ -166,8 +166,8 @@ public class BlockDoor extends Block {
if (!world.isStatic) {
this.b(world, i, j, k, i1, 0);
}
} else if (l > 0 && l != this.id) {
// CraftBukkit start
} else if (l > 0 && Block.byId[l].isPowerSource()) {
org.bukkit.World bworld = world.getWorld();
org.bukkit.block.Block block = bworld.getBlockAt(i, j, k);
org.bukkit.block.Block blockTop = bworld.getBlockAt(i, j + 1, k);

Datei anzeigen

@ -98,7 +98,7 @@ public class MinecraftServer implements Runnable, ICommandListener, IMinecraftSe
System.setErr(new PrintStream(new LoggerOutputStream(log, Level.SEVERE), true));
// CraftBukkit end
log.info("Starting minecraft server version 1.0.0");
log.info("Starting minecraft server version 1.0.1");
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\"");
@ -639,7 +639,7 @@ public class MinecraftServer implements Runnable, ICommandListener, IMinecraftSe
}
public String getVersion() {
return "1.0.0";
return "1.0.1";
}
public int getPlayerCount() {

Datei anzeigen

@ -20,7 +20,7 @@ public class NetLoginHandler extends NetHandler {
private int f = 0;
private String g = null;
private Packet1Login h = null;
private String i = Long.toString(d.nextLong(), 16); // CraftBukkit -- Thanks Jens! :D
private String i = Long.toString(d.nextLong(), 16); // CraftBukkit - Security fix
public NetLoginHandler(MinecraftServer minecraftserver, Socket socket, String s) {
this.server = minecraftserver;
@ -60,7 +60,7 @@ public class NetLoginHandler extends NetHandler {
public void a(Packet2Handshake packet2handshake) {
if (this.server.onlineMode) {
// this.i = Long.toHexString(d.nextLong()); // CraftBukkit
this.i = Long.toString(d.nextLong(), 16);
this.networkManager.queue(new Packet2Handshake(this.i));
} else {
this.networkManager.queue(new Packet2Handshake("-"));

Datei anzeigen

@ -20,12 +20,15 @@ public class WorldServer extends World implements BlockChangeDelegate {
public boolean weirdIsOpCache = false;
public boolean savingDisabled;
public final MinecraftServer server; // CraftBukkit - private -> public final
private IntHashMap N = new IntHashMap();
private IntHashMap N;
// CraftBukkit start - change signature
public WorldServer(MinecraftServer minecraftserver, IDataManager idatamanager, String s, int i, WorldSettings worldsettings, org.bukkit.World.Environment env, ChunkGenerator gen) {
super(idatamanager, s, worldsettings, WorldProvider.byDimension(env.getId()), gen, env);
this.server = minecraftserver;
if (this.N == null) {
this.N = new IntHashMap();
}
this.dimension = i;
this.pvpMode = minecraftserver.pvpMode;
@ -157,6 +160,14 @@ public class WorldServer extends World implements BlockChangeDelegate {
return i1 > this.getServer().getSpawnRadius() || this.server.serverConfigurationManager.isOp(entityhuman.name);
}
protected void c() {
if (this.N == null) {
this.N = new IntHashMap();
}
super.c();
}
protected void c(Entity entity) {
super.c(entity);
this.N.a(entity.id, entity);