diff options
author | Lulu13022002 <[email protected]> | 2024-12-04 18:47:33 +0100 |
---|---|---|
committer | Lulu13022002 <[email protected]> | 2024-12-04 18:47:33 +0100 |
commit | b0d7153f50b46648cc27423f3417c31de97b60cb (patch) | |
tree | e004dc5371185a20d3274ae94233bc85c992e2f1 | |
parent | 1cc86be2b818298da3c77d304f72e680e5543c0e (diff) | |
download | Paper-b0d7153f50b46648cc27423f3417c31de97b60cb.tar.gz Paper-b0d7153f50b46648cc27423f3417c31de97b60cb.zip |
fix item meta
-rw-r--r-- | patches/server/0948-General-ItemMeta-fixes.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/patches/server/0948-General-ItemMeta-fixes.patch b/patches/server/0948-General-ItemMeta-fixes.patch index e90a5f290e..4986b0d71d 100644 --- a/patches/server/0948-General-ItemMeta-fixes.patch +++ b/patches/server/0948-General-ItemMeta-fixes.patch @@ -2051,6 +2051,37 @@ index 7c07ce8af54c367f7ba1b20a06d0879df6c46d54..1fc7af0f8e32bc7c07e187241d78220e + } + // Paper end - General ItemMeta Fixes } +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftCustomModelDataComponent.java b/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftCustomModelDataComponent.java +index 53de6a9b0e72b8bd519949d2b76efe9c558305c5..09c6d22f83895b734a39732b1ba99acc35b27881 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftCustomModelDataComponent.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftCustomModelDataComponent.java +@@ -67,7 +67,7 @@ public final class CraftCustomModelDataComponent implements CustomModelDataCompo + + @Override + public void setFlags(List<Boolean> flags) { +- this.handle = new CustomModelData(this.handle.floats(), new ArrayList<>(this.handle.flags()), this.handle.strings(), this.handle.colors()); ++ this.handle = new CustomModelData(this.handle.floats(), List.copyOf(flags), this.handle.strings(), this.handle.colors()); // Paper + } + + @Override +@@ -77,7 +77,7 @@ public final class CraftCustomModelDataComponent implements CustomModelDataCompo + + @Override + public void setStrings(List<String> strings) { +- this.handle = new CustomModelData(this.handle.floats(), this.handle.flags(), new ArrayList<>(this.handle.strings()), this.handle.colors()); ++ this.handle = new CustomModelData(this.handle.floats(), this.handle.flags(), List.copyOf(strings), this.handle.colors()); // Paper + } + + @Override +@@ -87,7 +87,7 @@ public final class CraftCustomModelDataComponent implements CustomModelDataCompo + + @Override + public void setColors(List<Color> colors) { +- this.handle = new CustomModelData(this.handle.floats(), this.handle.flags(), this.handle.strings(), new ArrayList<>(this.handle.colors())); ++ this.handle = new CustomModelData(this.handle.floats(), this.handle.flags(), this.handle.strings(), colors.stream().map(Color::asRGB).toList()); // Paper + } + + @Override diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftEquippableComponent.java b/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftEquippableComponent.java index eaa7c3b4988bd2b2c76dc32b44a087d88089074b..c3bfd621fdf00d400c1600a294262df60b0cd6a5 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftEquippableComponent.java |