mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Fixes #242
This commit is contained in:
parent
80a3c14189
commit
29cf1326f6
@ -63,11 +63,15 @@ public class AugmentedPopulator extends BlockPopulator {
|
||||
}
|
||||
}
|
||||
|
||||
private short[][] x_loc;
|
||||
private short[][] y_loc;
|
||||
private short[][] z_loc;
|
||||
private static short[][] x_loc;
|
||||
private static short[][] y_loc;
|
||||
private static short[][] z_loc;
|
||||
|
||||
public AugmentedPopulator(final String world, final PlotGenerator generator, final PlotCluster cluster, final boolean p, final boolean b) {
|
||||
if (x_loc == null) {
|
||||
x_loc = new short[16][4096];
|
||||
y_loc = new short[16][4096];
|
||||
z_loc = new short[16][4096];
|
||||
for (int i = 0; i < 16; i++) {
|
||||
int i4 = i << 4;
|
||||
for (int j = 0; j < 4096; j++) {
|
||||
@ -80,6 +84,7 @@ public class AugmentedPopulator extends BlockPopulator {
|
||||
z_loc[i][j] = (short) z1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.cluster = cluster;
|
||||
this.generator = generator;
|
||||
@ -113,7 +118,6 @@ public class AugmentedPopulator extends BlockPopulator {
|
||||
@Override
|
||||
public void populate(final World world, final Random rand, final Chunk chunk) {
|
||||
if (this.plotworld.TERRAIN == 3) {
|
||||
// FIXME check CURRENT_PLOT_CLEAR && FORCE_PASTE
|
||||
return;
|
||||
}
|
||||
final int X = chunk.getX();
|
||||
|
@ -76,6 +76,19 @@ public abstract class PlotPopulator extends BlockPopulator {
|
||||
* @param data
|
||||
*/
|
||||
public void setBlock(int x, int y, int z, byte data) {
|
||||
if (data != 0) {
|
||||
world.getBlockAt(X + x, y, Z + z).setData(data);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Like setblock, but lacks the data != 0 check
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
* @param data
|
||||
*/
|
||||
public void setBlockAbs(int x, int y, int z, byte data) {
|
||||
world.getBlockAt(X + x, y, Z + z).setData(data);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user