Add upper half blocks to cleanup exclusion

This commit is contained in:
hhhzzzsss 2024-05-26 01:17:35 -05:00
parent d8f8f96610
commit 6b933463cf

View file

@ -773,6 +773,16 @@ public class SongHandler {
);
}
private boolean isPlaceable(BlockState bs) {
Map<Property<?>, Comparable<?>> entries = bs.getEntries();
for (Map.Entry<Property<?>, Comparable<?>> entry : entries.entrySet()) {
Property<?> property = entry.getKey();
Comparable<?> value = entry.getValue();
String propertyName = property.getName();
String valueName = net.minecraft.util.Util.getValueAsString(property, value);
if (propertyName == "half" && valueName == "upper") {
return false;
}
}
Block block = bs.getBlock();
if (bs.isAir() || bs.isLiquid()) {
return false;