summaryrefslogtreecommitdiffstats
path: root/nms-patches/CommandForceload.patch
blob: 05924d1b41fb069f8b609ee2cf66bc9ac31626ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
--- a/net/minecraft/server/CommandForceload.java
+++ b/net/minecraft/server/CommandForceload.java
@@ -47,7 +47,7 @@
 
     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
         boolean flag = commandlistenerwrapper.getServer().getWorldServer(dimensionmanager).f(chunkcoordintpair.x, chunkcoordintpair.z);
 
         if (flag) {
@@ -59,7 +59,7 @@
     }
 
     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();
 
@@ -79,12 +79,12 @@
     }
 
     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) -> {
-            worldserver.b(ChunkCoordIntPair.a(i), ChunkCoordIntPair.b(i), false);
+        longset.forEach((LongConsumer) (ix) -> { // CraftBukkit - decompile error
+            worldserver.b(ChunkCoordIntPair.a(ix), ChunkCoordIntPair.b(ix), false); // CraftBukkit - decompile error
         });
         commandlistenerwrapper.sendMessage(new ChatMessage("commands.forceload.removed.all", new Object[] { dimensionmanager}), true);
         return 0;
@@ -106,7 +106,7 @@
             if (i2 > 256L) {
                 throw CommandForceload.a.create(Integer.valueOf(256), Long.valueOf(i2));
             } 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;