Fix depot rendering and potato cannon model

- Upright items were reflected when rendered on depots
- Potato cannon model had itself as parent and faces with invalid
texture
This commit is contained in:
PepperBell 2021-07-14 15:12:59 -07:00
parent 2b1a76039e
commit 777d47ca8b
2 changed files with 2 additions and 5 deletions

View file

@ -117,10 +117,10 @@ public class DepotRenderer extends SafeTileEntityRenderer<DepotTileEntity> {
Vector3d positionVec = renderViewEntity.getPositionVec();
Vector3d vectorForOffset = itemPosition;
Vector3d diff = vectorForOffset.subtract(positionVec);
float yRot = (float) MathHelper.atan2(diff.z, -diff.x);
float yRot = (float) -MathHelper.atan2(diff.z, diff.x);
ms.multiply(Vector3f.POSITIVE_Y.getRadialQuaternion((float) (yRot - Math.PI / 2)));
}
ms.translate(0, 3 / 32d, 1 / 16f);
ms.translate(0, 3 / 32d, -1 / 16f);
}
for (int i = 0; i <= count; i++) {

View file

@ -1,6 +1,5 @@
{
"credit": "Made with Blockbench",
"parent": "create:item/potato_cannon/item",
"texture_size": [32, 32],
"textures": {
"1": "create:item/potato_cannon",
@ -12,7 +11,6 @@
"to": [9.5, 10, 6.5],
"rotation": {"angle": 0, "axis": "y", "origin": [7, 7.6, 11]},
"faces": {
"north": {"uv": [7.5, 1, 9.5, 4], "texture": "#missing"},
"east": {"uv": [4, 2, 0, 3.5], "texture": "#1"},
"south": {"uv": [10, 6, 11.5, 7.5], "texture": "#1"},
"west": {"uv": [0, 2, 4, 3.5], "texture": "#1"},
@ -63,7 +61,6 @@
"to": [9, 6, 15.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 7.6, 11]},
"faces": {
"north": {"uv": [13, 13, 15, 15], "texture": "#missing"},
"east": {"uv": [0.5, 10, 1, 11], "texture": "#1"},
"west": {"uv": [0.5, 10, 1, 11], "texture": "#1"},
"up": {"uv": [0.5, 10, 1, 10.25], "rotation": 90, "texture": "#1"},