3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-11-16 04:50:07 +01:00

Fix: Allow items to be worn as hats if their Java base items also allow it (#4885)

Dieser Commit ist enthalten in:
chris 2024-07-22 07:24:21 +02:00 committet von GitHub
Ursprung b248abf495
Commit 1dd9ba3fb6
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194

Datei anzeigen

@ -199,7 +199,13 @@ public class CustomItemRegistryPopulator {
computeThrowableProperties(componentBuilder);
}
computeRenderOffsets(false, customItemData, componentBuilder);
// Hardcoded on Java, and should extend to the custom item
boolean isHat = (javaItem.equals(Items.SKELETON_SKULL) || javaItem.equals(Items.WITHER_SKELETON_SKULL)
|| javaItem.equals(Items.CARVED_PUMPKIN) || javaItem.equals(Items.ZOMBIE_HEAD)
|| javaItem.equals(Items.PIGLIN_HEAD) || javaItem.equals(Items.DRAGON_HEAD)
|| javaItem.equals(Items.CREEPER_HEAD) || javaItem.equals(Items.PLAYER_HEAD)
);
computeRenderOffsets(isHat, customItemData, componentBuilder);
componentBuilder.putCompound("item_properties", itemProperties.build());
builder.putCompound("components", componentBuilder.build());