mirror of
https://github.com/taoneill/war.git
synced 2025-01-03 06:17:33 +01:00
Remove deprecated legacy materials
By deleting the entire unused methods
This commit is contained in:
parent
99b6bdb3dd
commit
8b76d2068f
@ -261,63 +261,6 @@ public class Volume {
|
||||
}
|
||||
}
|
||||
|
||||
public void replaceMaterial(Material original, Material replacement) {
|
||||
Validate.isTrue(this.hasTwoCorners(), "Incomplete volume");
|
||||
for (int x = this.getMinX(); x <= this.getMaxX(); x++) {
|
||||
for (int y = this.getMinY(); y <= this.getMaxY(); y++) {
|
||||
for (int z = this.getMinZ(); z <= this.getMaxZ(); z++) {
|
||||
if (this.getWorld().getBlockAt(x, y, z).getType() == original) {
|
||||
this.getWorld().getBlockAt(x, y, z).setType(replacement);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void replaceMaterials(Material[] materials, Material replacement) {
|
||||
for (Material mat: materials) {
|
||||
this.replaceMaterial(mat, replacement);
|
||||
}
|
||||
}
|
||||
|
||||
public void clearBlocksThatDontFloat() {
|
||||
Validate.isTrue(this.hasTwoCorners(), "Incomplete volume");
|
||||
for (int x = this.getMinX(); x <= this.getMaxX(); x++) {
|
||||
for (int y = this.getMinY(); y <= this.getMaxY(); y++) {
|
||||
for (int z = this.getMinZ(); z <= this.getMaxZ(); z++) {
|
||||
switch (this.getWorld().getBlockAt(x, y, z).getType()) {
|
||||
case SIGN:
|
||||
case WALL_SIGN:
|
||||
case IRON_DOOR:
|
||||
case LEGACY_SAPLING:
|
||||
case LADDER:
|
||||
case DANDELION_YELLOW:
|
||||
case ROSE_RED:
|
||||
case RED_MUSHROOM:
|
||||
case BROWN_MUSHROOM:
|
||||
case OAK_SAPLING:
|
||||
case TORCH:
|
||||
case RAIL:
|
||||
case STONE_BUTTON:
|
||||
case STONE_PRESSURE_PLATE:
|
||||
case LEGACY_WOOD_PLATE:
|
||||
case LEVER:
|
||||
case REDSTONE:
|
||||
case LEGACY_REDSTONE_TORCH_ON:
|
||||
case LEGACY_REDSTONE_TORCH_OFF:
|
||||
case CACTUS:
|
||||
case SNOW:
|
||||
case ICE:
|
||||
this.getWorld().getBlockAt(x, y, z)
|
||||
.setType(Material.AIR);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finalize() {
|
||||
this.blocks.clear();
|
||||
|
Loading…
Reference in New Issue
Block a user