feat: 假人多次生成bug修复及附魔机制修改

This commit is contained in:
Disy authored and zly2006 committed 2024-07-11 12:14:02 +08:00
1 parent 68c8482eee
commit a3e3fb361f
7 files changed
+55 -25

No files matched your search

@@ -30,11 +30,8 @@ public class ShulkerBoxItemUtil {
if (itemStack.getItem() instanceof BlockItem &&
((BlockItem) itemStack.getItem()).getBlock() instanceof ShulkerBoxBlock) {
NbtComponent tag = itemStack.getComponents().get(DataComponentTypes.BLOCK_ENTITY_DATA);
if (tag != null) {
if (tag.contains("Items")) {
NbtList tagList = tag.getNbt().getList("Items", 10);
return tagList.size() <= 0;
}
if (tag != null && tag.contains("Items")) {
return tag.getNbt().getList("Items", 10).isEmpty();
}
return true;
} else {