|
10 | 10 | import net.minecraft.client.model.geom.builders.CubeDeformation; |
11 | 11 | import net.minecraft.client.model.geom.builders.CubeListBuilder; |
12 | 12 | import net.minecraft.client.player.AbstractClientPlayer; |
| 13 | +import net.minecraft.core.Direction; |
13 | 14 | import org.apache.logging.log4j.Logger; |
14 | 15 |
|
15 | 16 | import java.util.*; |
16 | 17 |
|
17 | 18 | public class GeometryUtil { |
| 19 | + // Copied from CubeListBuilder |
| 20 | + private static final Set<Direction> ALL_VISIBLE = EnumSet.allOf(Direction.class); |
| 21 | + |
18 | 22 | private final Logger logger; |
19 | 23 |
|
20 | 24 | public GeometryUtil(Logger logger) { |
@@ -104,8 +108,8 @@ public BedrockPlayerEntityModel<AbstractClientPlayer> bedrockGeoToJava(SkinInfo |
104 | 108 | // The Y needs to be inverted, for whatever reason |
105 | 109 | // https://github.com/JannisX11/blockbench/blob/8529c0adee8565f8dac4b4583c3473b60679966d/js/transform.js#L148 |
106 | 110 | cuboids.add(new ModelPart.Cube((int) uv.get(0).getAsFloat(), (int) uv.get(1).getAsFloat(), |
107 | | - (originX - pivotX), (((originY + sizeY) * -1) + pivotY), (originZ - pivotZ), |
108 | | - sizeX, sizeY, sizeZ, inflate, inflate, inflate, mirrored, uvHeight, uvWidth)); |
| 111 | + (originX - pivotX), (-(originY + sizeY) + pivotY), (originZ - pivotZ), |
| 112 | + sizeX, sizeY, sizeZ, inflate, inflate, inflate, mirrored, uvHeight, uvWidth, ALL_VISIBLE)); |
109 | 113 | } |
110 | 114 | } |
111 | 115 |
|
|
0 commit comments