Update upstream CB/S

This commit is contained in:
Zach Brown 2018-04-17 22:25:50 -04:00
parent 52befd0a68
commit d49c6a296e
No known key found for this signature in database
GPG Key ID: CC9DA35FC5450B76
21 changed files with 99 additions and 125 deletions

View File

@ -1,4 +1,4 @@
From 239eb9b8cab46eba22e4c5cbcbde324cf6dc8d25 Mon Sep 17 00:00:00 2001
From 5f29e0a54fea2f22cb4d8d61e89d9e8b1b57fef2 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 04:00:11 -0600
Subject: [PATCH] Timings v2
@ -490,7 +490,7 @@ index c4d9344a7..350e0991d 100644
private void z() {
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index ac478fb27..69ded6aa4 100644
index 86973cb98..bd006ef74 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -204,7 +204,7 @@ public class ChunkProviderServer implements IChunkProvider {
@ -1148,7 +1148,7 @@ index 5a5a588e7..d2d4ff6fb 100644
private static final RegistryMaterials<MinecraftKey, Class<? extends TileEntity>> f = new RegistryMaterials();
protected World world;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 843320ffb..d902e2630 100644
index 07fd5d957..ec83c431e 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -19,11 +19,11 @@ import com.google.common.collect.Maps;
@ -1228,15 +1228,16 @@ index 843320ffb..d902e2630 100644
this.methodProfiler.b();
this.methodProfiler.b();
}
@@ -1620,7 +1625,6 @@ public abstract class World implements IBlockAccess {
@@ -1623,7 +1628,7 @@ public abstract class World implements IBlockAccess {
return;
}
// CraftBukkit end
// Spigot end
- entity.tickTimer.startTiming(); // Spigot
+
entity.M = entity.locX;
entity.N = entity.locY;
entity.O = entity.locZ;
@@ -1628,6 +1632,7 @@ public abstract class World implements IBlockAccess {
@@ -1631,6 +1636,7 @@ public abstract class World implements IBlockAccess {
entity.lastPitch = entity.pitch;
if (flag && entity.aa) {
++entity.ticksLived;
@ -1244,7 +1245,7 @@ index 843320ffb..d902e2630 100644
if (entity.isPassenger()) {
entity.aE();
} else {
@@ -1687,8 +1692,6 @@ public abstract class World implements IBlockAccess {
@@ -1690,8 +1696,6 @@ public abstract class World implements IBlockAccess {
}
}
}
@ -1254,10 +1255,10 @@ index 843320ffb..d902e2630 100644
public boolean b(AxisAlignedBB axisalignedbb) {
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index d4f25cbf2..e492913a2 100644
index c891629bd..95964c550 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -305,13 +305,13 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -308,13 +308,13 @@ public class WorldServer extends World implements IAsyncTaskHandler {
timings.doChunkUnload.stopTiming(); // Spigot
this.methodProfiler.c("tickPending");
@ -1275,7 +1276,7 @@ index d4f25cbf2..e492913a2 100644
this.methodProfiler.c("chunkMap");
timings.doChunkMap.startTiming(); // Spigot
this.manager.flush();
@@ -526,7 +526,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -529,7 +529,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
}
}
@ -1284,7 +1285,7 @@ index d4f25cbf2..e492913a2 100644
if (i > 0) {
ChunkSection[] achunksection = chunk.getSections();
int i1 = achunksection.length;
@@ -554,6 +554,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -557,6 +557,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
}
}
}
@ -1292,7 +1293,7 @@ index d4f25cbf2..e492913a2 100644
}
this.methodProfiler.b();
@@ -739,6 +740,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -742,6 +743,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
this.methodProfiler.a("cleaning");
@ -1300,7 +1301,7 @@ index d4f25cbf2..e492913a2 100644
NextTickListEntry nextticklistentry;
for (int j = 0; j < i; ++j) {
@@ -752,10 +754,12 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -755,10 +757,12 @@ public class WorldServer extends World implements IAsyncTaskHandler {
// this.nextTickListHash.remove(nextticklistentry);
this.W.add(nextticklistentry);
}
@ -1313,7 +1314,7 @@ index d4f25cbf2..e492913a2 100644
while (iterator.hasNext()) {
nextticklistentry = (NextTickListEntry) iterator.next();
@@ -764,6 +768,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -767,6 +771,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
if (this.areChunksLoadedBetween(nextticklistentry.a.a(0, 0, 0), nextticklistentry.a.a(0, 0, 0))) {
IBlockData iblockdata = this.getType(nextticklistentry.a);
@ -1322,7 +1323,7 @@ index d4f25cbf2..e492913a2 100644
if (iblockdata.getMaterial() != Material.AIR && Block.a(iblockdata.getBlock(), nextticklistentry.a())) {
try {
@@ -776,10 +782,12 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -779,10 +785,12 @@ public class WorldServer extends World implements IAsyncTaskHandler {
throw new ReportedException(crashreport);
}
}
@ -1335,7 +1336,7 @@ index d4f25cbf2..e492913a2 100644
this.methodProfiler.b();
this.W.clear();
@@ -875,7 +883,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -878,7 +886,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
gen = new org.bukkit.craftbukkit.generator.NormalChunkGenerator(this, this.getSeed());
}
@ -1344,7 +1345,7 @@ index d4f25cbf2..e492913a2 100644
// CraftBukkit end
}
@@ -1040,6 +1048,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -1043,6 +1051,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
if (chunkproviderserver.e()) {
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit
@ -1352,7 +1353,7 @@ index d4f25cbf2..e492913a2 100644
if (iprogressupdate != null) {
iprogressupdate.a("Saving level");
}
@@ -1049,7 +1058,9 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -1052,7 +1061,9 @@ public class WorldServer extends World implements IAsyncTaskHandler {
iprogressupdate.c("Saving chunks");
}
@ -1362,7 +1363,7 @@ index d4f25cbf2..e492913a2 100644
// CraftBukkit - ArrayList -> Collection
Collection arraylist = chunkproviderserver.a();
Iterator iterator = arraylist.iterator();
@@ -1061,7 +1072,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -1064,7 +1075,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
chunkproviderserver.unload(chunk);
}
}
@ -1371,7 +1372,7 @@ index d4f25cbf2..e492913a2 100644
}
}
@@ -1074,6 +1085,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -1077,6 +1088,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
}
protected void a() throws ExceptionWorldConflict {
@ -1379,7 +1380,7 @@ index d4f25cbf2..e492913a2 100644
this.checkSession();
WorldServer[] aworldserver = this.server.worldServer;
int i = aworldserver.length;
@@ -1103,6 +1115,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -1106,6 +1118,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
this.worldData.e(this.getWorldBorder().i());
this.dataManager.saveWorldData(this.worldData, this.server.getPlayerList().t());
this.worldMaps.a();
@ -1906,5 +1907,5 @@ index 2bd690fdf..38be7ed71 100644
}
}
--
2.16.3
2.14.3

View File

@ -1,4 +1,4 @@
From 736024006caeba1547c2f390349fe5ffd05b6253 Mon Sep 17 00:00:00 2001
From dd9ac394c58c1de582f03216bf52206b71b6bd19 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Tue, 1 Mar 2016 14:47:52 -0600
Subject: [PATCH] Player affects spawning API
@ -57,10 +57,10 @@ index a599a043d..1c7c187c7 100644
j = MathHelper.floor(entityhuman.locZ / 16.0D);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 759964b0f..26d4bd690 100644
index 3cdbedf14..b2b82d520 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -2727,7 +2727,7 @@ public abstract class World implements IBlockAccess {
@@ -2731,7 +2731,7 @@ public abstract class World implements IBlockAccess {
for (int i = 0; i < this.players.size(); ++i) {
EntityHuman entityhuman = (EntityHuman) this.players.get(i);
@ -91,5 +91,5 @@ index 916781403..9e8ca0fbd 100644
// Spigot start
--
2.16.1
2.14.3

View File

@ -1,4 +1,4 @@
From 67f8358f906dddc95c4c24cc49351c282adc824c Mon Sep 17 00:00:00 2001
From b00d6ae1ac25b1c2a41cabc1f3cd2cae9bd9fd01 Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 14:52:43 -0600
Subject: [PATCH] Disable thunder
@ -19,10 +19,10 @@ index afc13e851..4ae2f9af1 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index e492913a2..95ea3924e 100644
index 95964c550..b12c58732 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -485,7 +485,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -488,7 +488,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
int l;
BlockPosition blockposition;

View File

@ -1,4 +1,4 @@
From ee5676d0639aa1732275560b2e20be53f6edb5bb Mon Sep 17 00:00:00 2001
From 54b3b7343bff27759ae9d02430994db91db9b96e Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 14:57:24 -0600
Subject: [PATCH] Disable ice and snow
@ -19,10 +19,10 @@ index 4ae2f9af1..70b02f020 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 95ea3924e..9ef492f1b 100644
index b12c58732..d0ff0adf5 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -508,7 +508,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -511,7 +511,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
}
this.methodProfiler.c("iceandsnow");

View File

@ -1,4 +1,4 @@
From 07f755e88aee46ffac5a68549c22d5f06415a2e9 Mon Sep 17 00:00:00 2001
From b5dd5139dd221c0f8622f60b89654a3e70c58149 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 22 Mar 2016 12:04:28 -0500
Subject: [PATCH] Configurable spawn chances for skeleton horses
@ -19,10 +19,10 @@ index f71580393..38d664e00 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 9ef492f1b..72dc20087 100644
index d0ff0adf5..96792300c 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -493,7 +493,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -496,7 +496,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
if (this.isRainingAt(blockposition)) {
DifficultyDamageScaler difficultydamagescaler = this.D(blockposition);
@ -32,5 +32,5 @@ index 9ef492f1b..72dc20087 100644
entityhorseskeleton.p(true);
--
2.17.0
2.14.3

View File

@ -1,4 +1,4 @@
From 83aa50c2c80d1e27071ddc42948717897b3baff5 Mon Sep 17 00:00:00 2001
From 879b9321a818af70f87a4aeb1b4e391334529190 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 02:07:55 -0600
Subject: [PATCH] Optimize isValidLocation, getType and getBlockData for inling
@ -12,7 +12,7 @@ Replace all calls to the new place to the unnecessary forward.
Optimize getType and getBlockData to manually inline and optimize the calls
diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java
index d55e180d..679d5504 100644
index d55e180d7..679d5504e 100644
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
@@ -10,6 +10,14 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
@ -31,7 +31,7 @@ index d55e180d..679d5504 100644
public BaseBlockPosition(int i, int j, int k) {
this.a = i;
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
index 67b476b2..008ed206 100644
index 67b476b22..008ed206d 100644
--- a/src/main/java/net/minecraft/server/BlockPosition.java
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
@@ -339,6 +339,16 @@ public class BlockPosition extends BaseBlockPosition {
@ -52,7 +52,7 @@ index 67b476b2..008ed206 100644
public MutableBlockPosition() {
this(0, 0, 0);
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 84a88056..172d00bd 100644
index 84a880561..172d00bdc 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -406,11 +406,27 @@ public class Chunk {
@ -86,7 +86,7 @@ index 84a88056..172d00bd 100644
IBlockData iblockdata = null;
diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
index 3d784d0d..afdc4a77 100644
index 3d784d0dc..afdc4a779 100644
--- a/src/main/java/net/minecraft/server/ChunkSection.java
+++ b/src/main/java/net/minecraft/server/ChunkSection.java
@@ -5,7 +5,7 @@ public class ChunkSection {
@ -99,7 +99,7 @@ index 3d784d0d..afdc4a77 100644
private NibbleArray skyLight;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 9339bf83..a20c9810 100644
index 03fec7195..93257a38e 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -277,12 +277,12 @@ public abstract class World implements IBlockAccess {
@ -228,7 +228,7 @@ index 9339bf83..a20c9810 100644
public boolean D() {
return this.L < 4;
@@ -2017,7 +2026,7 @@ public abstract class World implements IBlockAccess {
@@ -2021,7 +2030,7 @@ public abstract class World implements IBlockAccess {
public Map<BlockPosition, TileEntity> capturedTileEntities = Maps.newHashMap();
@Nullable
public TileEntity getTileEntity(BlockPosition blockposition) {
@ -237,7 +237,7 @@ index 9339bf83..a20c9810 100644
return null;
} else {
// CraftBukkit start
@@ -2058,7 +2067,7 @@ public abstract class World implements IBlockAccess {
@@ -2062,7 +2071,7 @@ public abstract class World implements IBlockAccess {
}
public void setTileEntity(BlockPosition blockposition, @Nullable TileEntity tileentity) {
@ -246,7 +246,7 @@ index 9339bf83..a20c9810 100644
if (tileentity != null && !tileentity.y()) {
// CraftBukkit start
if (captureBlockStates) {
@@ -2121,7 +2130,7 @@ public abstract class World implements IBlockAccess {
@@ -2125,7 +2134,7 @@ public abstract class World implements IBlockAccess {
}
public boolean d(BlockPosition blockposition, boolean flag) {

View File

@ -1,4 +1,4 @@
From 096a76ab0d00c7acb26f0a08688556ad017c1dd7 Mon Sep 17 00:00:00 2001
From 43603ffdc597090900d1a6243f17282846427add Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 19:55:45 -0400
Subject: [PATCH] Option to disable BlockPhysicsEvent for Redstone
@ -25,7 +25,7 @@ index 38d664e00..e634c3afd 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index a20c9810f..03f076776 100644
index 93257a38e..d8d1a4c77 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -582,7 +582,7 @@ public abstract class World implements IBlockAccess {
@ -38,7 +38,7 @@ index a20c9810f..03f076776 100644
this.getServer().getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 72dc20087..f2ddc22dd 100644
index 96792300c..ebe397116 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -35,6 +35,7 @@ import org.bukkit.event.weather.LightningStrikeEvent;
@ -49,7 +49,7 @@ index 72dc20087..f2ddc22dd 100644
private final MinecraftServer server;
public EntityTracker tracker;
private final PlayerChunkMap manager;
@@ -774,6 +775,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -777,6 +778,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
if (iblockdata.getMaterial() != Material.AIR && Block.a(iblockdata.getBlock(), nextticklistentry.a())) {
try {
@ -57,7 +57,7 @@ index 72dc20087..f2ddc22dd 100644
iblockdata.getBlock().b((World) this, nextticklistentry.a, iblockdata, this.random);
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Exception while ticking a block");
@@ -781,7 +783,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -784,7 +786,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
CrashReportSystemDetails.a(crashreportsystemdetails, nextticklistentry.a, iblockdata);
throw new ReportedException(crashreport);

View File

@ -1,4 +1,4 @@
From 9e236a550752495b42ff6d31317ba07d31f790a2 Mon Sep 17 00:00:00 2001
From 821b1063568630d188fc719bd2bec080f25a545c Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 13 Sep 2014 23:14:43 -0400
Subject: [PATCH] Configurable Keep Spawn Loaded range per world
@ -39,10 +39,10 @@ index 4e8ce79ff..2300ee10b 100644
if (i1 - j > 1000L) {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 279f0a261..a0b36b6ba 100644
index 518ee1826..4ae6d6df6 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -3200,8 +3200,9 @@ public abstract class World implements IBlockAccess {
@@ -3204,8 +3204,9 @@ public abstract class World implements IBlockAccess {
int k = i * 16 + 8 - blockposition.getX();
int l = j * 16 + 8 - blockposition.getZ();
boolean flag = true;
@ -54,7 +54,7 @@ index 279f0a261..a0b36b6ba 100644
public void a(Packet<?> packet) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 5d15d5846..bc048f292 100644
index d3e949707..054ac1b47 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -961,7 +961,7 @@ public final class CraftServer implements Server {

View File

@ -1,14 +1,14 @@
From 42b757c0c077ef126f1ac1ae6dadecccbc42d033 Mon Sep 17 00:00:00 2001
From d8082db6ad95fdbcc2c256ee4070d7a67b881ebb Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 5 Apr 2016 19:42:22 -0400
Subject: [PATCH] Don't spam reload spawn chunks in nether/end
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index f78298a5..e2efbf8c 100644
index b092a84db..b3bebefe4 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -3196,6 +3196,7 @@ public abstract class World implements IBlockAccess {
@@ -3200,6 +3200,7 @@ public abstract class World implements IBlockAccess {
return this.P;
}
@ -17,7 +17,7 @@ index f78298a5..e2efbf8c 100644
BlockPosition blockposition = this.getSpawn();
int k = i * 16 + 8 - blockposition.getX();
diff --git a/src/main/java/net/minecraft/server/WorldProvider.java b/src/main/java/net/minecraft/server/WorldProvider.java
index d0265f96..35d8d1a6 100644
index d0265f960..35d8d1a6e 100644
--- a/src/main/java/net/minecraft/server/WorldProvider.java
+++ b/src/main/java/net/minecraft/server/WorldProvider.java
@@ -138,6 +138,6 @@ public abstract class WorldProvider {

View File

@ -1,4 +1,4 @@
From e98113a1c6d8e408e06181acc9930e5dab2851fa Mon Sep 17 00:00:00 2001
From 1ed63343ae812bb15622e25e0d4378c0f64f5765 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 13 Apr 2016 00:25:28 -0400
Subject: [PATCH] Remove unused World Tile Entity List
@ -6,7 +6,7 @@ Subject: [PATCH] Remove unused World Tile Entity List
Massive hit to performance and it is completely unnecessary.
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index e2efbf8c..aae2d578 100644
index b3bebefe4..37713adf0 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -69,7 +69,7 @@ public abstract class World implements IBlockAccess {
@ -57,7 +57,7 @@ index e2efbf8c..aae2d578 100644
this.tileEntityListTick.add(tileentity);
}
@@ -2114,7 +2114,7 @@ public abstract class World implements IBlockAccess {
@@ -2118,7 +2118,7 @@ public abstract class World implements IBlockAccess {
} else {
if (tileentity != null) {
this.b.remove(tileentity);

View File

@ -1,4 +1,4 @@
From 6ca235d6dc418bf48a8a8f7d63d3a077bcdd905c Mon Sep 17 00:00:00 2001
From 4d5243e343835ff1f71ea9e9f41cc4985fb13749 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 19 Sep 2016 23:16:39 -0400
Subject: [PATCH] Auto Save Improvements
@ -82,7 +82,7 @@ index 8ec26b97c..87730aec3 100644
public Random a(long i) {
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 0adfcaa8b..9e8f67ffd 100644
index 47159bff3..db81b4a8c 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -1,5 +1,6 @@
@ -200,10 +200,10 @@ index 3fc242e4b..90f6e2e04 100644
public void addWhitelist(GameProfile gameprofile) {
this.whitelist.add(new WhiteListEntry(gameprofile));
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index f2ddc22dd..8493dccee 100644
index ebe397116..53cea76e2 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1050,8 +1050,9 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -1053,8 +1053,9 @@ public class WorldServer extends World implements IAsyncTaskHandler {
ChunkProviderServer chunkproviderserver = this.getChunkProviderServer();
if (chunkproviderserver.e()) {
@ -214,7 +214,7 @@ index f2ddc22dd..8493dccee 100644
if (iprogressupdate != null) {
iprogressupdate.a("Saving level");
}
@@ -1060,6 +1061,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -1063,6 +1064,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
if (iprogressupdate != null) {
iprogressupdate.c("Saving chunks");
}
@ -223,5 +223,5 @@ index f2ddc22dd..8493dccee 100644
timings.worldSaveChunks.startTiming(); // Paper
chunkproviderserver.a(flag);
--
2.16.3
2.14.3

View File

@ -1,4 +1,4 @@
From 25afea25eeeb4ee7fdbe857028fdb18c03729254 Mon Sep 17 00:00:00 2001
From 011624aeb0d64b67f330b6e12ea38531ec9da1d3 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 21 Sep 2016 22:54:28 -0400
Subject: [PATCH] Chunk registration fixes
@ -8,10 +8,10 @@ World checks and the Chunk Add logic are inconsistent on how Y > 256, < 0, is tr
Keep them consistent
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index bafa37f64..d5e338eb3 100644
index 7976112e5..4bea2a9e1 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1764,7 +1764,7 @@ public abstract class World implements IBlockAccess {
@@ -1768,7 +1768,7 @@ public abstract class World implements IBlockAccess {
}
i = MathHelper.floor(entity.locX / 16.0D);
@ -21,5 +21,5 @@ index bafa37f64..d5e338eb3 100644
if (!entity.aa || entity.ab != i || entity.ac != j || entity.ad != k) {
--
2.16.1
2.14.3

View File

@ -1,4 +1,4 @@
From 9f2c643fe85d5b7753e25a2ee29bef593c7073f7 Mon Sep 17 00:00:00 2001
From dfbb19a1b82c4f18849462d12618593aab35b51d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 26 Sep 2016 01:51:30 -0400
Subject: [PATCH] Disable Vanilla Chunk GC
@ -6,10 +6,10 @@ Subject: [PATCH] Disable Vanilla Chunk GC
Bukkit has its own system for this.
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 8493dccee..2ac5caaa4 100644
index 53cea76e2..737ade74d 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1067,7 +1067,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -1070,7 +1070,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
chunkproviderserver.a(flag);
timings.worldSaveChunks.stopTiming(); // Paper
// CraftBukkit - ArrayList -> Collection
@ -18,7 +18,7 @@ index 8493dccee..2ac5caaa4 100644
Iterator iterator = arraylist.iterator();
while (iterator.hasNext()) {
@@ -1076,7 +1076,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -1079,7 +1079,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
if (chunk != null && !this.manager.a(chunk.locX, chunk.locZ)) {
chunkproviderserver.unload(chunk);
}
@ -29,5 +29,5 @@ index 8493dccee..2ac5caaa4 100644
}
}
--
2.16.1
2.14.3

View File

@ -1,11 +1,11 @@
From 6dbdcc68864a16883aeca56b83dabcad1c71a4e1 Mon Sep 17 00:00:00 2001
From f29a0437a77710327757f8b5ed2b4d44cd2a65fd Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Fri, 16 Dec 2016 22:10:35 -0600
Subject: [PATCH] Vanished players don't have rights
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 42da707ae..9080006e5 100644
index f444465ca..36914ed94 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -68,7 +68,7 @@ public abstract class Entity implements ICommandListener {
@ -31,10 +31,10 @@ index 60149c1ca..a5730d1c7 100644
IBlockData iblockdata1 = this.a.getPlacedState(world, blockposition, enumdirection, f, f1, f2, i, entityhuman);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index ea6f46522..01dba285a 100644
index 66e56e0fd..942f57df1 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1799,6 +1799,33 @@ public abstract class World implements IBlockAccess {
@@ -1803,6 +1803,33 @@ public abstract class World implements IBlockAccess {
return this.a(axisalignedbb, (Entity) null);
}
@ -68,7 +68,7 @@ index ea6f46522..01dba285a 100644
public boolean a(AxisAlignedBB axisalignedbb, @Nullable Entity entity) {
List list = this.getEntities((Entity) null, axisalignedbb);
@@ -2689,7 +2716,7 @@ public abstract class World implements IBlockAccess {
@@ -2693,7 +2720,7 @@ public abstract class World implements IBlockAccess {
AxisAlignedBB axisalignedbb = flag ? null : block.getBlockData().d(this, blockposition);
// CraftBukkit start - store default return
@ -96,5 +96,5 @@ index 06a277b3b..5f816e44f 100644
return event;
}
--
2.16.1
2.14.3

View File

@ -1,4 +1,4 @@
From 164188358ca9ad1cb4a0769c211922fe5d92ab07 Mon Sep 17 00:00:00 2001
From 91c222268760b9802fe7c010a3b2beac66796626 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 13 May 2017 20:11:21 -0500
Subject: [PATCH] Add system property to disable book size limits
@ -11,7 +11,7 @@ to make books with as much data as they want. Do not use this without
limiting incoming data from packets in some other way.
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
index 6fab8cd1..d8684eed 100644
index ed89f64ac..91e3c4468 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
@@ -40,6 +40,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
@ -22,7 +22,7 @@ index 6fab8cd1..d8684eed 100644
protected String title;
protected String author;
@@ -196,7 +197,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
@@ -192,7 +193,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
if (title == null) {
this.title = null;
return true;
@ -31,7 +31,7 @@ index 6fab8cd1..d8684eed 100644
return false;
}
@@ -232,7 +233,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
@@ -228,7 +229,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
throw new IllegalArgumentException("Invalid page number " + page + "/" + pages.size());
}
@ -40,7 +40,7 @@ index 6fab8cd1..d8684eed 100644
pages.set(page - 1, CraftChatMessage.fromString(newText, true)[0]);
}
@@ -244,13 +245,13 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
@@ -240,13 +241,13 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
public void addPage(final String... pages) {
for (String page : pages) {

View File

@ -1,4 +1,4 @@
From 6445da8529404c4cd75d3f6fb3db54bb084166b7 Mon Sep 17 00:00:00 2001
From 288d6c1e779c03b9845da8c3464858eba2c19ec3 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sat, 22 Jul 2017 15:22:59 +0100
Subject: [PATCH] Add missing coverages for getTileEntity in order to attempt
@ -6,10 +6,10 @@ Subject: [PATCH] Add missing coverages for getTileEntity in order to attempt
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 2ac5caaa..c03be509 100644
index 737ade74d..c06158e02 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -235,6 +235,13 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@@ -238,6 +238,13 @@ public class WorldServer extends World implements IAsyncTaskHandler {
result = fixTileEntity(pos, type, result);
}
}

View File

@ -1,11 +1,11 @@
From 021716c338c60c29f5080847c508a2f6441bd08e Mon Sep 17 00:00:00 2001
From 74334c78f85601ec2518956d0a4cb118d923f93f Mon Sep 17 00:00:00 2001
From: Kyle Wood <demonwav@gmail.com>
Date: Thu, 1 Mar 2018 19:38:14 -0600
Subject: [PATCH] Load version history at server start
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 85445571..39a3d46f 100644
index 854455711..39a3d46ff 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -203,6 +203,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@ -17,5 +17,5 @@ index 85445571..39a3d46f 100644
DedicatedServer.LOGGER.info("Generating keypair");
--
2.17.0
2.14.3

View File

@ -1,27 +0,0 @@
From f7eea67c0f0d721d72f84c1f3ef068bcbd356a13 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 8 Apr 2018 01:21:23 +0100
Subject: [PATCH] revert "Better reloading of pending unload chunks"
This change by spigot ensures that many interactins with chunks,
e.g. getting a list of TEs will cause the chunk to be marked for not
unloading and will block their unload. This is especially true for
servers using Timings (it needs to access the TE list of chunks), or
any plugins which need to access entity/TE lists periodically.
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index de859ffd1..1e84afb0a 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -148,7 +148,7 @@ public class ChunkProviderServer implements IChunkProvider {
}
public Chunk getChunkAt(int i, int j, Runnable runnable, boolean generate) {
- Chunk chunk = getLoadedChunkAt(i, j);
+ Chunk chunk = getChunkIfLoaded(i, j); // Paper - revert "Better reloading of pending unload chunks" (see patch)
ChunkRegionLoader loader = null;
if (this.chunkLoader instanceof ChunkRegionLoader) {
--
2.17.0

View File

@ -1,4 +1,4 @@
From 578b65ccedae8393493093111f4b06429d197ea0 Mon Sep 17 00:00:00 2001
From 1b3610b5199b739775d7758545642559eed33a88 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 17 Apr 2018 21:26:31 -0400
Subject: [PATCH] Handle bad chunks more gracefully
@ -15,7 +15,7 @@ Should Mojang choose to alter this behavior in the future, this change
will simply defer to whatever that new behavior is.
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 1e84afb0a..2ed3fc40b 100644
index de859ffd1..55dada668 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -162,6 +162,13 @@ public class ChunkProviderServer implements IChunkProvider {

@ -1 +1 @@
Subproject commit 9060bfa9b969a97399f14ab4dbb3aebe61d4a9fc
Subproject commit bea5a842bc51229c58db6ee9a0ce8768935543ea

@ -1 +1 @@
Subproject commit b6ecf3b31636d08e0bac78dd21adc3b0a8ca70ed
Subproject commit eadd615b8418d25885b85acb922c4f3be674dd76