Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-27 00:22:46 +01:00
44 Zeilen
2.7 KiB
Diff
44 Zeilen
2.7 KiB
Diff
--- a/net/minecraft/server/CommandForceload.java
|
|
+++ b/net/minecraft/server/CommandForceload.java
|
|
@@ -47,7 +47,7 @@
|
|
|
|
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();
|
|
+ DimensionManager dimensionmanager = commandlistenerwrapper.getWorld().dimension; // CraftBukkit
|
|
boolean flag = commandlistenerwrapper.getServer().getWorldServer(dimensionmanager).getForceLoadedChunks().contains(chunkcoordintpair.pair());
|
|
|
|
if (flag) {
|
|
@@ -59,7 +59,7 @@
|
|
}
|
|
|
|
private static int a(CommandListenerWrapper commandlistenerwrapper) {
|
|
- DimensionManager dimensionmanager = commandlistenerwrapper.getWorld().getWorldProvider().getDimensionManager();
|
|
+ DimensionManager dimensionmanager = commandlistenerwrapper.getWorld().dimension; // CraftBukkit
|
|
LongSet longset = commandlistenerwrapper.getServer().getWorldServer(dimensionmanager).getForceLoadedChunks();
|
|
int i = longset.size();
|
|
|
|
@@ -79,11 +79,11 @@
|
|
}
|
|
|
|
private static int b(CommandListenerWrapper commandlistenerwrapper) {
|
|
- DimensionManager dimensionmanager = commandlistenerwrapper.getWorld().getWorldProvider().getDimensionManager();
|
|
+ DimensionManager dimensionmanager = commandlistenerwrapper.getWorld().dimension; // CraftBukkit
|
|
WorldServer worldserver = commandlistenerwrapper.getServer().getWorldServer(dimensionmanager);
|
|
LongSet longset = worldserver.getForceLoadedChunks();
|
|
|
|
- longset.forEach((i) -> {
|
|
+ longset.forEach((java.util.function.LongConsumer) (i) -> { // CraftBukkit - decompile error
|
|
worldserver.setForceLoaded(ChunkCoordIntPair.getX(i), ChunkCoordIntPair.getZ(i), false);
|
|
});
|
|
commandlistenerwrapper.sendMessage(new ChatMessage("commands.forceload.removed.all", new Object[] { dimensionmanager}), true);
|
|
@@ -106,7 +106,7 @@
|
|
if (i2 > 256L) {
|
|
throw CommandForceload.a.create(256, i2);
|
|
} else {
|
|
- DimensionManager dimensionmanager = commandlistenerwrapper.getWorld().getWorldProvider().getDimensionManager();
|
|
+ DimensionManager dimensionmanager = commandlistenerwrapper.getWorld().dimension; // CraftBukkit
|
|
WorldServer worldserver = commandlistenerwrapper.getServer().getWorldServer(dimensionmanager);
|
|
ChunkCoordIntPair chunkcoordintpair = null;
|
|
int j2 = 0;
|