Skip to content

Commit 1dd9ba3

Browse files
Fix: Allow items to be worn as hats if their Java base items also allow it (#4885)
1 parent b248abf commit 1dd9ba3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

core/src/main/java/org/geysermc/geyser/registry/populator/CustomItemRegistryPopulator.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,13 @@ private static NbtMapBuilder createComponentNbt(CustomItemData customItemData, I
199199
computeThrowableProperties(componentBuilder);
200200
}
201201

202-
computeRenderOffsets(false, customItemData, componentBuilder);
202+
// Hardcoded on Java, and should extend to the custom item
203+
boolean isHat = (javaItem.equals(Items.SKELETON_SKULL) || javaItem.equals(Items.WITHER_SKELETON_SKULL)
204+
|| javaItem.equals(Items.CARVED_PUMPKIN) || javaItem.equals(Items.ZOMBIE_HEAD)
205+
|| javaItem.equals(Items.PIGLIN_HEAD) || javaItem.equals(Items.DRAGON_HEAD)
206+
|| javaItem.equals(Items.CREEPER_HEAD) || javaItem.equals(Items.PLAYER_HEAD)
207+
);
208+
computeRenderOffsets(isHat, customItemData, componentBuilder);
203209

204210
componentBuilder.putCompound("item_properties", itemProperties.build());
205211
builder.putCompound("components", componentBuilder.build());

0 commit comments

Comments
 (0)