Fix polymer support in 1.21.4

You can now enjoy This Rocks on vanilla clients again :)
This commit is contained in:
Martin Prokoph
2025-01-11 20:21:57 +01:00
parent 663e85e9a8
commit dd028ccc8f
5 changed files with 19 additions and 17 deletions

View File

@@ -30,7 +30,7 @@ public class StarfishItemPolymer extends BlockItem implements PolymerItem {
var state = itemStack.getComponents().get(DataComponentTypes.BLOCK_STATE);
if (state != null && !state.isEmpty()) {
StarfishVariation variation = state.getValue(RocksMain.STARFISH_VARIATION);
if (variation != null) return ResourcePackExtras.bridgeModel(polymerId(variation + "_starfish"));
if (variation != null) return ResourcePackExtras.bridgeModel(polymerId("item/"+variation + "_starfish"));
}
return itemStack.get(DataComponentTypes.ITEM_MODEL);
}