Skip to content

Commit

Permalink
Fix piglin head scale and translation when used as hat.
Browse files Browse the repository at this point in the history
  • Loading branch information
leMaik committed Oct 6, 2023
1 parent 6d942d9 commit aaff8d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion chunky/src/java/se/llbit/chunky/entity/PlayerEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ public static void addArmor(Collection<Primitive> faces,
faces.addAll(head.primitives(Transform.NONE.scale(1.2).translate(0.5, 0.5, 0.5).chain(transform)));
} else if (headItemId.equals("minecraft:piglin_head")) {
SkullEntity skull = new SkullEntity(new Vector3(), Kind.PIGLIN, 0, 1);
faces.addAll(skull.piglinHeadPrimitives(Transform.NONE.scale(1.1).translate(0.5, 0.5, 0.5).chain(transform)));
faces.addAll(skull.piglinHeadPrimitives(Transform.NONE.scale(1.2).translate(0.5, 0.5, 0.5).chain(transform)));
} else {
addModel(faces, getHelmModel(headItem), transform);
}
Expand Down
5 changes: 3 additions & 2 deletions chunky/src/java/se/llbit/chunky/entity/SkullEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -605,8 +605,9 @@ public Collection<Primitive> dragonHeadPrimitives(Transform transform) {
}

public Collection<Primitive> piglinHeadPrimitives(Transform transform) {
transform = Transform.NONE.chain(transform)
.translate(0, -4 / 16., 0);
transform = Transform.NONE
.translate(0, -4 / 16., 0)
.chain(transform);
Collection<Primitive> faces = new LinkedList<>();
Material material = new TextureMaterial(Texture.piglin);
for (Quad quad : piglinHead) {
Expand Down

0 comments on commit aaff8d2

Please sign in to comment.