The Meaning of Life, the Universe, and Everything.
I cannot figure out how to have my chest be rotated when placed. Currently, it always places facing north. I know I have to do something in the Render class, but I haven't been able to find out what. And, the chest always faces the same direction even if placed by the setblock command with different metadatas. Here is a GitHub with the relevant classes. https://github.com/TheEnderMiner/Chest
You need to check which direction the block is facing using getBlockMetadata in TileEntity, and then rotate it based on the metadata.
public void render(TileEntityChest te, double x, double y, double z, float partialTicks, int destroyStage, float alpha)
i = te.getBlockMetadata();
if (i == 2)
j = 180;
if (i == 3)
j = 0;
}//and so on
GlStateManager.rotate((float)j, 0.0F, 1.0F, 0.0F);