1
0
mirror of https://github.com/GeyserMC/Rainbow.git synced 2025-12-19 14:59:16 +00:00

Fix writing size to rotation key in cube geometry

This commit is contained in:
Eclipse
2025-07-04 15:48:28 +00:00
parent d24203b0bf
commit 90414cbb88
2 changed files with 3 additions and 1 deletions

View File

@@ -94,6 +94,8 @@ public class BedrockItemMapper {
if (layer0Texture != null) { if (layer0Texture != null) {
texture = layer0Texture.texture(); texture = layer0Texture.texture();
} else { } else {
// Unknown texture (doesn't use layer0), so we immediately assume the geometry is custom
// This check should probably be done differently
customGeometry = Optional.of((SimpleUnbakedGeometry) itemModel.getTopGeometry()); customGeometry = Optional.of((SimpleUnbakedGeometry) itemModel.getTopGeometry());
} }
context.create(bedrockIdentifier, texture, handheld, customGeometry); context.create(bedrockIdentifier, texture, handheld, customGeometry);

View File

@@ -205,7 +205,7 @@ public record BedrockGeometry(BedrockVersion formatVersion, List<GeometryDefinit
instance.group( instance.group(
ExtraCodecs.VECTOR3F.fieldOf("origin").forGetter(Cube::origin), ExtraCodecs.VECTOR3F.fieldOf("origin").forGetter(Cube::origin),
ExtraCodecs.VECTOR3F.fieldOf("size").forGetter(Cube::size), ExtraCodecs.VECTOR3F.fieldOf("size").forGetter(Cube::size),
ExtraCodecs.VECTOR3F.optionalFieldOf("rotation", VECTOR3F_ZERO).forGetter(Cube::size), ExtraCodecs.VECTOR3F.optionalFieldOf("rotation", VECTOR3F_ZERO).forGetter(Cube::rotation),
ExtraCodecs.VECTOR3F.optionalFieldOf("pivot", VECTOR3F_ZERO).forGetter(Cube::pivot), ExtraCodecs.VECTOR3F.optionalFieldOf("pivot", VECTOR3F_ZERO).forGetter(Cube::pivot),
Codec.FLOAT.optionalFieldOf("inflate", 0.0F).forGetter(Cube::inflate), Codec.FLOAT.optionalFieldOf("inflate", 0.0F).forGetter(Cube::inflate),
Codec.BOOL.optionalFieldOf("mirror", false).forGetter(Cube::mirror), Codec.BOOL.optionalFieldOf("mirror", false).forGetter(Cube::mirror),