mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-26 22:40:21 +01:00
fix item meta
This commit is contained in:
parent
0891cf604b
commit
6d270af78c
1 changed files with 31 additions and 0 deletions
|
@ -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<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
|
||||
@@ -0,0 +0,0 @@ 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
|
||||
@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftEquippableComponent.java
|
||||
|
|
Loading…
Reference in a new issue