diff --git a/patches/server/General-ItemMeta-fixes.patch b/patches/server/General-ItemMeta-fixes.patch index 2d713e35ae..6b12704dec 100644 --- a/patches/server/General-ItemMeta-fixes.patch +++ b/patches/server/General-ItemMeta-fixes.patch @@ -2051,6 +2051,37 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + // 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftCustomModelDataComponent.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftCustomModelDataComponent.java +@@ -0,0 +0,0 @@ public final class CraftCustomModelDataComponent implements CustomModelDataCompo + + @Override + public void setFlags(List 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 +@@ -0,0 +0,0 @@ public final class CraftCustomModelDataComponent implements CustomModelDataCompo + + @Override + public void setStrings(List 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 +@@ -0,0 +0,0 @@ public final class CraftCustomModelDataComponent implements CustomModelDataCompo + + @Override + public void setColors(List 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftEquippableComponent.java