Ignoring wool block when spawning floor
This commit is contained in:
parent
73604bfa1a
commit
a0d82cd1c0
@ -277,7 +277,7 @@ public class DiscoParty {
|
|||||||
}
|
}
|
||||||
|
|
||||||
loc = player.getLocation();
|
loc = player.getLocation();
|
||||||
this.spawnFloor(world, new Location(world,loc.getBlockX(),loc.getBlockY()-1,loc.getBlockZ()));
|
this.spawnFloor(world, new Location(world, loc.getBlockX(), loc.getBlockY() - 1, loc.getBlockZ()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void spawnSheep(World world, Location loc) {
|
void spawnSheep(World world, Location loc) {
|
||||||
@ -304,9 +304,11 @@ public class DiscoParty {
|
|||||||
for (int x = loc.getBlockX() - this.radius; x < loc.getX() + this.radius; ++x) {
|
for (int x = loc.getBlockX() - this.radius; x < loc.getX() + this.radius; ++x) {
|
||||||
for (int z = loc.getBlockZ() - this.radius; z < loc.getZ() + this.radius; ++z) {
|
for (int z = loc.getBlockZ() - this.radius; z < loc.getZ() + this.radius; ++z) {
|
||||||
Block block = world.getBlockAt(x, loc.getBlockY(), z);
|
Block block = world.getBlockAt(x, loc.getBlockY(), z);
|
||||||
this.getFloorCache().add(block.getState());
|
if (block.getType() != Material.WOOL) {
|
||||||
block.setType(Material.WOOL);
|
this.getFloorCache().add(block.getState());
|
||||||
this.getFloorBlocks().add(block);
|
block.setType(Material.WOOL);
|
||||||
|
this.getFloorBlocks().add(block);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user