Package buildcraft.api.core

Examples of buildcraft.api.core.EnumColor.ordinal()


    public void draw(GuiBuildCraft gui, int guiX, int guiY, int mouseX, int mouseY) {
      super.draw(gui, guiX, guiY, mouseX, mouseY);
      EnumColor color = colors.getCurrent();
      if (color != null) {
        gui.bindTexture(TextureMap.locationItemsTexture);
        gui.drawTexturedModelRectFromIcon(guiX + x + 2, guiY + y + 2, BuildCraftTransport.actionPipeColor[color.ordinal()].getIcon(), 16, 16);
      } else {
        gui.drawTexturedModalRect(guiX + x + 2, guiY + y + 2, u, v + h + h, 16, 16);
      }
    }
View Full Code Here


      try {
        ByteArrayOutputStream bytes = new ByteArrayOutputStream();
        DataOutputStream data = new DataOutputStream(bytes);
        data.writeByte(slot);
        EnumColor color = colors.getCurrent();
        data.writeByte(color == null ? 0 : color.ordinal() + 1);
        PacketGuiReturn pkt = new PacketGuiReturn(pipe.getContainer(), bytes.toByteArray());
        pkt.sendPacket();
      } catch (IOException ex) {
      }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.