geforkt von Mirrors/Paper
Update to 1.3.2
Dieser Commit ist enthalten in:
Ursprung
35cff16da5
Commit
b8cc862083
6
pom.xml
6
pom.xml
@ -4,7 +4,7 @@
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>craftbukkit</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.3.1-R2.1-SNAPSHOT</version>
|
||||
<version>1.3.2-R0.1-SNAPSHOT</version>
|
||||
<name>CraftBukkit</name>
|
||||
<url>http://www.bukkit.org</url>
|
||||
|
||||
@ -51,14 +51,14 @@
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>bukkit</artifactId>
|
||||
<version>1.3.1-R2.1-SNAPSHOT</version>
|
||||
<version>1.3.2-R0.1-SNAPSHOT</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bukkit</groupId>
|
||||
<artifactId>minecraft-server</artifactId>
|
||||
<version>1.3.1</version>
|
||||
<version>1.3.2</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
@ -255,7 +255,7 @@ public class Chunk {
|
||||
}
|
||||
|
||||
if (i1 != l) {
|
||||
this.world.g(i, k, i1, l);
|
||||
this.world.g(i + this.x * 16, k + this.z * 16, i1, l);
|
||||
this.heightMap[k << 4 | i] = i1;
|
||||
int j1 = this.x * 16 + i;
|
||||
int k1 = this.z * 16 + k;
|
||||
|
@ -47,7 +47,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
System.setErr(new PrintStream(new LoggerOutputStream(log, Level.SEVERE), true));
|
||||
// CraftBukkit end
|
||||
|
||||
log.info("Starting minecraft server version 1.3.1");
|
||||
log.info("Starting minecraft server version 1.3.2");
|
||||
if (Runtime.getRuntime().maxMemory() / 1024L / 1024L < 512L) {
|
||||
log.warning("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
|
||||
}
|
||||
@ -189,7 +189,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
|
||||
protected void a(CrashReport crashreport) {
|
||||
while (this.isRunning()) {
|
||||
this.ah();
|
||||
this.ai();
|
||||
|
||||
try {
|
||||
Thread.sleep(10L);
|
||||
@ -200,8 +200,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
}
|
||||
|
||||
public CrashReport b(CrashReport crashreport) {
|
||||
crashreport = super.b(crashreport);
|
||||
crashreport.a("Type", (Callable) (new CrashReportType(this)));
|
||||
return super.b(crashreport);
|
||||
return crashreport;
|
||||
}
|
||||
|
||||
protected void o() {
|
||||
@ -210,7 +211,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
|
||||
public void q() {
|
||||
super.q();
|
||||
this.ah();
|
||||
this.ai();
|
||||
}
|
||||
|
||||
public boolean getAllowNether() {
|
||||
@ -222,8 +223,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
}
|
||||
|
||||
public void a(MojangStatisticsGenerator mojangstatisticsgenerator) {
|
||||
mojangstatisticsgenerator.a("whitelist_enabled", Boolean.valueOf(this.ai().getHasWhitelist()));
|
||||
mojangstatisticsgenerator.a("whitelist_count", Integer.valueOf(this.ai().getWhitelisted().size()));
|
||||
mojangstatisticsgenerator.a("whitelist_enabled", Boolean.valueOf(this.aj().getHasWhitelist()));
|
||||
mojangstatisticsgenerator.a("whitelist_count", Integer.valueOf(this.aj().getWhitelisted().size()));
|
||||
super.a(mojangstatisticsgenerator);
|
||||
}
|
||||
|
||||
@ -235,7 +236,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
this.l.add(new ServerCommand(s, icommandlistener));
|
||||
}
|
||||
|
||||
public void ah() {
|
||||
public void ai() {
|
||||
while (!this.l.isEmpty()) {
|
||||
ServerCommand servercommand = (ServerCommand) this.l.remove(0);
|
||||
|
||||
@ -254,7 +255,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
return true;
|
||||
}
|
||||
|
||||
public ServerConfigurationManager ai() {
|
||||
public ServerConfigurationManager aj() {
|
||||
return (ServerConfigurationManager) super.getServerConfigurationManager();
|
||||
}
|
||||
|
||||
@ -288,7 +289,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
return file1 != null ? file1.getAbsolutePath() : "No settings file";
|
||||
}
|
||||
|
||||
public void aj() {
|
||||
public void ak() {
|
||||
ServerGUI.a(this);
|
||||
this.s = true;
|
||||
}
|
||||
@ -302,6 +303,6 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
}
|
||||
|
||||
public ServerConfigurationManagerAbstract getServerConfigurationManager() {
|
||||
return this.ai();
|
||||
return this.aj();
|
||||
}
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ public class EntityEnderman extends EntityMonster {
|
||||
this.world.a("portal", this.locX + (this.random.nextDouble() - 0.5D) * (double) this.width, this.locY + this.random.nextDouble() * (double) this.length - 0.25D, this.locZ + (this.random.nextDouble() - 0.5D) * (double) this.width, (this.random.nextDouble() - 0.5D) * 2.0D, -this.random.nextDouble(), (this.random.nextDouble() - 0.5D) * 2.0D);
|
||||
}
|
||||
|
||||
if (this.world.r() && !this.world.isStatic) {
|
||||
if (this.world.s() && !this.world.isStatic) {
|
||||
float f = this.c(1.0F);
|
||||
|
||||
if (f > 0.5F && this.world.j(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ)) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F) {
|
||||
|
@ -12,6 +12,8 @@ public class EntityExperienceOrb extends Entity {
|
||||
public int c;
|
||||
private int d = 5;
|
||||
public int value; // CraftBukkit - private -> public
|
||||
private EntityHuman targetPlayer;
|
||||
private int targetTime;
|
||||
|
||||
public EntityExperienceOrb(World world, double d0, double d1, double d2, int i) {
|
||||
super(world);
|
||||
@ -56,11 +58,18 @@ public class EntityExperienceOrb extends Entity {
|
||||
|
||||
this.i(this.locX, (this.boundingBox.b + this.boundingBox.e) / 2.0D, this.locZ);
|
||||
double d0 = 8.0D;
|
||||
EntityHuman entityhuman = this.world.findNearbyPlayer(this, d0);
|
||||
|
||||
if (entityhuman != null) {
|
||||
if (this.targetTime < this.a - 20 + this.id % 100) {
|
||||
if (this.targetPlayer == null || this.targetPlayer.e(this) > d0 * d0) {
|
||||
this.targetPlayer = this.world.findNearbyPlayer(this, d0);
|
||||
}
|
||||
|
||||
this.targetTime = this.a;
|
||||
}
|
||||
|
||||
if (this.targetPlayer != null) {
|
||||
// CraftBukkit start
|
||||
EntityTargetEvent event = CraftEventFactory.callEntityTargetEvent(this, entityhuman, EntityTargetEvent.TargetReason.CLOSEST_PLAYER);
|
||||
EntityTargetEvent event = CraftEventFactory.callEntityTargetEvent(this, targetPlayer, EntityTargetEvent.TargetReason.CLOSEST_PLAYER);
|
||||
Entity target = event.getTarget() == null ? null : ((org.bukkit.craftbukkit.entity.CraftEntity) event.getTarget()).getHandle();
|
||||
|
||||
if (!event.isCancelled() && target != null) {
|
||||
|
@ -144,7 +144,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
if (!this.world.isStatic) {
|
||||
if (!this.l()) {
|
||||
this.a(true, true, false);
|
||||
} else if (this.world.r()) {
|
||||
} else if (this.world.s()) {
|
||||
this.a(false, true, true);
|
||||
}
|
||||
}
|
||||
@ -855,7 +855,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
|
||||
return EnumBedResult.NOT_POSSIBLE_HERE;
|
||||
}
|
||||
|
||||
if (this.world.r()) {
|
||||
if (this.world.s()) {
|
||||
return EnumBedResult.NOT_POSSIBLE_NOW;
|
||||
}
|
||||
|
||||
|
@ -721,7 +721,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
}
|
||||
|
||||
public boolean b(String s) {
|
||||
return "seed".equals(s) && !this.server.S() ? true : this.server.getServerConfigurationManager().isOp(this.name);
|
||||
return "seed".equals(s) && !this.server.S() ? true : (!"tell".equals(s) && !"help".equals(s) && !"me".equals(s) ? this.server.getServerConfigurationManager().isOp(this.name) : true);
|
||||
}
|
||||
|
||||
public String r() {
|
||||
|
@ -46,7 +46,7 @@ public class EntitySkeleton extends EntityMonster {
|
||||
}
|
||||
|
||||
public void d() {
|
||||
if (this.world.r() && !this.world.isStatic) {
|
||||
if (this.world.s() && !this.world.isStatic) {
|
||||
float f = this.c(1.0F);
|
||||
|
||||
if (f > 0.5F && this.world.j(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ)) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F) {
|
||||
|
@ -37,7 +37,7 @@ public class EntityZombie extends EntityMonster {
|
||||
}
|
||||
|
||||
public void d() {
|
||||
if (this.world.r() && !this.world.isStatic) {
|
||||
if (this.world.s() && !this.world.isStatic) {
|
||||
float f = this.c(1.0F);
|
||||
|
||||
if (f > 0.5F && this.world.j(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ)) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F) {
|
||||
|
@ -304,7 +304,7 @@ public abstract class MinecraftServer implements Runnable, IMojangStatistics, IC
|
||||
|
||||
if (worldserver != null) {
|
||||
if (!flag) {
|
||||
log.info("Saving chunks for level \'" + worldserver.getWorldData().getName() + "\'/" + worldserver.worldProvider);
|
||||
log.info("Saving chunks for level \'" + worldserver.getWorldData().getName() + "\'/" + worldserver.worldProvider.getName());
|
||||
worldserver.save(true, (IProgressUpdate) null); // Perform a full save
|
||||
} else {
|
||||
worldserver.save(false, (IProgressUpdate) null); // Queue chunk saving
|
||||
@ -561,10 +561,7 @@ public abstract class MinecraftServer implements Runnable, IMojangStatistics, IC
|
||||
while (true) {
|
||||
if (!worldserver.updateLights()) {
|
||||
// this.methodProfiler.b(); // CraftBukkit - not in production code
|
||||
if (true || !worldserver.players.isEmpty()) { // CraftBukkit - this prevents entity cleanup, other issue on servers with no players
|
||||
worldserver.tickEntities();
|
||||
}
|
||||
|
||||
worldserver.tickEntities();
|
||||
// this.methodProfiler.a("tracker"); // CraftBukkit - not in production code
|
||||
worldserver.getTracker().updatePlayers();
|
||||
// this.methodProfiler.b(); // CraftBukkit - not in production code
|
||||
@ -691,7 +688,7 @@ public abstract class MinecraftServer implements Runnable, IMojangStatistics, IC
|
||||
}
|
||||
|
||||
if (flag) {
|
||||
dedicatedserver.aj();
|
||||
dedicatedserver.ak();
|
||||
}
|
||||
*/
|
||||
|
||||
@ -744,7 +741,7 @@ public abstract class MinecraftServer implements Runnable, IMojangStatistics, IC
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return "1.3.1";
|
||||
return "1.3.2";
|
||||
}
|
||||
|
||||
public int x() {
|
||||
|
@ -126,6 +126,9 @@ public class NetServerHandler extends NetHandler {
|
||||
// this.minecraftServer.methodProfiler.c("playerTick"); // CraftBukkit - not in production code
|
||||
if (!this.h && !this.player.viewingCredits) {
|
||||
this.player.g();
|
||||
if (this.player.vehicle == null) {
|
||||
this.player.setPositionRotation(this.y, this.z, this.q, this.player.yaw, this.player.pitch);
|
||||
}
|
||||
}
|
||||
|
||||
// this.minecraftServer.methodProfiler.b(); // CraftBukkit - not in production code
|
||||
@ -266,13 +269,11 @@ public class NetServerHandler extends NetHandler {
|
||||
}
|
||||
|
||||
if (packet10flying.hasPos && packet10flying.y == -999.0D && packet10flying.stance == -999.0D) {
|
||||
// CraftBukkit start
|
||||
if (Math.abs(packet10flying.x) > 1 || Math.abs(packet10flying.z) > 1) {
|
||||
if (Math.abs(packet10flying.x) > 1.0D || Math.abs(packet10flying.z) > 1.0D) {
|
||||
System.err.println(player.getName() + " was caught trying to crash the server with an invalid position.");
|
||||
player.kickPlayer("Nope!");
|
||||
return;
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
d5 = packet10flying.x;
|
||||
d4 = packet10flying.z;
|
||||
@ -875,6 +876,7 @@ public class NetServerHandler extends NetHandler {
|
||||
}
|
||||
|
||||
try {
|
||||
logger.info(event.getPlayer().getName() + " issued server command: " + event.getMessage()); // CraftBukkit
|
||||
if (this.server.dispatchCommand(event.getPlayer(), event.getMessage().substring(1))) {
|
||||
return;
|
||||
}
|
||||
@ -886,10 +888,7 @@ public class NetServerHandler extends NetHandler {
|
||||
// CraftBukkit end
|
||||
|
||||
/* CraftBukkit start - No longer needed as we have already handled it in server.dispatchServerCommand above.
|
||||
if (this.minecraftServer.getServerConfigurationManager().isOp(this.player.name) || "/seed".equals(s)) {
|
||||
logger.info(this.player.name + " issued server command: " + s);
|
||||
this.minecraftServer.getCommandHandler().a(this.player, s);
|
||||
}
|
||||
this.minecraftServer.getCommandHandler().a(this.player, s);
|
||||
// CraftBukkit end */
|
||||
}
|
||||
|
||||
|
@ -142,8 +142,4 @@ public class Packet56MapChunkBulk extends Packet {
|
||||
public int d() {
|
||||
return this.c.length;
|
||||
}
|
||||
|
||||
public boolean a_() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -229,7 +229,7 @@ public class PlayerManager {
|
||||
public boolean a(EntityPlayer entityplayer, int i, int j) {
|
||||
PlayerInstance playerinstance = this.a(i, j, false);
|
||||
|
||||
return playerinstance == null ? false : PlayerInstance.b(playerinstance).contains(entityplayer);
|
||||
return playerinstance == null ? false : PlayerInstance.b(playerinstance).contains(entityplayer) && !entityplayer.chunkCoordIntPairQueue.contains(PlayerInstance.a(playerinstance));
|
||||
}
|
||||
|
||||
public static int getFurthestViewableBlock(int i) {
|
||||
|
@ -499,12 +499,8 @@ public abstract class ServerConfigurationManagerAbstract {
|
||||
}
|
||||
|
||||
public void sendAll(Packet packet) {
|
||||
Iterator iterator = this.players.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
EntityPlayer entityplayer = (EntityPlayer) iterator.next();
|
||||
|
||||
entityplayer.netServerHandler.sendPacket(packet);
|
||||
for (int i = 0; i < this.players.size(); ++i) {
|
||||
((EntityPlayer) this.players.get(i)).netServerHandler.sendPacket(packet);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ public class VillageSiege {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (this.world.r()) {
|
||||
if (this.world.s()) {
|
||||
this.c = 0;
|
||||
return;
|
||||
}
|
||||
|
@ -134,7 +134,7 @@ public abstract class World implements IBlockAccess {
|
||||
}
|
||||
|
||||
this.worldProvider.a(this);
|
||||
this.chunkProvider = this.h();
|
||||
this.chunkProvider = this.i();
|
||||
if (!this.worldData.isInitialized()) {
|
||||
this.a(worldsettings);
|
||||
this.worldData.d(true);
|
||||
@ -146,7 +146,7 @@ public abstract class World implements IBlockAccess {
|
||||
this.getServer().addWorld(this.world); // CraftBukkit
|
||||
}
|
||||
|
||||
protected abstract IChunkProvider h();
|
||||
protected abstract IChunkProvider i();
|
||||
|
||||
protected void a(WorldSettings worldsettings) {
|
||||
this.worldData.d(true);
|
||||
@ -586,7 +586,7 @@ public abstract class World implements IBlockAccess {
|
||||
return this.worldProvider.f[this.getLightLevel(i, j, k)];
|
||||
}
|
||||
|
||||
public boolean r() {
|
||||
public boolean s() {
|
||||
return this.k < 4;
|
||||
}
|
||||
|
||||
@ -1704,7 +1704,7 @@ public abstract class World implements IBlockAccess {
|
||||
}
|
||||
|
||||
public void doTick() {
|
||||
this.l();
|
||||
this.m();
|
||||
}
|
||||
|
||||
private void a() {
|
||||
@ -1716,7 +1716,7 @@ public abstract class World implements IBlockAccess {
|
||||
}
|
||||
}
|
||||
|
||||
protected void l() {
|
||||
protected void m() {
|
||||
if (!this.worldProvider.e) {
|
||||
if (this.r > 0) {
|
||||
--this.r;
|
||||
|
@ -118,7 +118,7 @@ public class WorldGenBigTree extends WorldGenerator implements BlockSapling.Tree
|
||||
aint1[b2] = aint[b2] + k1;
|
||||
int l1 = this.world.getTypeId(aint1[0], aint1[1], aint1[2]);
|
||||
|
||||
if (l1 != 0 && l1 != 18) {
|
||||
if (l1 != 0 && l1 != Block.LEAVES.id) {
|
||||
++k1;
|
||||
} else {
|
||||
this.setTypeAndData(this.world, aint1[0], aint1[1], aint1[2], l, 0);
|
||||
@ -160,7 +160,7 @@ public class WorldGenBigTree extends WorldGenerator implements BlockSapling.Tree
|
||||
for (int i1 = j + this.n; l < i1; ++l) {
|
||||
float f = this.b(l - j);
|
||||
|
||||
this.a(i, l, k, f, (byte) 1, 18);
|
||||
this.a(i, l, k, f, (byte) 1, Block.LEAVES.id);
|
||||
}
|
||||
}
|
||||
|
||||
@ -197,7 +197,20 @@ public class WorldGenBigTree extends WorldGenerator implements BlockSapling.Tree
|
||||
aint3[b1] = MathHelper.floor((double) (aint[b1] + j) + 0.5D);
|
||||
aint3[b2] = MathHelper.floor((double) aint[b2] + (double) j * d0 + 0.5D);
|
||||
aint3[b3] = MathHelper.floor((double) aint[b3] + (double) j * d1 + 0.5D);
|
||||
this.setTypeAndData(this.world, aint3[0], aint3[1], aint3[2], i, 0);
|
||||
byte b5 = 0;
|
||||
int l = Math.abs(aint3[0] - aint[0]);
|
||||
int i1 = Math.abs(aint3[2] - aint[2]);
|
||||
int j1 = Math.max(l, i1);
|
||||
|
||||
if (j1 > 0) {
|
||||
if (l == j1) {
|
||||
b5 = 4;
|
||||
} else if (i1 == j1) {
|
||||
b5 = 8;
|
||||
}
|
||||
}
|
||||
|
||||
this.setTypeAndData(this.world, aint3[0], aint3[1], aint3[2], i, b5);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -226,17 +239,17 @@ public class WorldGenBigTree extends WorldGenerator implements BlockSapling.Tree
|
||||
int[] aint = new int[] { i, j, l};
|
||||
int[] aint1 = new int[] { i, k, l};
|
||||
|
||||
this.a(aint, aint1, 17);
|
||||
this.a(aint, aint1, Block.LOG.id);
|
||||
if (this.l == 2) {
|
||||
++aint[0];
|
||||
++aint1[0];
|
||||
this.a(aint, aint1, 17);
|
||||
this.a(aint, aint1, Block.LOG.id);
|
||||
++aint[2];
|
||||
++aint1[2];
|
||||
this.a(aint, aint1, 17);
|
||||
this.a(aint, aint1, Block.LOG.id);
|
||||
aint[0] += -1;
|
||||
aint1[0] += -1;
|
||||
this.a(aint, aint1, 17);
|
||||
this.a(aint, aint1, Block.LOG.id);
|
||||
}
|
||||
}
|
||||
|
||||
@ -252,7 +265,7 @@ public class WorldGenBigTree extends WorldGenerator implements BlockSapling.Tree
|
||||
int k = aint[1] - this.d[1];
|
||||
|
||||
if (this.c(k)) {
|
||||
this.a(aint, aint2, 17);
|
||||
this.a(aint, aint2, (byte) Block.LOG.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -296,7 +309,7 @@ public class WorldGenBigTree extends WorldGenerator implements BlockSapling.Tree
|
||||
aint3[b3] = MathHelper.floor((double) aint[b3] + (double) i * d1);
|
||||
int k = this.world.getTypeId(aint3[0], aint3[1], aint3[2]);
|
||||
|
||||
if ((k != 0 && k != 18) || aint3[1] >= 256) { // CraftBukkit - fix trees wrapping around
|
||||
if ((k != 0 && k != Block.LEAVES.id) || aint3[1] >= 256) { // CraftBukkit - fix trees wrapping around
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -30,9 +30,10 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
public boolean weirdIsOpCache = false;
|
||||
public boolean savingDisabled;
|
||||
private boolean P;
|
||||
private NoteDataList[] Q = new NoteDataList[] { new NoteDataList((EmptyClass2) null), new NoteDataList((EmptyClass2) null)};
|
||||
private int R = 0;
|
||||
private static final StructurePieceTreasure[] S = new StructurePieceTreasure[] { new StructurePieceTreasure(Item.STICK.id, 0, 1, 3, 10), new StructurePieceTreasure(Block.WOOD.id, 0, 1, 3, 10), new StructurePieceTreasure(Block.LOG.id, 0, 1, 3, 10), new StructurePieceTreasure(Item.STONE_AXE.id, 0, 1, 1, 3), new StructurePieceTreasure(Item.WOOD_AXE.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.STONE_PICKAXE.id, 0, 1, 1, 3), new StructurePieceTreasure(Item.WOOD_PICKAXE.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.APPLE.id, 0, 2, 3, 5), new StructurePieceTreasure(Item.BREAD.id, 0, 2, 3, 3)};
|
||||
private int emptyTime = 0;
|
||||
private NoteDataList[] R = new NoteDataList[] { new NoteDataList((EmptyClass2) null), new NoteDataList((EmptyClass2) null)};
|
||||
private int S = 0;
|
||||
private static final StructurePieceTreasure[] T = new StructurePieceTreasure[] { new StructurePieceTreasure(Item.STICK.id, 0, 1, 3, 10), new StructurePieceTreasure(Block.WOOD.id, 0, 1, 3, 10), new StructurePieceTreasure(Block.LOG.id, 0, 1, 3, 10), new StructurePieceTreasure(Item.STONE_AXE.id, 0, 1, 1, 3), new StructurePieceTreasure(Item.WOOD_AXE.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.STONE_PICKAXE.id, 0, 1, 1, 3), new StructurePieceTreasure(Item.WOOD_PICKAXE.id, 0, 1, 1, 5), new StructurePieceTreasure(Item.APPLE.id, 0, 2, 3, 5), new StructurePieceTreasure(Item.BREAD.id, 0, 2, 3, 3)};
|
||||
private IntHashMap entitiesById;
|
||||
|
||||
// CraftBukkit start
|
||||
@ -415,6 +416,18 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
}
|
||||
}
|
||||
|
||||
public void tickEntities() {
|
||||
if (false && this.players.isEmpty()) { // CraftBukkit - this prevents entity cleanup, other issues on servers with no players
|
||||
if (this.emptyTime++ >= 60) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
this.emptyTime = 0;
|
||||
}
|
||||
|
||||
super.tickEntities();
|
||||
}
|
||||
|
||||
public boolean a(boolean flag) {
|
||||
int i = this.O.size();
|
||||
|
||||
@ -503,7 +516,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
super.entityJoinedWorld(entity, flag);
|
||||
}
|
||||
|
||||
protected IChunkProvider h() {
|
||||
protected IChunkProvider i() {
|
||||
IChunkLoader ichunkloader = this.dataManager.createChunkLoader(this.worldProvider);
|
||||
|
||||
// CraftBukkit start
|
||||
@ -621,13 +634,13 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
this.worldData.setSpawn(i, j, k);
|
||||
this.isLoading = false;
|
||||
if (worldsettings.c()) {
|
||||
this.i();
|
||||
this.j();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void i() {
|
||||
WorldGenBonusChest worldgenbonuschest = new WorldGenBonusChest(S, 10);
|
||||
protected void j() {
|
||||
WorldGenBonusChest worldgenbonuschest = new WorldGenBonusChest(T, 10);
|
||||
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
int j = this.worldData.c() + this.random.nextInt(6) - this.random.nextInt(6);
|
||||
@ -756,13 +769,13 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
|
||||
public void playNote(int i, int j, int k, int l, int i1, int j1) {
|
||||
NoteBlockData noteblockdata = new NoteBlockData(i, j, k, l, i1, j1);
|
||||
Iterator iterator = this.Q[this.R].iterator();
|
||||
Iterator iterator = this.R[this.S].iterator();
|
||||
|
||||
NoteBlockData noteblockdata1;
|
||||
|
||||
do {
|
||||
if (!iterator.hasNext()) {
|
||||
this.Q[this.R].add(noteblockdata);
|
||||
this.R[this.S].add(noteblockdata);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -772,11 +785,11 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
}
|
||||
|
||||
private void Q() {
|
||||
while (!this.Q[this.R].isEmpty()) {
|
||||
int i = this.R;
|
||||
while (!this.R[this.S].isEmpty()) {
|
||||
int i = this.S;
|
||||
|
||||
this.R ^= 1;
|
||||
Iterator iterator = this.Q[i].iterator();
|
||||
this.S ^= 1;
|
||||
Iterator iterator = this.R[i].iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
NoteBlockData noteblockdata = (NoteBlockData) iterator.next();
|
||||
@ -787,7 +800,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
}
|
||||
}
|
||||
|
||||
this.Q[i].clear();
|
||||
this.R[i].clear();
|
||||
}
|
||||
}
|
||||
|
||||
@ -806,10 +819,10 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
this.dataManager.a();
|
||||
}
|
||||
|
||||
protected void l() {
|
||||
protected void m() {
|
||||
boolean flag = this.J();
|
||||
|
||||
super.l();
|
||||
super.m();
|
||||
if (flag != this.J()) {
|
||||
// CraftBukkit start - only sending weather packets to those affected
|
||||
for (int i = 0; i < this.players.size(); ++i) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren