mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 15:16:45 +01:00
Fixed debugclear
This commit is contained in:
parent
ad20b79752
commit
63888827aa
@ -7,13 +7,14 @@ import com.intellectualcrafters.plot.object.ChunkLoc;
|
||||
import com.intellectualcrafters.plot.object.Location;
|
||||
import com.intellectualcrafters.plot.object.Plot;
|
||||
import com.intellectualcrafters.plot.object.PlotId;
|
||||
import com.intellectualcrafters.plot.object.PlotLoc;
|
||||
import com.intellectualcrafters.plot.object.RegionWrapper;
|
||||
|
||||
public abstract class ChunkManager {
|
||||
public static ChunkManager manager = null;
|
||||
public static RegionWrapper CURRENT_PLOT_CLEAR = null;
|
||||
public static HashMap<ChunkLoc, HashMap<Short, Short>> GENERATE_BLOCKS = new HashMap<>();
|
||||
public static HashMap<ChunkLoc, HashMap<Short, Byte>> GENERATE_DATA = new HashMap<>();
|
||||
public static HashMap<PlotLoc, HashMap<Short, Short>> GENERATE_BLOCKS = new HashMap<>();
|
||||
public static HashMap<PlotLoc, HashMap<Short, Byte>> GENERATE_DATA = new HashMap<>();
|
||||
|
||||
public static ChunkLoc getChunkChunk(final Location loc) {
|
||||
final int x = loc.getX() >> 9;
|
||||
|
@ -49,6 +49,7 @@ import com.intellectualcrafters.plot.object.ChunkLoc;
|
||||
import com.intellectualcrafters.plot.object.Location;
|
||||
import com.intellectualcrafters.plot.object.Plot;
|
||||
import com.intellectualcrafters.plot.object.PlotId;
|
||||
import com.intellectualcrafters.plot.object.PlotLoc;
|
||||
import com.intellectualcrafters.plot.object.RegionWrapper;
|
||||
import com.intellectualcrafters.plot.object.entity.EntityWrapper;
|
||||
import com.intellectualcrafters.plot.util.ChunkManager;
|
||||
@ -616,7 +617,7 @@ public class BukkitChunkManager extends ChunkManager {
|
||||
public static void saveBlocks(final World world, final int maxY, int x, int z, int offset_x, int offset_z) {
|
||||
final HashMap<Short, Short> ids = new HashMap<>();
|
||||
final HashMap<Short, Byte> datas = new HashMap<>();
|
||||
for (short y = 1; y < maxY; y++) {
|
||||
for (short y = 0; y < maxY; y++) {
|
||||
final Block block = world.getBlockAt(x, y, z);
|
||||
final short id = (short) block.getTypeId();
|
||||
if (id != 0) {
|
||||
@ -741,7 +742,7 @@ public class BukkitChunkManager extends ChunkManager {
|
||||
}
|
||||
}
|
||||
}
|
||||
final ChunkLoc loc = new ChunkLoc(x, z);
|
||||
final PlotLoc loc = new PlotLoc((short) x, (short) z);
|
||||
GENERATE_BLOCKS.put(loc, ids);
|
||||
GENERATE_DATA.put(loc, datas);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user