mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 02:04:44 +02:00
PlotBlock cache / events / flags
This commit is contained in:
@ -153,7 +153,7 @@ public class SpongeUtil extends WorldUtil {
|
||||
if (state.getType() == BlockTypes.AIR) {
|
||||
continue;
|
||||
}
|
||||
PlotBlock plotBlock = new PlotBlock((short) (i & 0xFFF), (byte) (i >> 12 & 0xF));
|
||||
PlotBlock plotBlock = PlotBlock.get((short) (i & 0xFFF), (byte) (i >> 12 & 0xF));
|
||||
stateArray[i] = state;
|
||||
stateMap.put(state, plotBlock);
|
||||
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException ignored) {
|
||||
@ -301,7 +301,7 @@ public class SpongeUtil extends WorldUtil {
|
||||
match = comparison.match;
|
||||
id = SpongeUtil.getPlotBlock(comparison.best.getDefaultState()).id;
|
||||
}
|
||||
PlotBlock block = new PlotBlock(id, data);
|
||||
PlotBlock block = PlotBlock.get(id, data);
|
||||
StringComparison<PlotBlock> outer = new StringComparison<PlotBlock>();
|
||||
return outer.new ComparisonResult(match, block);
|
||||
|
||||
|
@ -39,7 +39,7 @@ public class SlowChunk extends PlotChunk<Chunk> {
|
||||
if (id == this.lastBlock.id && data == this.lastBlock.data) {
|
||||
this.result[MainUtil.CACHE_I[x][y][z]][MainUtil.CACHE_J[x][y][z]] = this.lastBlock;
|
||||
} else {
|
||||
this.result[MainUtil.CACHE_I[x][y][z]][MainUtil.CACHE_J[x][y][z]] = new PlotBlock((short) id, data);
|
||||
this.result[MainUtil.CACHE_I[x][y][z]][MainUtil.CACHE_J[x][y][z]] = PlotBlock.get((short) id, data);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user