From 3a4fb0e43d5b0ab5d3114d500dcd5a934a5c10a1 Mon Sep 17 00:00:00 2001 From: Jozufozu Date: Mon, 6 Dec 2021 17:19:21 -0800 Subject: [PATCH] Do a 180 - Fix inconsistency in minecart model --- .../java/com/jozufozu/flywheel/core/model/PartBuilder.java | 6 ++++++ .../com/jozufozu/flywheel/vanilla/MinecartInstance.java | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/jozufozu/flywheel/core/model/PartBuilder.java b/src/main/java/com/jozufozu/flywheel/core/model/PartBuilder.java index e4d811eb2..9edb6e721 100644 --- a/src/main/java/com/jozufozu/flywheel/core/model/PartBuilder.java +++ b/src/main/java/com/jozufozu/flywheel/core/model/PartBuilder.java @@ -136,6 +136,12 @@ public class PartBuilder { return this; } + public CuboidBuilder rotateZ(float z) { + useRotation = true; + this.rotationZ = z; + return this; + } + public CuboidBuilder sprite(TextureAtlasSprite sprite) { this.sprite = sprite; return this; diff --git a/src/main/java/com/jozufozu/flywheel/vanilla/MinecartInstance.java b/src/main/java/com/jozufozu/flywheel/vanilla/MinecartInstance.java index 7d097f89b..ad3346a30 100644 --- a/src/main/java/com/jozufozu/flywheel/vanilla/MinecartInstance.java +++ b/src/main/java/com/jozufozu/flywheel/vanilla/MinecartInstance.java @@ -156,7 +156,7 @@ public class MinecartInstance extends EntityInstance private IModel getBodyModel() { int y = -3; return ModelPart.builder("minecart", 64, 32) - .cuboid().invertYZ().start(-10, -8, -y).size(20, 16, 2).textureOffset(0, 10).rotateX(((float)Math.PI / 2F)).endCuboid() + .cuboid().invertYZ().start(-10, -8, -y).size(20, 16, 2).textureOffset(0, 10).rotateZ((float) Math.PI).rotateX(((float)Math.PI / 2F)).endCuboid() .cuboid().invertYZ().start(-8, y, -10).size(16, 8, 2).rotateY(((float)Math.PI * 1.5F)).endCuboid() .cuboid().invertYZ().start(-8, y, -10).size(16, 8, 2).rotateY(((float)Math.PI / 2F)).endCuboid() .cuboid().invertYZ().start(-8, y, -8).size(16, 8, 2).rotateY((float)Math.PI).endCuboid()