From 71377916c9328d06e1ee2cdfbe5c9a0894644495 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ossi=20Erkkil=C3=A4?= Date: Thu, 7 Nov 2024 20:39:05 +0200 Subject: [PATCH 1/4] Add key for item model --- SpongeAPI | 2 +- .../common/data/provider/item/stack/ItemStackData.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/SpongeAPI b/SpongeAPI index 3e5a2ce6632..584932b5e86 160000 --- a/SpongeAPI +++ b/SpongeAPI @@ -1 +1 @@ -Subproject commit 3e5a2ce6632f6eeae1461630ac0149cacdf6e8db +Subproject commit 584932b5e864dc597e89eb2f0e0f45e406771a77 diff --git a/src/main/java/org/spongepowered/common/data/provider/item/stack/ItemStackData.java b/src/main/java/org/spongepowered/common/data/provider/item/stack/ItemStackData.java index 4b991d5a3ca..5fbc6f83717 100644 --- a/src/main/java/org/spongepowered/common/data/provider/item/stack/ItemStackData.java +++ b/src/main/java/org/spongepowered/common/data/provider/item/stack/ItemStackData.java @@ -183,6 +183,9 @@ public static void register(final DataProviderRegistrator registrator) { return true; }) .supports(h -> !h.has(DataComponents.MAX_DAMAGE)) + .create(Keys.MODEL) + .get(stack -> (ResourceKey) (Object) stack.get(DataComponents.ITEM_MODEL)) + .set((stack, model) -> stack.set(DataComponents.ITEM_MODEL, (ResourceLocation) (Object) model)) .create(Keys.ITEM_DURABILITY) .get(stack -> stack.getMaxDamage() - stack.getDamageValue()) .set((stack, durability) -> stack.setDamageValue(stack.getMaxDamage() - durability)) From da2a41ed9db3ae25289b06747834313175b8bb48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ossi=20Erkkil=C3=A4?= Date: Fri, 8 Nov 2024 15:23:50 +0200 Subject: [PATCH 2/4] Bump API --- SpongeAPI | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SpongeAPI b/SpongeAPI index 584932b5e86..724c5519546 160000 --- a/SpongeAPI +++ b/SpongeAPI @@ -1 +1 @@ -Subproject commit 584932b5e864dc597e89eb2f0e0f45e406771a77 +Subproject commit 724c5519546fb011b7c6510f5f9e746a51b71d17 From 70b01db75d83078eba895ab71867ba9e071d43b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ossi=20Erkkil=C3=A4?= Date: Wed, 13 Nov 2024 15:13:02 +0200 Subject: [PATCH 3/4] Bump API --- SpongeAPI | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SpongeAPI b/SpongeAPI index 724c5519546..dd8b5c816e9 160000 --- a/SpongeAPI +++ b/SpongeAPI @@ -1 +1 @@ -Subproject commit 724c5519546fb011b7c6510f5f9e746a51b71d17 +Subproject commit dd8b5c816e906af2aa34e7deefcc84ba55243884 From 9cc4ed1392b0246039f0dd0322aa21a9cee67999 Mon Sep 17 00:00:00 2001 From: aromaa Date: Wed, 13 Nov 2024 17:47:50 +0200 Subject: [PATCH 4/4] Bump API --- SpongeAPI | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SpongeAPI b/SpongeAPI index dd8b5c816e9..d4641e160e8 160000 --- a/SpongeAPI +++ b/SpongeAPI @@ -1 +1 @@ -Subproject commit dd8b5c816e906af2aa34e7deefcc84ba55243884 +Subproject commit d4641e160e878274d3ac3599d27fc6f583f33acd