Advertisement
Guest User

Untitled

a guest
Aug 14th, 2013
66
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package co.uk.silvania.roads.block.tess.renderers;
  2.  
  3. import org.lwjgl.opengl.GL11;
  4.  
  5. import net.minecraft.block.Block;
  6. import net.minecraft.client.Minecraft;
  7. import net.minecraft.client.renderer.RenderBlocks;
  8. import net.minecraft.client.renderer.Tessellator;
  9. import net.minecraft.util.ResourceLocation;
  10. import net.minecraft.world.IBlockAccess;
  11. import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
  12. import cpw.mods.fml.relauncher.Side;
  13. import cpw.mods.fml.relauncher.SideOnly;
  14.  
  15. public class ShortRampRenderer implements ISimpleBlockRenderingHandler {
  16.  
  17. @Override
  18. public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
  19.  
  20. }
  21.  
  22. @Override
  23. @SideOnly(Side.CLIENT)
  24. public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
  25. renderer.setRenderBounds(0.6, 0.4, 0.6, 0.8, 0.6, 0.8);
  26. renderer.renderStandardBlock(block, x, y, z);
  27.  
  28. renderer.setRenderBounds(0.2, 0.4, 0.2, 0.4, 0.6, 0.4);
  29. renderer.renderStandardBlock(block, x, y, z);
  30. return true;
  31. }
  32.  
  33. @Override
  34. public boolean shouldRender3DInInventory() {
  35. return false;
  36. }
  37.  
  38. @Override
  39. public int getRenderId() {
  40. return 0;
  41. }
  42. }
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement