3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-29 17:40:09 +01:00
Paper/nms-patches/CommandForceload.patch

44 Zeilen
2.6 KiB
Diff

2018-08-26 04:00:00 +02:00
--- a/net/minecraft/server/CommandForceload.java
+++ b/net/minecraft/server/CommandForceload.java
2018-12-25 22:00:00 +01:00
@@ -43,7 +43,7 @@
2018-08-26 04:00:00 +02:00
private static int a(CommandListenerWrapper commandlistenerwrapper, ArgumentVec2I.a argumentvec2i_a) throws CommandSyntaxException {
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(argumentvec2i_a.a >> 4, argumentvec2i_a.b >> 4);
- DimensionManager dimensionmanager = commandlistenerwrapper.getWorld().o().getDimensionManager();
+ DimensionManager dimensionmanager = commandlistenerwrapper.getWorld().dimension; // CraftBukkit
2018-10-22 21:00:00 +02:00
boolean flag = commandlistenerwrapper.getServer().getWorldServer(dimensionmanager).isForceLoaded(chunkcoordintpair.x, chunkcoordintpair.z);
2018-08-26 04:00:00 +02:00
if (flag) {
2018-12-25 22:00:00 +01:00
@@ -55,7 +55,7 @@
2018-08-26 04:00:00 +02:00
}
private static int a(CommandListenerWrapper commandlistenerwrapper) {
- DimensionManager dimensionmanager = commandlistenerwrapper.getWorld().o().getDimensionManager();
+ DimensionManager dimensionmanager = commandlistenerwrapper.getWorld().dimension; // CraftBukkit
LongSet longset = commandlistenerwrapper.getServer().getWorldServer(dimensionmanager).ag();
int i = longset.size();
2018-12-25 22:00:00 +01:00
@@ -75,11 +75,11 @@
2018-08-26 04:00:00 +02:00
}
private static int b(CommandListenerWrapper commandlistenerwrapper) {
- DimensionManager dimensionmanager = commandlistenerwrapper.getWorld().o().getDimensionManager();
+ DimensionManager dimensionmanager = commandlistenerwrapper.getWorld().dimension; // CraftBukkit
WorldServer worldserver = commandlistenerwrapper.getServer().getWorldServer(dimensionmanager);
LongSet longset = worldserver.ag();
- longset.forEach((i) -> {
2018-12-25 22:00:00 +01:00
+ longset.forEach((java.util.function.LongConsumer) (i) -> { // CraftBukkit - decompile error
worldserver.setForceLoaded(ChunkCoordIntPair.a(i), ChunkCoordIntPair.b(i), false);
2018-08-26 04:00:00 +02:00
});
commandlistenerwrapper.sendMessage(new ChatMessage("commands.forceload.removed.all", new Object[] { dimensionmanager}), true);
2018-12-25 22:00:00 +01:00
@@ -102,7 +102,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 {
- DimensionManager dimensionmanager = commandlistenerwrapper.getWorld().o().getDimensionManager();
+ DimensionManager dimensionmanager = commandlistenerwrapper.getWorld().dimension; // CraftBukkit
WorldServer worldserver = commandlistenerwrapper.getServer().getWorldServer(dimensionmanager);
ChunkCoordIntPair chunkcoordintpair = null;
int j2 = 0;