Package crazypants.enderio.conduit.liquid

Examples of crazypants.enderio.conduit.liquid.FluidFilter


  public void fromBytes(ByteBuf buf) {
    super.fromBytes(buf);
    dir = ForgeDirection.values()[buf.readShort()];
    isInput = buf.readBoolean();   
    NBTTagCompound tag = ByteBufUtils.readTag(buf);
    filter = new FluidFilter();
    filter.readFromNBT(tag);
  }
View Full Code Here


    if(!isFilterVisible()) {
      return;
    }
    ItemStack st = Minecraft.getMinecraft().thePlayer.inventory.getItemStack();
    FluidFilter filter = eConduit.getFilter(gui.getDir(), isInput());
    if(filter == null && st == null) {
      return;
    }
    if(filter == null) {
      filter = new FluidFilter();
    }  
    if(filterBounds.contains(x, y)) {
      int slot = (x - filterX) / 18;
      filter.setFluid(slot, st);
    }
    eConduit.setFilter(gui.getDir(), filter, isInput());
    EnderIO.packetPipeline.INSTANCE.sendToServer(new PacketFluidFilter(eConduit, gui.getDir(), filter, isInput()));

  }
View Full Code Here

      y = gui.getGuiTop() + filterY;
      GL11.glColor3f(1, 1, 1);
      RenderUtil.bindTexture("enderio:textures/gui/externalConduitConnection.png");
      gui.drawTexturedModalRect(x, y, 24, 238, 90, 18);

      FluidFilter filter = eConduit.getFilter(gui.getDir(), isInput);
      if(filter != null && !filter.isEmpty()) {
        for (int i = 0; i < filter.size(); i++) {
          Fluid f = filter.getFluidAt(i);
          if(f != null) {
            renderFluid(f, x + (i * 18), y);
          }
        }

View Full Code Here

    @Override
    public List<String> getToolTipText() {
      if(!isFilterVisible()) {
        return null;
      }
      FluidFilter filter = eConduit.getFilter(gui.getDir(), isInput());
      if(filter == null) {
        return null;
      }
      if(filter.getFluidAt(index) == null) {
        return null;
      }
      return Collections.singletonList(filter.getFluidAt(index).getLocalizedName());
    }
View Full Code Here

TOP

Related Classes of crazypants.enderio.conduit.liquid.FluidFilter

Copyright © 2018 www.massapicom. 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.