mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
think of the lamest dude u know ... he listen to 2hollis don't he
This commit is contained in:
parent
0cc70760ab
commit
fe52d7aed1
@ -1,5 +1,6 @@
|
|||||||
package com.hbm.render.tileentity;
|
package com.hbm.render.tileentity;
|
||||||
|
|
||||||
|
import net.minecraft.world.World;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.hbm.blocks.generic.BlockSkeletonHolder.TileEntitySkeletonHolder;
|
import com.hbm.blocks.generic.BlockSkeletonHolder.TileEntitySkeletonHolder;
|
||||||
@ -23,13 +24,21 @@ public class RenderSkeletonHolder extends TileEntitySpecialRenderer {
|
|||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
GL11.glTranslated(x + 0.5, y, z + 0.5);
|
GL11.glTranslated(x + 0.5, y, z + 0.5);
|
||||||
|
|
||||||
switch(te.getBlockMetadata()) {
|
int meta = 0;
|
||||||
case 2: GL11.glRotatef(180, 0F, 1F, 0F); break;
|
World world = te.getWorldObj();
|
||||||
case 4: GL11.glRotatef(270, 0F, 1F, 0F); break;
|
if (world != null) {
|
||||||
case 3: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
meta = world.getBlockMetadata(te.xCoord, te.yCoord, te.zCoord);
|
||||||
case 5: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int rotation = 0;
|
||||||
|
switch (meta) {
|
||||||
|
case 2: rotation = 180; break; // east
|
||||||
|
case 3: rotation = 0; break; // west
|
||||||
|
case 4: rotation = 270; break; // north
|
||||||
|
case 5: rotation = 90; break; // south
|
||||||
|
}
|
||||||
|
GL11.glRotatef(rotation, 0F, 1F, 0F);
|
||||||
|
|
||||||
GL11.glEnable(GL11.GL_LIGHTING);
|
GL11.glEnable(GL11.GL_LIGHTING);
|
||||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||||
RenderHelper.enableStandardItemLighting();
|
RenderHelper.enableStandardItemLighting();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user