Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-20 05:20:07 +01:00
Implemented 1.0.1 fixes. This fixes BUKKIT-3, BUKKIT-39, BUKKIT-150
Dieser Commit ist enthalten in:
Ursprung
650717ad32
Commit
062d94d6bc
@ -143,7 +143,7 @@ public class BlockDoor extends Block {
|
|||||||
world.setTypeId(i, j, k, 0);
|
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);
|
this.doPhysics(world, i, j - 1, k, l);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -166,8 +166,8 @@ public class BlockDoor extends Block {
|
|||||||
if (!world.isStatic) {
|
if (!world.isStatic) {
|
||||||
this.b(world, i, j, k, i1, 0);
|
this.b(world, i, j, k, i1, 0);
|
||||||
}
|
}
|
||||||
|
} else if (l > 0 && l != this.id) {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
} else if (l > 0 && Block.byId[l].isPowerSource()) {
|
|
||||||
org.bukkit.World bworld = world.getWorld();
|
org.bukkit.World bworld = world.getWorld();
|
||||||
org.bukkit.block.Block block = bworld.getBlockAt(i, j, k);
|
org.bukkit.block.Block block = bworld.getBlockAt(i, j, k);
|
||||||
org.bukkit.block.Block blockTop = bworld.getBlockAt(i, j + 1, k);
|
org.bukkit.block.Block blockTop = bworld.getBlockAt(i, j + 1, k);
|
||||||
|
@ -98,7 +98,7 @@ public class MinecraftServer implements Runnable, ICommandListener, IMinecraftSe
|
|||||||
System.setErr(new PrintStream(new LoggerOutputStream(log, Level.SEVERE), true));
|
System.setErr(new PrintStream(new LoggerOutputStream(log, Level.SEVERE), true));
|
||||||
// CraftBukkit end
|
// 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) {
|
if (Runtime.getRuntime().maxMemory() / 1024L / 1024L < 512L) {
|
||||||
log.warning("**** NOT ENOUGH RAM!");
|
log.warning("**** NOT ENOUGH RAM!");
|
||||||
log.warning("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
|
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() {
|
public String getVersion() {
|
||||||
return "1.0.0";
|
return "1.0.1";
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getPlayerCount() {
|
public int getPlayerCount() {
|
||||||
|
@ -20,7 +20,7 @@ public class NetLoginHandler extends NetHandler {
|
|||||||
private int f = 0;
|
private int f = 0;
|
||||||
private String g = null;
|
private String g = null;
|
||||||
private Packet1Login h = 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) {
|
public NetLoginHandler(MinecraftServer minecraftserver, Socket socket, String s) {
|
||||||
this.server = minecraftserver;
|
this.server = minecraftserver;
|
||||||
@ -60,7 +60,7 @@ public class NetLoginHandler extends NetHandler {
|
|||||||
|
|
||||||
public void a(Packet2Handshake packet2handshake) {
|
public void a(Packet2Handshake packet2handshake) {
|
||||||
if (this.server.onlineMode) {
|
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));
|
this.networkManager.queue(new Packet2Handshake(this.i));
|
||||||
} else {
|
} else {
|
||||||
this.networkManager.queue(new Packet2Handshake("-"));
|
this.networkManager.queue(new Packet2Handshake("-"));
|
||||||
|
@ -20,12 +20,15 @@ public class WorldServer extends World implements BlockChangeDelegate {
|
|||||||
public boolean weirdIsOpCache = false;
|
public boolean weirdIsOpCache = false;
|
||||||
public boolean savingDisabled;
|
public boolean savingDisabled;
|
||||||
public final MinecraftServer server; // CraftBukkit - private -> public final
|
public final MinecraftServer server; // CraftBukkit - private -> public final
|
||||||
private IntHashMap N = new IntHashMap();
|
private IntHashMap N;
|
||||||
|
|
||||||
// CraftBukkit start - change signature
|
// CraftBukkit start - change signature
|
||||||
public WorldServer(MinecraftServer minecraftserver, IDataManager idatamanager, String s, int i, WorldSettings worldsettings, org.bukkit.World.Environment env, ChunkGenerator gen) {
|
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);
|
super(idatamanager, s, worldsettings, WorldProvider.byDimension(env.getId()), gen, env);
|
||||||
this.server = minecraftserver;
|
this.server = minecraftserver;
|
||||||
|
if (this.N == null) {
|
||||||
|
this.N = new IntHashMap();
|
||||||
|
}
|
||||||
|
|
||||||
this.dimension = i;
|
this.dimension = i;
|
||||||
this.pvpMode = minecraftserver.pvpMode;
|
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);
|
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) {
|
protected void c(Entity entity) {
|
||||||
super.c(entity);
|
super.c(entity);
|
||||||
this.N.a(entity.id, entity);
|
this.N.a(entity.id, entity);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren