Package crazypants.enderio.conduit.item.filter

Examples of crazypants.enderio.conduit.item.filter.ExistingItemFilter


  public PacketExistingItemFilterSnapshot onMessage(PacketExistingItemFilterSnapshot message, MessageContext ctx) {
    IItemConduit conduit = message.getTileCasted(ctx);
    if(conduit == null) {
      return null;
    }
    ExistingItemFilter filter;
    if(message.isInput) {
      filter = (ExistingItemFilter)conduit.getInputFilter(message.dir)
    } else {
      filter = (ExistingItemFilter)conduit.getOutputFilter(message.dir);
    }
   
    if(message.isClear) {     
      filter.setSnapshot((List<ItemStack>)null);
      System.out.println("PacketExistingItemFilterSnapshot.onMessage: Cleared snapshot");     
    } else {
      ItemConduitNetwork icn = (ItemConduitNetwork)conduit.getNetwork();   
      NetworkedInventory inv = icn.getInventory(conduit, message.dir);
      filter.setSnapshot(inv);       
    }
   
    if(message.isInput) {
      conduit.setInputFilter(message.dir, filter)
    } else {
View Full Code Here


  }

  @Override
  public void updateButtons() {

    ExistingItemFilter activeFilter = filter;

    useNbtB.onGuiInit();
    useNbtB.setSelected(activeFilter.isMatchNBT());

    useOreDictB.onGuiInit();
    useOreDictB.setSelected(activeFilter.isUseOreDict());

    if(!isInput) {
      stickyB.onGuiInit();
      stickyB.setSelected(activeFilter.isSticky());
    }

    useMetaB.onGuiInit();
    useMetaB.setSelected(activeFilter.isMatchMeta());
   
    int x = gui.getGuiLeft() + 80;
    int y = gui.getGuiTop() + 65;
    snapshotB = new GuiButton(ID_SNAPSHOT, x, y, 60, 20, "Snapshot");
   
View Full Code Here

TOP

Related Classes of crazypants.enderio.conduit.item.filter.ExistingItemFilter

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.