SteamWar/FightSystem
Archiviert
13
1

Possible 1.8 world reset fix

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2021-09-03 17:32:49 +02:00
Ursprung fe19c1656d
Commit fe90f31c4a

Datei anzeigen

@ -39,6 +39,7 @@ public class CraftbukkitWrapper8 implements CraftbukkitWrapper.ICraftbukkitWrapp
public void resetChunk(World world, World backup, int x, int z) { public void resetChunk(World world, World backup, int x, int z) {
net.minecraft.server.v1_8_R3.World w = ((CraftWorld) world).getHandle(); net.minecraft.server.v1_8_R3.World w = ((CraftWorld) world).getHandle();
Chunk chunk = w.getChunkAt(x, z); Chunk chunk = w.getChunkAt(x, z);
((CraftWorld) backup).getHandle().chunkProviderServer.forceChunkLoad = true;
Chunk backupChunk = ((CraftWorld) backup).getHandle().getChunkAt(x, z); Chunk backupChunk = ((CraftWorld) backup).getHandle().getChunkAt(x, z);
System.arraycopy(backupChunk.getSections(), 0, chunk.getSections(), 0, chunk.getSections().length); System.arraycopy(backupChunk.getSections(), 0, chunk.getSections(), 0, chunk.getSections().length);