From 6b933463cf1ea7b6e4c26670d021db4f260d07c7 Mon Sep 17 00:00:00 2001 From: hhhzzzsss Date: Sun, 26 May 2024 01:17:35 -0500 Subject: [PATCH] Add upper half blocks to cleanup exclusion --- .../hhhzzzsss/songplayer/playing/SongHandler.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/com/github/hhhzzzsss/songplayer/playing/SongHandler.java b/src/main/java/com/github/hhhzzzsss/songplayer/playing/SongHandler.java index 7830c72..dc4c5cd 100644 --- a/src/main/java/com/github/hhhzzzsss/songplayer/playing/SongHandler.java +++ b/src/main/java/com/github/hhhzzzsss/songplayer/playing/SongHandler.java @@ -773,6 +773,16 @@ public class SongHandler { ); } private boolean isPlaceable(BlockState bs) { + Map, Comparable> entries = bs.getEntries(); + for (Map.Entry, 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;