Fix can_place_on conversion and size check for item containers

This commit is contained in:
Joseph Burton 2024-05-02 20:23:15 +02:00
parent a8e49a12d3
commit 4a8b9a03eb

View File

@ -6816,7 +6816,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ case "minecraft:crafter": {
+ final ListType items = tileEntity.getList("Items", ObjectType.MAP);
+ tileEntity.remove("Items");
+ if (items != null && items.size() > 1) {
+ if (items != null && items.size() > 0) {
+ transientItem.componentSetList("minecraft:container", items);
+
+ for (int i = 0, len = items.size(); i < len; ++i) {
@ -22678,7 +22678,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ walkBlockPredicates(canBreak, fromVersion, toVersion);
+ }
+
+ final MapType<String> canPlaceOn = root.getMap("minecraft:can_break");
+ final MapType<String> canPlaceOn = root.getMap("minecraft:can_place_on");
+ if (canPlaceOn != null) {
+ final ListType predicates = canPlaceOn.getList("predicates", ObjectType.MAP);
+ if (predicates != null) {