mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-17 19:25:06 +00:00
Change package name for realsies now :P
This commit is contained in:
1 parent
4d8df815cc
commit
dae454dc17
138 files changed
+491
-438
No files matched your search
@@ -0,0 +1,63 @@
|
||||
package com.cricketcraft.chisel.client.render;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.cricketcraft.chisel.block.BlockMarbleStairs;
|
||||
import com.cricketcraft.chisel.utils.Drawing;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
|
||||
public class BlockMarbleStairsRenderer implements ISimpleBlockRenderingHandler
|
||||
{
|
||||
public static int id;
|
||||
|
||||
public BlockMarbleStairsRenderer()
|
||||
{
|
||||
id = RenderingRegistry.getNextAvailableRenderId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int meta, int modelID, RenderBlocks renderer)
|
||||
{
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
renderer.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.5F);
|
||||
Drawing.drawBlock(block, meta, renderer);
|
||||
renderer.setRenderBounds(0.0F, 0.0F, 0.5F, 1.0F, 0.5F, 1.0F);
|
||||
Drawing.drawBlock(block, meta, renderer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block blck, int modelId, RenderBlocks renderer)
|
||||
{
|
||||
if(blck == null || !(blck instanceof BlockMarbleStairs))
|
||||
return false;
|
||||
BlockMarbleStairs block = (BlockMarbleStairs) blck;
|
||||
|
||||
renderer.renderBlockStairs(block, x, y, z);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory(int renderId)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public int getRenderBlockPass()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user