Fix Couch Rendering

This commit is contained in:
Kam committed 2025-06-01 23:46:51 -04:00
1 parent 07640d9b6b
commit b86c1ceabb
2 files changed
+12 -2

No files matched your search

@@ -7,6 +7,7 @@ import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.Facing;
import static noppes.npcs.items.ItemNpcTool.BRUSH_COLOR_TAG;
@@ -18,6 +19,11 @@ public class TileVariant extends TileEntity {
public int variant = 14;
public int rotation;
// Rotation = 0 Couch is Facing North
// Rotation = 1 Couch is Facing East
// Rotation = 2 Couch is Facing South
// Rotation = 3 Couch is Facing West
public void readFromNBT(NBTTagCompound compound) {
super.readFromNBT(compound);
version = compound.getInteger("CNPCVersion");
@@ -100,7 +100,7 @@ public class BlockCouchWoolRenderer extends BlockRendererInterface {
setCouchWood(var1.getBlockMetadata());
if (tile.hasCornerLeft) {
GL11.glPushMatrix();
GL11.glRotatef(90, 0, 1, 0);
GL11.glRotatef(270, 0, 1, 0);
modelCouchCorner.CouchBack.render(0.0625F);
GL11.glPopMatrix();
} else if (tile.hasCornerRight)
@@ -119,8 +119,12 @@ public class BlockCouchWoolRenderer extends BlockRendererInterface {
float[] color = ColorUtil.hexToRGB(tile.color);
GL11.glColor3f(color[0], color[1], color[2]);
if (tile.hasCornerLeft)
if (tile.hasCornerLeft){
GL11.glPushMatrix();
GL11.glRotatef(270, 0, 1, 0);
modelCouchCorner.Cussion.render(0.0625F);
GL11.glPopMatrix();
}
else if (tile.hasCornerRight)
modelCouchCorner.Cussion.render(0.0625F);
else if (tile.hasLeft && tile.hasRight)