Exemplo n.º 1
0
  public void renderRedstoneTorch(double x, double y, double z, double h, boolean state) {
    IIcon tex = Blocks.unlit_redstone_torch.getBlockTextureFromSide(1);
    if (state) {
      tex = Blocks.redstone_torch.getBlockTextureFromSide(1);
    }

    Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);

    super.context.setTexFlags(0);
    super.context.setRelPos(x, y, z);
    super.context.setIcon(tex);
    super.context.setLocalLights(1.0F);
    super.context.setTint(1.0F, 1.0F, 1.0F);
    super.context.setSize(0.4375D, 1.0D - h, 0.0D, 0.5625D, 1.0D, 1.0D);
    super.context.calcBounds();
    super.context.renderFaces(48);
    super.context.setSize(0.0D, 1.0D - h, 0.4375D, 1.0D, 1.0D, 0.5625D);
    super.context.calcBounds();
    super.context.renderFaces(12);
    super.context.setSize(0.375D, 0.0D, 0.4375D, 0.5D, 1.0D, 0.5625D);
    super.context.setRelPos(x + 0.0625D, y - 0.375D, z);
    super.context.calcBounds();
    super.context.setTexFlags(24);
    super.context.renderFaces(2);
    super.context.setRelPos(0.0D, 0.0D, 0.0D);
  }
Exemplo n.º 2
0
  public void renderInvWafer(int tx) {
    super.context.useNormal = true;
    /*switch (tx >> 8) {
    	default: //case 0:
    		Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation("rplogic", "textures/blocks/logic1.png"));
    		icns = CoreProxyClient.logicIcons1;
    		break;
    	case 1:
    		Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation("rplogic", "textures/blocks/logic2.png"));
    		icns = CoreProxyClient.logicIcons2;
    		break;
    	case 2:
    		Minecraft.getMinecraft().renderEngine.bindTexture(new ResourceLocation("rplogic", "textures/blocks/sensor1.png"));
    		icns = CoreProxyClient.sensorIcons;
    }

    tx &= 255;*/
    Tessellator tessellator = Tessellator.instance;
    tessellator.startDrawingQuads();
    super.context.setTint(1.0F, 1.0F, 1.0F);
    super.context.setTexFlags(0);
    super.context.setSize(0.0D, 0.0D, 0.0D, 1.0D, 0.125D, 1.0D);
    super.context.setIcon(null, getIcon(0, 0), null, null, null, null);
    super.context.calcBounds();
    super.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F);
    super.context.renderFaces(63);
    tessellator.draw();
    // RenderLib.setDefaultTexture();
    super.context.useNormal = false;
    Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
  }
Exemplo n.º 3
0
 public void renderChip(double x, double y, double z, int tex) {
   // super.context.bindTexture("/eloraam/logic/logic1.png");
   super.context.setTexFlags(0);
   super.context.setRelPos(x, y, z);
   super.context.setIcon(getIcon(0, 0));
   super.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F);
   super.context.renderBox(62, 0.375D, 0.0625D, 0.375D, 0.625D, 0.1875D, 0.625D);
   // super.context.unbindTexture();
 }
Exemplo n.º 4
0
 public void renderWafer(int tx) {
   tx &= 255;
   super.context.setRelPos(0.0D, 0.0D, 0.0D);
   super.context.setTint(1.0F, 1.0F, 1.0F);
   super.context.setTexFlags(0);
   super.context.setSize(0.0D, 0.0D, 0.0D, 1.0D, 0.125D, 1.0D);
   super.context.setIcon(null, getIcon(0, 0), null, null, null, null);
   super.context.calcBounds();
   super.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F);
   super.context.renderFaces(62);
   // super.context.unbindTexture();
 }