Paper/nms-patches/CommandForceload.patch

44 Zeilen
2.7 KiB
Diff

2018-08-26 04:00:00 +02:00
--- a/net/minecraft/server/CommandForceload.java
+++ b/net/minecraft/server/CommandForceload.java
2019-04-23 04:00:00 +02:00
@@ -47,7 +47,7 @@
2018-08-26 04:00:00 +02:00
2019-04-23 04:00:00 +02:00
private static int a(CommandListenerWrapper commandlistenerwrapper, BlockPosition2D blockposition2d) throws CommandSyntaxException {
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(blockposition2d.a >> 4, blockposition2d.b >> 4);
- DimensionManager dimensionmanager = commandlistenerwrapper.getWorld().getWorldProvider().getDimensionManager();
2018-08-26 04:00:00 +02:00
+ DimensionManager dimensionmanager = commandlistenerwrapper.getWorld().dimension; // CraftBukkit
2019-04-23 04:00:00 +02:00
boolean flag = commandlistenerwrapper.getServer().getWorldServer(dimensionmanager).getForceLoadedChunks().contains(chunkcoordintpair.pair());
2018-08-26 04:00:00 +02:00
if (flag) {
2019-04-23 04:00:00 +02:00
@@ -59,7 +59,7 @@
2018-08-26 04:00:00 +02:00
}
private static int a(CommandListenerWrapper commandlistenerwrapper) {
2019-04-23 04:00:00 +02:00
- DimensionManager dimensionmanager = commandlistenerwrapper.getWorld().getWorldProvider().getDimensionManager();
2018-08-26 04:00:00 +02:00
+ DimensionManager dimensionmanager = commandlistenerwrapper.getWorld().dimension; // CraftBukkit
2019-04-23 04:00:00 +02:00
LongSet longset = commandlistenerwrapper.getServer().getWorldServer(dimensionmanager).getForceLoadedChunks();
2018-08-26 04:00:00 +02:00
int i = longset.size();
2019-04-23 04:00:00 +02:00
@@ -79,11 +79,11 @@
2018-08-26 04:00:00 +02:00
}
private static int b(CommandListenerWrapper commandlistenerwrapper) {
2019-04-23 04:00:00 +02:00
- DimensionManager dimensionmanager = commandlistenerwrapper.getWorld().getWorldProvider().getDimensionManager();
2018-08-26 04:00:00 +02:00
+ DimensionManager dimensionmanager = commandlistenerwrapper.getWorld().dimension; // CraftBukkit
WorldServer worldserver = commandlistenerwrapper.getServer().getWorldServer(dimensionmanager);
2019-04-23 04:00:00 +02:00
LongSet longset = worldserver.getForceLoadedChunks();
2018-08-26 04:00:00 +02:00
- longset.forEach((i) -> {
2018-12-25 22:00:00 +01:00
+ longset.forEach((java.util.function.LongConsumer) (i) -> { // CraftBukkit - decompile error
2019-04-23 04:00:00 +02:00
worldserver.setForceLoaded(ChunkCoordIntPair.getX(i), ChunkCoordIntPair.getZ(i), false);
2018-08-26 04:00:00 +02:00
});
commandlistenerwrapper.sendMessage(new ChatMessage("commands.forceload.removed.all", new Object[] { dimensionmanager}), true);
2019-04-23 04:00:00 +02:00
@@ -106,7 +106,7 @@
2018-08-26 04:00:00 +02:00
if (i2 > 256L) {
2018-12-06 00:00:00 +01:00
throw CommandForceload.a.create(256, i2);
2018-08-26 04:00:00 +02:00
} else {
2019-04-23 04:00:00 +02:00
- DimensionManager dimensionmanager = commandlistenerwrapper.getWorld().getWorldProvider().getDimensionManager();
2018-08-26 04:00:00 +02:00
+ DimensionManager dimensionmanager = commandlistenerwrapper.getWorld().dimension; // CraftBukkit
WorldServer worldserver = commandlistenerwrapper.getServer().getWorldServer(dimensionmanager);
ChunkCoordIntPair chunkcoordintpair = null;
int j2 = 0;