aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJoseph Burton <[email protected]>2024-05-02 20:23:15 +0200
committerNassim Jahnke <[email protected]>2024-05-02 20:23:15 +0200
commit0db72ac19e735d398e85b2152d5a32317bb03dc8 (patch)
treec43970eb34bd19c7b444bbbe16b71663797b0fc5
parent59fe7ccc3b067676e5c8b85ccfac915c493f54d9 (diff)
downloadPaper-0db72ac19e735d398e85b2152d5a32317bb03dc8.tar.gz
Paper-0db72ac19e735d398e85b2152d5a32317bb03dc8.zip
Fix can_place_on conversion and size check for item containers
-rw-r--r--patches/server/0976-Rewrite-dataconverter-system.patch8
1 files changed, 4 insertions, 4 deletions
diff --git a/patches/server/0976-Rewrite-dataconverter-system.patch b/patches/server/0976-Rewrite-dataconverter-system.patch
index b37d24f651..d12fd08743 100644
--- a/patches/server/0976-Rewrite-dataconverter-system.patch
+++ b/patches/server/0976-Rewrite-dataconverter-system.patch
@@ -6572,7 +6572,7 @@ index 0000000000000000000000000000000000000000..4fa31e40b0a6f571a853299b4e242de9
+}
diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/converters/itemstack/ConverterItemStackToDataComponents.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/converters/itemstack/ConverterItemStackToDataComponents.java
new file mode 100644
-index 0000000000000000000000000000000000000000..1354b139f929010bdb090764d6151ac9569df753
+index 0000000000000000000000000000000000000000..a5a21d1c7579e45b78eae4b42a9f023db74acc0a
--- /dev/null
+++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/converters/itemstack/ConverterItemStackToDataComponents.java
@@ -0,0 +1,1244 @@
@@ -6816,7 +6816,7 @@ index 0000000000000000000000000000000000000000..1354b139f929010bdb090764d6151ac9
+ 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) {
@@ -22437,7 +22437,7 @@ index 0000000000000000000000000000000000000000..f50b81d931a1908d405bb72e0679983a
+}
diff --git a/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3818.java b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3818.java
new file mode 100644
-index 0000000000000000000000000000000000000000..15257d47a2c449290e428402a9fa1e955f07e341
+index 0000000000000000000000000000000000000000..29d256c2f5d5e338dc7abeb82c0f1ae99ee1edf7
--- /dev/null
+++ b/src/main/java/ca/spottedleaf/dataconverter/minecraft/versions/V3818.java
@@ -0,0 +1,339 @@
@@ -22678,7 +22678,7 @@ index 0000000000000000000000000000000000000000..15257d47a2c449290e428402a9fa1e95
+ 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) {