Remove deprecated legacy materials

By deleting the entire unused methods
This commit is contained in:
Connor Monahan 2018-11-19 14:37:06 -06:00
parent 99b6bdb3dd
commit 8b76d2068f

View File

@ -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();