Skip to content

Commit

Permalink
make generated items render with 180° rotation offset
Browse files Browse the repository at this point in the history
gliscowo committed Jun 15, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 2e5bd51 commit dc3a03f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ public class ItemRenderable extends DefaultRenderable<DefaultPropertyBundle> {

static {
PROPERTIES.slant.setDefaultValue(0).setToDefault();
PROPERTIES.rotation.setDefaultValue(180).setToDefault();
PROPERTIES.rotation.setDefaultValue(0).setToDefault();
}

private final ItemStack stack;
@@ -42,6 +42,8 @@ public void emitVertices(MatrixStack matrices, VertexConsumerProvider vertexCons
matrices.multiply(Vec3f.POSITIVE_Y.getDegreesQuaternion(-this.properties().rotation.get()));
matrices.multiply(Vec3f.POSITIVE_X.getDegreesQuaternion(30));
matrices.multiply(Vec3f.POSITIVE_Y.getDegreesQuaternion(this.properties().rotation.get() + 135));
} else {
matrices.multiply(Vec3f.POSITIVE_Y.getDegreesQuaternion(180));
}

itemRenderer.renderItem(this.stack, ModelTransformation.Mode.FIXED, LightmapTextureManager.MAX_LIGHT_COORDINATE,

0 comments on commit dc3a03f

Please sign in to comment.