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:
@@ -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);
|
||||||
|
|||||||
@@ -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),
|
||||||
|
|||||||
Reference in New Issue
Block a user