mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-15 11:54:43 +02:00
Potential fixes
This commit is contained in:
@ -22,15 +22,15 @@ public abstract class BukkitPlotPopulator extends BlockPopulator {
|
||||
public int X;
|
||||
public int Z;
|
||||
public String worldname;
|
||||
private World world;
|
||||
private Chunk chunk;
|
||||
|
||||
@Override
|
||||
public void populate(final World world, final Random rand, final Chunk chunk) {
|
||||
try {
|
||||
this.world = world;
|
||||
this.chunk = chunk;
|
||||
worldname = world.getName();
|
||||
X = chunk.getX() << 4;
|
||||
Z = chunk.getZ() << 4;
|
||||
X = this.chunk.getX() << 4;
|
||||
Z = this.chunk.getZ() << 4;
|
||||
if (ChunkManager.FORCE_PASTE) {
|
||||
for (short x = 0; x < 16; x++) {
|
||||
for (short z = 0; z < 16; z++) {
|
||||
@ -92,7 +92,7 @@ public abstract class BukkitPlotPopulator extends BlockPopulator {
|
||||
*/
|
||||
public void setBlock(final int x, final int y, final int z, final byte data) {
|
||||
if (data != 0) {
|
||||
world.getBlockAt(X + x, y, Z + z).setData(data);
|
||||
chunk.getBlock(x, y, z).setData(data);
|
||||
}
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ public abstract class BukkitPlotPopulator extends BlockPopulator {
|
||||
* @param data
|
||||
*/
|
||||
public void setBlockAbs(final int x, final int y, final int z, final byte data) {
|
||||
world.getBlockAt(X + x, y, Z + z).setData(data);
|
||||
chunk.getBlock(x, y, z).setData(data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -107,7 +107,6 @@ public class HybridPop extends BukkitPlotPopulator {
|
||||
|
||||
@Override
|
||||
public void populate(final World world, final RegionWrapper requiredRegion, final PseudoRandom random, final int cx, final int cz) {
|
||||
PS.get().getPlotManager(world.getName());
|
||||
PS.get().getPlotManager(world.getName());
|
||||
int sx = (short) ((X - plotworld.ROAD_OFFSET_X) % size);
|
||||
int sz = (short) ((Z - plotworld.ROAD_OFFSET_Z) % size);
|
||||
|
Reference in New Issue
Block a user