Removed some unneeded code, possibly fixed animal spawning
Dieser Commit ist enthalten in:
Ursprung
35defecc41
Commit
2995a08324
@ -15,7 +15,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 = "";
|
private String i = Long.toHexString(d.nextLong());
|
||||||
|
|
||||||
public NetLoginHandler(MinecraftServer minecraftserver, Socket socket, String s) {
|
public NetLoginHandler(MinecraftServer minecraftserver, Socket socket, String s) {
|
||||||
this.server = minecraftserver;
|
this.server = minecraftserver;
|
||||||
@ -55,7 +55,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());
|
// this.i = Long.toHexString(d.nextLong()); // CraftBukkit
|
||||||
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("-"));
|
||||||
|
@ -96,7 +96,6 @@ public class World implements IBlockAccess {
|
|||||||
int lastXAccessed = Integer.MIN_VALUE;
|
int lastXAccessed = Integer.MIN_VALUE;
|
||||||
int lastZAccessed = Integer.MIN_VALUE;
|
int lastZAccessed = Integer.MIN_VALUE;
|
||||||
final Object chunkLock = new Object();
|
final Object chunkLock = new Object();
|
||||||
private List<TileEntity> tileEntitiesToUnload;
|
|
||||||
|
|
||||||
private boolean canSpawn(int x, int z) {
|
private boolean canSpawn(int x, int z) {
|
||||||
if (this.generator != null) {
|
if (this.generator != null) {
|
||||||
@ -114,15 +113,10 @@ public class World implements IBlockAccess {
|
|||||||
return (CraftServer) Bukkit.getServer();
|
return (CraftServer) Bukkit.getServer();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void markForRemoval(TileEntity tileentity) {
|
|
||||||
tileEntitiesToUnload.add(tileentity);
|
|
||||||
}
|
|
||||||
|
|
||||||
// CraftBukkit - changed signature
|
// CraftBukkit - changed signature
|
||||||
public World(IDataManager idatamanager, String s, WorldSettings worldsettings, WorldProvider worldprovider, ChunkGenerator gen, org.bukkit.World.Environment env) {
|
public World(IDataManager idatamanager, String s, WorldSettings worldsettings, WorldProvider worldprovider, ChunkGenerator gen, org.bukkit.World.Environment env) {
|
||||||
this.generator = gen;
|
this.generator = gen;
|
||||||
this.world = new CraftWorld((WorldServer) this, gen, env);
|
this.world = new CraftWorld((WorldServer) this, gen, env);
|
||||||
tileEntitiesToUnload = new ArrayList<TileEntity>();
|
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
this.X = this.random.nextInt(12000);
|
this.X = this.random.nextInt(12000);
|
||||||
@ -1616,7 +1610,7 @@ public class World implements IBlockAccess {
|
|||||||
|
|
||||||
// CraftBukkit start - Only call spawner if we have players online and the world allows for mobs or animals
|
// CraftBukkit start - Only call spawner if we have players online and the world allows for mobs or animals
|
||||||
if ((this.allowMonsters || this.allowAnimals) && (this instanceof WorldServer && this.getServer().getHandle().players.size() > 0)) {
|
if ((this.allowMonsters || this.allowAnimals) && (this instanceof WorldServer && this.getServer().getHandle().players.size() > 0)) {
|
||||||
SpawnerCreature.spawnEntities(this, this.allowMonsters, this.allowAnimals);
|
SpawnerCreature.spawnEntities(this, this.allowMonsters, this.allowAnimals && this.worldData.f() % 400L == 0L);
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@ -2243,7 +2237,7 @@ public class World implements IBlockAccess {
|
|||||||
if (axisalignedbb != null && !this.containsEntity(axisalignedbb)) {
|
if (axisalignedbb != null && !this.containsEntity(axisalignedbb)) {
|
||||||
defaultReturn = false; // CraftBukkit
|
defaultReturn = false; // CraftBukkit
|
||||||
} else {
|
} else {
|
||||||
if (block == Block.WATER || block == Block.STATIONARY_WATER || block == Block.LAVA || block == Block.STATIONARY_LAVA || block == Block.FIRE || block == Block.SNOW) {
|
if (block == Block.WATER || block == Block.STATIONARY_WATER || block == Block.LAVA || block == Block.STATIONARY_LAVA || block == Block.FIRE || block == Block.SNOW || block == Block.VINE) {
|
||||||
block = null;
|
block = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren