@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/WorldServer.java
|
||||
+++ b/net/minecraft/server/WorldServer.java
|
||||
@@ -18,14 +18,25 @@
|
||||
@@ -19,14 +19,25 @@
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
private final Map<UUID, Entity> entitiesByUUID = Maps.newHashMap();
|
||||
public boolean savingDisabled;
|
||||
private boolean O;
|
||||
@@ -37,14 +48,22 @@
|
||||
@@ -38,14 +49,22 @@
|
||||
private int T;
|
||||
private List<NextTickListEntry> U = Lists.newArrayList();
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
this.H();
|
||||
this.I();
|
||||
this.getWorldBorder().a(minecraftserver.aD());
|
||||
@@ -63,6 +82,7 @@
|
||||
@@ -64,6 +83,7 @@
|
||||
this.villages.a((World) this);
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
this.scoreboard = new ScoreboardServer(this.server);
|
||||
PersistentScoreboard persistentscoreboard = (PersistentScoreboard) this.worldMaps.get(PersistentScoreboard.class, "scoreboard");
|
||||
|
||||
@@ -73,6 +93,11 @@
|
||||
@@ -74,6 +94,11 @@
|
||||
|
||||
persistentscoreboard.a(this.scoreboard);
|
||||
((ScoreboardServer) this.scoreboard).a((Runnable) (new RunnableSaveScoreboard(persistentscoreboard)));
|
||||
@@ -74,7 +74,7 @@
|
||||
this.B = new LootTableRegistry(new File(new File(this.dataManager.getDirectory(), "data"), "loot_tables"));
|
||||
this.getWorldBorder().setCenter(this.worldData.B(), this.worldData.C());
|
||||
this.getWorldBorder().setDamageAmount(this.worldData.H());
|
||||
@@ -85,9 +110,98 @@
|
||||
@@ -86,9 +111,98 @@
|
||||
this.getWorldBorder().setSize(this.worldData.D());
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
public void doTick() {
|
||||
super.doTick();
|
||||
if (this.getWorldData().isHardcore() && this.getDifficulty() != EnumDifficulty.HARD) {
|
||||
@@ -105,9 +219,11 @@
|
||||
@@ -106,9 +220,11 @@
|
||||
this.f();
|
||||
}
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
}
|
||||
|
||||
this.methodProfiler.c("chunkSource");
|
||||
@@ -136,6 +252,8 @@
|
||||
@@ -137,6 +253,8 @@
|
||||
this.portalTravelAgent.a(this.getTime());
|
||||
this.methodProfiler.b();
|
||||
this.ao();
|
||||
@@ -196,8 +196,8 @@
|
||||
+ this.getWorld().processChunkGC(); // CraftBukkit
|
||||
}
|
||||
|
||||
public BiomeBase.BiomeMeta a(EnumCreatureType enumcreaturetype, BlockPosition blockposition) {
|
||||
@@ -162,7 +280,7 @@
|
||||
@Nullable
|
||||
@@ -164,7 +282,7 @@
|
||||
|
||||
if (entityhuman.isSpectator()) {
|
||||
++i;
|
||||
@@ -206,7 +206,7 @@
|
||||
++j;
|
||||
}
|
||||
}
|
||||
@@ -188,25 +306,46 @@
|
||||
@@ -190,25 +308,46 @@
|
||||
}
|
||||
|
||||
private void c() {
|
||||
@@ -257,7 +257,7 @@
|
||||
|
||||
return false;
|
||||
} else {
|
||||
@@ -277,7 +416,7 @@
|
||||
@@ -279,7 +418,7 @@
|
||||
entityhorse.x(true);
|
||||
entityhorse.setAgeRaw(0);
|
||||
entityhorse.setPosition((double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ());
|
||||
@@ -266,7 +266,7 @@
|
||||
this.strikeLightning(new EntityLightning(this, (double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), true));
|
||||
} else {
|
||||
this.strikeLightning(new EntityLightning(this, (double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), false));
|
||||
@@ -293,11 +432,29 @@
|
||||
@@ -295,11 +434,29 @@
|
||||
BlockPosition blockposition1 = blockposition.down();
|
||||
|
||||
if (this.v(blockposition1)) {
|
||||
@@ -298,7 +298,7 @@
|
||||
}
|
||||
|
||||
if (flag && this.getBiome(blockposition1).d()) {
|
||||
@@ -372,7 +529,7 @@
|
||||
@@ -374,7 +531,7 @@
|
||||
public boolean b(BlockPosition blockposition, Block block) {
|
||||
NextTickListEntry nextticklistentry = new NextTickListEntry(blockposition, block);
|
||||
|
||||
@@ -307,7 +307,7 @@
|
||||
}
|
||||
|
||||
public void a(BlockPosition blockposition, Block block, int i) {
|
||||
@@ -411,8 +568,8 @@
|
||||
@@ -413,8 +570,8 @@
|
||||
nextticklistentry.a(j);
|
||||
}
|
||||
|
||||
@@ -318,7 +318,7 @@
|
||||
this.nextTickList.add(nextticklistentry);
|
||||
}
|
||||
}
|
||||
@@ -434,15 +591,15 @@
|
||||
@@ -436,15 +593,15 @@
|
||||
nextticklistentry.a((long) i + this.worldData.getTime());
|
||||
}
|
||||
|
||||
@@ -337,7 +337,7 @@
|
||||
if (this.emptyTime++ >= 300) {
|
||||
return;
|
||||
}
|
||||
@@ -512,11 +669,17 @@
|
||||
@@ -514,11 +671,17 @@
|
||||
} else {
|
||||
int i = this.nextTickList.size();
|
||||
|
||||
@@ -357,7 +357,7 @@
|
||||
}
|
||||
|
||||
this.methodProfiler.a("cleaning");
|
||||
@@ -529,8 +692,9 @@
|
||||
@@ -531,8 +694,9 @@
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -368,7 +368,7 @@
|
||||
this.U.add(nextticklistentry);
|
||||
}
|
||||
|
||||
@@ -598,7 +762,7 @@
|
||||
@@ -602,7 +766,7 @@
|
||||
if (blockposition.getX() >= structureboundingbox.a && blockposition.getX() < structureboundingbox.d && blockposition.getZ() >= structureboundingbox.c && blockposition.getZ() < structureboundingbox.f) {
|
||||
if (flag) {
|
||||
if (i == 0) {
|
||||
@@ -377,7 +377,7 @@
|
||||
}
|
||||
|
||||
iterator.remove();
|
||||
@@ -616,6 +780,7 @@
|
||||
@@ -620,6 +784,7 @@
|
||||
return arraylist;
|
||||
}
|
||||
|
||||
@@ -385,7 +385,7 @@
|
||||
public void entityJoinedWorld(Entity entity, boolean flag) {
|
||||
if (!this.getSpawnAnimals() && (entity instanceof EntityAnimal || entity instanceof EntityWaterAnimal)) {
|
||||
entity.die();
|
||||
@@ -627,6 +792,7 @@
|
||||
@@ -631,6 +796,7 @@
|
||||
|
||||
super.entityJoinedWorld(entity, flag);
|
||||
}
|
||||
@@ -393,7 +393,7 @@
|
||||
|
||||
private boolean getSpawnNPCs() {
|
||||
return this.server.getSpawnNPCs();
|
||||
@@ -639,12 +805,42 @@
|
||||
@@ -643,7 +809,54 @@
|
||||
protected IChunkProvider n() {
|
||||
IChunkLoader ichunkloader = this.dataManager.createChunkLoader(this.worldProvider);
|
||||
|
||||
@@ -413,11 +413,11 @@
|
||||
+
|
||||
+ return new ChunkProviderServer(this, ichunkloader, gen);
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
public List<TileEntity> getTileEntities(int i, int j, int k, int l, int i1, int j1) {
|
||||
ArrayList arraylist = Lists.newArrayList();
|
||||
|
||||
+ }
|
||||
+
|
||||
+ public List<TileEntity> getTileEntities(int i, int j, int k, int l, int i1, int j1) {
|
||||
+ ArrayList arraylist = Lists.newArrayList();
|
||||
+
|
||||
+ // CraftBukkit start - Get tile entities from chunks instead of world
|
||||
+ for (int chunkX = (i >> 4); chunkX <= ((l - 1) >> 4); chunkX++) {
|
||||
+ for (int chunkZ = (k >> 4); chunkZ <= ((j1 - 1) >> 4); chunkZ++) {
|
||||
@@ -434,19 +434,22 @@
|
||||
+ }
|
||||
+ }
|
||||
+ /*
|
||||
for (int k1 = 0; k1 < this.tileEntityList.size(); ++k1) {
|
||||
TileEntity tileentity = (TileEntity) this.tileEntityList.get(k1);
|
||||
BlockPosition blockposition = tileentity.getPosition();
|
||||
@@ -653,6 +849,8 @@
|
||||
arraylist.add(tileentity);
|
||||
}
|
||||
}
|
||||
+ for (int k1 = 0; k1 < this.tileEntityList.size(); ++k1) {
|
||||
+ TileEntity tileentity = (TileEntity) this.tileEntityList.get(k1);
|
||||
+ BlockPosition blockposition = tileentity.getPosition();
|
||||
+
|
||||
+ if (blockposition.getX() >= i && blockposition.getY() >= j && blockposition.getZ() >= k && blockposition.getX() < l && blockposition.getY() < i1 && blockposition.getZ() < j1) {
|
||||
+ arraylist.add(tileentity);
|
||||
+ }
|
||||
+ }
|
||||
+ */
|
||||
+ // CraftBukkit end
|
||||
|
||||
return arraylist;
|
||||
+
|
||||
+ return arraylist;
|
||||
}
|
||||
@@ -716,6 +914,23 @@
|
||||
|
||||
public boolean a(EntityHuman entityhuman, BlockPosition blockposition) {
|
||||
@@ -705,6 +918,23 @@
|
||||
int j = this.worldProvider.getSeaLevel();
|
||||
int k = 8;
|
||||
|
||||
@@ -470,7 +473,7 @@
|
||||
if (blockposition != null) {
|
||||
i = blockposition.getX();
|
||||
k = blockposition.getZ();
|
||||
@@ -725,7 +940,7 @@
|
||||
@@ -714,7 +944,7 @@
|
||||
|
||||
int l = 0;
|
||||
|
||||
@@ -479,7 +482,7 @@
|
||||
i += random.nextInt(64) - random.nextInt(64);
|
||||
k += random.nextInt(64) - random.nextInt(64);
|
||||
++l;
|
||||
@@ -766,6 +981,7 @@
|
||||
@@ -755,6 +985,7 @@
|
||||
ChunkProviderServer chunkproviderserver = this.getChunkProviderServer();
|
||||
|
||||
if (chunkproviderserver.e()) {
|
||||
@@ -487,7 +490,7 @@
|
||||
if (iprogressupdate != null) {
|
||||
iprogressupdate.a("Saving level");
|
||||
}
|
||||
@@ -776,7 +992,8 @@
|
||||
@@ -765,7 +996,8 @@
|
||||
}
|
||||
|
||||
chunkproviderserver.a(flag);
|
||||
@@ -497,7 +500,7 @@
|
||||
Iterator iterator = arraylist.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -811,6 +1028,12 @@
|
||||
@@ -800,6 +1032,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -510,7 +513,7 @@
|
||||
this.worldData.a(this.getWorldBorder().getSize());
|
||||
this.worldData.d(this.getWorldBorder().getCenterX());
|
||||
this.worldData.c(this.getWorldBorder().getCenterZ());
|
||||
@@ -820,8 +1043,12 @@
|
||||
@@ -809,8 +1047,12 @@
|
||||
this.worldData.k(this.getWorldBorder().getWarningTime());
|
||||
this.worldData.b(this.getWorldBorder().j());
|
||||
this.worldData.e(this.getWorldBorder().i());
|
||||
@@ -524,7 +527,7 @@
|
||||
}
|
||||
|
||||
public boolean addEntity(Entity entity) {
|
||||
@@ -845,7 +1072,7 @@
|
||||
@@ -834,7 +1076,7 @@
|
||||
|
||||
private boolean i(Entity entity) {
|
||||
if (entity.dead) {
|
||||
@@ -533,7 +536,7 @@
|
||||
return false;
|
||||
} else {
|
||||
UUID uuid = entity.getUniqueID();
|
||||
@@ -857,7 +1084,7 @@
|
||||
@@ -846,7 +1088,7 @@
|
||||
this.f.remove(entity1);
|
||||
} else {
|
||||
if (!(entity instanceof EntityHuman)) {
|
||||
@@ -542,7 +545,7 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -900,8 +1127,16 @@
|
||||
@@ -889,8 +1131,16 @@
|
||||
}
|
||||
|
||||
public boolean strikeLightning(Entity entity) {
|
||||
@@ -560,10 +563,10 @@
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -917,10 +1152,20 @@
|
||||
@@ -906,10 +1156,20 @@
|
||||
}
|
||||
|
||||
public Explosion createExplosion(Entity entity, double d0, double d1, double d2, float f, boolean flag, boolean flag1) {
|
||||
public Explosion createExplosion(@Nullable Entity entity, double d0, double d1, double d2, float f, boolean flag, boolean flag1) {
|
||||
+ // CraftBukkit start
|
||||
+ Explosion explosion = super.createExplosion(entity, d0, d1, d2, f, flag, flag1);
|
||||
+
|
||||
@@ -581,7 +584,7 @@
|
||||
if (!flag1) {
|
||||
explosion.clearBlocks();
|
||||
}
|
||||
@@ -966,7 +1211,8 @@
|
||||
@@ -955,7 +1215,8 @@
|
||||
BlockActionData blockactiondata = (BlockActionData) iterator.next();
|
||||
|
||||
if (this.a(blockactiondata)) {
|
||||
@@ -591,7 +594,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -989,6 +1235,7 @@
|
||||
@@ -978,6 +1239,7 @@
|
||||
boolean flag = this.W();
|
||||
|
||||
super.t();
|
||||
@@ -599,7 +602,7 @@
|
||||
if (this.n != this.o) {
|
||||
this.server.getPlayerList().a((Packet) (new PacketPlayOutGameStateChange(7, this.o)), this.worldProvider.getDimensionManager().getDimensionID());
|
||||
}
|
||||
@@ -1007,6 +1254,21 @@
|
||||
@@ -996,6 +1258,21 @@
|
||||
this.server.getPlayerList().sendAll(new PacketPlayOutGameStateChange(7, this.o));
|
||||
this.server.getPlayerList().sendAll(new PacketPlayOutGameStateChange(8, this.q));
|
||||
}
|
||||
@@ -621,7 +624,7 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -1035,10 +1297,20 @@
|
||||
@@ -1025,10 +1302,20 @@
|
||||
}
|
||||
|
||||
public void a(EnumParticle enumparticle, boolean flag, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, int... aint) {
|
||||
|
||||
Reference in New Issue
Block a user