Skip to content

Commit

Permalink
Merge pull request #77 from Mesabrook-Development-Team/FixRegisterRen…
Browse files Browse the repository at this point in the history
…deringIssue

Fix messed up register TESR
  • Loading branch information
CSX8600 authored Mar 19, 2024
2 parents c9d5acc + 7d063d0 commit 2691dbc
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 346 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,22 @@ private void setupMatrix(TileEntityRegister te, double x, double y, double z)
{
GlStateManager.pushMatrix();
GlStateManager.disableLighting();
GlStateManager.translate(x + 0.5, y + 0.5, z + 0.68);
IBlockState registerState = getWorld().getBlockState(te.getPos());
IBlockState registerState = getWorld().getBlockState(te.getPos());
switch(registerState.getValue(BlockRegister.FACING))
{
case NORTH:
GlStateManager.translate(x + 0.5, y + 0.5, z + 0.68);
GlStateManager.rotate(180, 0, 1, 0);
break;
case WEST:
GlStateManager.translate(x + 0.68, y + 0.5, z + 0.5);
GlStateManager.rotate(270, 0, 1, 0);
break;
case SOUTH:
GlStateManager.translate(x + 0.5, y + 0.5, z + 0.316);
break;
case EAST:
GlStateManager.translate(x + 0.316, y + 0.5, z + 0.5);
GlStateManager.rotate(90, 0, 1, 0);
break;
}
Expand Down Expand Up @@ -214,11 +217,11 @@ private void drawInsertedCardStack(ItemStack stack)
{
GlStateManager.rotate(90, 0, 0, 1);
GlStateManager.scale(2.5, -2.5, -2.5);
GlStateManager.translate(2.5, -1.1, -0.8);
GlStateManager.translate(2.5, -0.7, -0.8);

Minecraft.getMinecraft().getRenderItem().renderItem(stack, TransformType.NONE);

GlStateManager.translate(-2.5, 1.1, 0.8);
GlStateManager.translate(-2.5, 0.7, 0.8);
GlStateManager.scale(1F/2.5, -1F/2.5, -1F/2.5);
GlStateManager.rotate(-90, 0, 0, 1);
}
Expand Down
128 changes: 14 additions & 114 deletions src/main/resources/assets/wbtc/models/block/dish_bell.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,118 +60,6 @@
"down": {"uv": [5.25, 4, 6.25, 7.5], "texture": "#1"}
}
},
{
"name": "hexadecagon",
"from": [-1.2365, 15.92525, 8.203],
"to": [17.2365, 19.59975, 8.812],
"rotation": {"angle": -45, "axis": "z", "origin": [8, 17.7625, 7.4925]},
"faces": {
"north": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"east": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"south": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"west": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"up": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"down": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"}
}
},
{
"name": "hexadecagon",
"from": [-1.2365, 15.92525, 8.203],
"to": [17.2365, 19.59975, 8.812],
"rotation": {"angle": -22.5, "axis": "z", "origin": [8, 17.7625, 7.4925]},
"faces": {
"north": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"east": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"south": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"west": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"up": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"down": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"}
}
},
{
"name": "hexadecagon",
"from": [-1.2365, 15.92525, 8.203],
"to": [17.2365, 19.59975, 8.812],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 17.7625, 7.4925]},
"faces": {
"north": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"east": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"south": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"west": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"up": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"down": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"}
}
},
{
"name": "hexadecagon",
"from": [-1.2365, 15.92525, 8.203],
"to": [17.2365, 19.59975, 8.812],
"rotation": {"angle": 22.5, "axis": "z", "origin": [8, 17.7625, 7.4925]},
"faces": {
"north": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"east": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"south": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"west": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"up": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"down": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"}
}
},
{
"name": "hexadecagon",
"from": [-1.2365, 15.92525, 8.203],
"to": [17.2365, 19.59975, 8.812],
"rotation": {"angle": 45, "axis": "z", "origin": [8, 17.7625, 7.4925]},
"faces": {
"north": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"east": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"south": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"west": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"up": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"down": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"}
}
},
{
"name": "hexadecagon",
"from": [6.16275, 8.526, 8.203],
"to": [9.83725, 26.999, 8.812],
"rotation": {"angle": -22.5, "axis": "z", "origin": [8, 17.7625, 7.4925]},
"faces": {
"north": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"east": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"south": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"west": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"up": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"down": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"}
}
},
{
"name": "hexadecagon",
"from": [6.16275, 8.526, 8.203],
"to": [9.83725, 26.999, 8.812],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 17.7625, 7.4925]},
"faces": {
"north": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"east": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"south": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"west": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"up": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"down": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"}
}
},
{
"name": "hexadecagon",
"from": [6.16275, 8.526, 8.203],
"to": [9.83725, 26.999, 8.812],
"rotation": {"angle": 22.5, "axis": "z", "origin": [8, 17.7625, 7.4925]},
"faces": {
"north": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"east": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"south": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"west": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"up": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"down": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"}
}
},
{
"name": "logo",
"from": [5.97, 18.27, 8],
Expand Down Expand Up @@ -238,6 +126,18 @@
"down": {"uv": [0, 0, 0.25, 0.25], "texture": "#1"}
}
},
{
"from": [0, 8, 8.15],
"to": [16, 26, 10],
"faces": {
"north": {"uv": [4, 2.25, 15, 13.75], "texture": "#2"},
"east": {"uv": [4, 2.25, 15, 13.75], "texture": "#2"},
"south": {"uv": [4, 2.25, 15, 13.75], "texture": "#2"},
"west": {"uv": [4, 2.25, 15, 13.75], "texture": "#2"},
"up": {"uv": [4, 2.25, 15, 13.75], "texture": "#2"},
"down": {"uv": [4, 2.25, 15, 13.75], "texture": "#2"}
}
},
{
"from": [6.985, 8.6275, -2.6575],
"to": [9.015, 10.6575, 8.3045],
Expand Down Expand Up @@ -321,13 +221,13 @@
"name": "dish",
"origin": [8, 8, 8],
"color": 0,
"children": [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
"children": [4, 5, 6, 7, 8, 9]
},
{
"name": "arm",
"origin": [8, 8, 8],
"color": 0,
"children": [17, 18, 19]
"children": [10, 11, 12]
}
]
}
128 changes: 14 additions & 114 deletions src/main/resources/assets/wbtc/models/block/dish_blank.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,118 +59,6 @@
"down": {"uv": [5.25, 4, 6.25, 7.5], "texture": "#1"}
}
},
{
"name": "hexadecagon",
"from": [-1.2365, 15.92525, 8.203],
"to": [17.2365, 19.59975, 8.812],
"rotation": {"angle": -45, "axis": "z", "origin": [8, 17.7625, 7.4925]},
"faces": {
"north": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"east": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"south": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"west": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"up": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"down": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"}
}
},
{
"name": "hexadecagon",
"from": [-1.2365, 15.92525, 8.203],
"to": [17.2365, 19.59975, 8.812],
"rotation": {"angle": -22.5, "axis": "z", "origin": [8, 17.7625, 7.4925]},
"faces": {
"north": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"east": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"south": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"west": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"up": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"down": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"}
}
},
{
"name": "hexadecagon",
"from": [-1.2365, 15.92525, 8.203],
"to": [17.2365, 19.59975, 8.812],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 17.7625, 7.4925]},
"faces": {
"north": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"east": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"south": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"west": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"up": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"down": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"}
}
},
{
"name": "hexadecagon",
"from": [-1.2365, 15.92525, 8.203],
"to": [17.2365, 19.59975, 8.812],
"rotation": {"angle": 22.5, "axis": "z", "origin": [8, 17.7625, 7.4925]},
"faces": {
"north": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"east": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"south": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"west": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"up": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"down": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"}
}
},
{
"name": "hexadecagon",
"from": [-1.2365, 15.92525, 8.203],
"to": [17.2365, 19.59975, 8.812],
"rotation": {"angle": 45, "axis": "z", "origin": [8, 17.7625, 7.4925]},
"faces": {
"north": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"east": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"south": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"west": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"up": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"down": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"}
}
},
{
"name": "hexadecagon",
"from": [6.16275, 8.526, 8.203],
"to": [9.83725, 26.999, 8.812],
"rotation": {"angle": -22.5, "axis": "z", "origin": [8, 17.7625, 7.4925]},
"faces": {
"north": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"east": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"south": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"west": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"up": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"down": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"}
}
},
{
"name": "hexadecagon",
"from": [6.16275, 8.526, 8.203],
"to": [9.83725, 26.999, 8.812],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 17.7625, 7.4925]},
"faces": {
"north": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"east": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"south": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"west": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"up": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"down": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"}
}
},
{
"name": "hexadecagon",
"from": [6.16275, 8.526, 8.203],
"to": [9.83725, 26.999, 8.812],
"rotation": {"angle": 22.5, "axis": "z", "origin": [8, 17.7625, 7.4925]},
"faces": {
"north": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"east": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"south": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"west": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"up": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"},
"down": {"uv": [4.75, 0, 5.75, 0.5], "texture": "#2"}
}
},
{
"from": [5.97, 12.18, 7.94925],
"to": [6.4775, 12.6875, 8.45675],
Expand Down Expand Up @@ -223,6 +111,18 @@
"down": {"uv": [0, 0, 0.25, 0.25], "texture": "#1"}
}
},
{
"from": [0, 8, 8.15],
"to": [16, 26, 10],
"faces": {
"north": {"uv": [4, 2.25, 15, 13.75], "texture": "#2"},
"east": {"uv": [4, 2.25, 15, 13.75], "texture": "#2"},
"south": {"uv": [4, 2.25, 15, 13.75], "texture": "#2"},
"west": {"uv": [4, 2.25, 15, 13.75], "texture": "#2"},
"up": {"uv": [4, 2.25, 15, 13.75], "texture": "#2"},
"down": {"uv": [4, 2.25, 15, 13.75], "texture": "#2"}
}
},
{
"from": [6.985, 8.6275, -2.6575],
"to": [9.015, 10.6575, 8.3045],
Expand Down Expand Up @@ -306,13 +206,13 @@
"name": "dish",
"origin": [8, 8, 8],
"color": 0,
"children": [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
"children": [4, 5, 6, 7, 8]
},
{
"name": "arm",
"origin": [8, 8, 8],
"color": 0,
"children": [16, 17, 18]
"children": [9, 10, 11]
}
]
}
Loading

0 comments on commit 2691dbc

Please sign in to comment.