Compare commits

..
1 Commits
Author SHA1 Message Date
Chitak 985 89057ebb2d Clean up empty NBT when clearing projector channels (#75) 2026-09-20 09:13:19 +08:00
@@ -146,7 +146,12 @@ public class ChannelDataAccessor {
*/
public static void wipeChannelData(ItemStack masterStack) {
if (masterStack == null) throw new IllegalArgumentException();
if (masterStack.stackTagCompound != null) masterStack.stackTagCompound.removeTag(SECONDARY_HINT_TAG);
if (masterStack.stackTagCompound != null) {
masterStack.stackTagCompound.removeTag(SECONDARY_HINT_TAG);
if (masterStack.stackTagCompound.hasNoTags()) {
masterStack.stackTagCompound = null;
}
}
}
/**