Package logisticspipes.blocks.crafting

Examples of logisticspipes.blocks.crafting.LogisticsCraftingTableTileEntity


  @Override
  public boolean importRecipe(TileEntity tile, ItemIdentifierInventory inventory) {
    if (!(tile instanceof LogisticsCraftingTableTileEntity))
      return false;

    LogisticsCraftingTableTileEntity bench = (LogisticsCraftingTableTileEntity) tile;
    ItemIdentifierStack result = bench.resultInv.getIDStackInSlot(0);
   
    if (result == null)
      return false;

    inventory.setInventorySlotContents(9, result);

    // Import
    for (int i = 0; i < bench.matrix.getSizeInventory(); i++) {
      if (i >= inventory.getSizeInventory() - 2) {
        break;
      }
      final ItemStack newStack = bench.matrix.getStackInSlot(i) == null ? null : bench.matrix.getStackInSlot(i).copy();
      if(newStack!=null && newStack.stackSize>1) // just incase size == 0 somehow.
      newStack.stackSize=1;
      inventory.setInventorySlotContents(i, newStack);
    }
   
    if(!bench.isFuzzy())
      inventory.compact_first(9);
   
    return true;
  }
View Full Code Here


  public boolean importFuzzyFlags(TileEntity tile, ItemIdentifierInventory inventory, int[] flags)
  {
    if (!(tile instanceof LogisticsCraftingTableTileEntity))
      return false;

    LogisticsCraftingTableTileEntity bench = (LogisticsCraftingTableTileEntity) tile;
   
    if(!bench.isFuzzy())
      return false;
   
    for (int i = 0; i < bench.fuzzyFlags.length; i++) {
      if(i >= flags.length) {
        break;
View Full Code Here

    super(id);
  }
 
  @Override
  public Object getClientGui(EntityPlayer player) {
    LogisticsCraftingTableTileEntity tile = this.getTile(player.getEntityWorld(), LogisticsCraftingTableTileEntity.class);
    if(tile == null) return null;
    if(tile.isFuzzy()) {
      for(int i=0;i<9;i++) {
        tile.fuzzyFlags[i].ignore_dmg = ignore_dmg[i];
        tile.fuzzyFlags[i].ignore_nbt = ignore_nbt[i];
        tile.fuzzyFlags[i].use_od = use_od[i];
        tile.fuzzyFlags[i].use_category = use_category[i];
View Full Code Here

    return new GuiLogisticsCraftingTable(player, tile);
  }

  @Override
  public DummyContainer getContainer(EntityPlayer player) {
    LogisticsCraftingTableTileEntity tile = this.getTile(player.getEntityWorld(), LogisticsCraftingTableTileEntity.class);
    if(tile == null) return null;
    DummyContainer dummy = new DummyContainer(player.inventory, tile.matrix);

    for(int X=0;X<3;X++) {
      for(int Y=0;Y<3;Y++) {
View Full Code Here

          return new LogisticsPowerJunctionTileEntity();
        case LOGISTICS_SECURITY_STATION:
          return new LogisticsSecurityTileEntity();
      case LOGISTICS_AUTOCRAFTING_TABLE:
      case LOGISTICS_FUZZYCRAFTING_TABLE:
        return new LogisticsCraftingTableTileEntity();
      case LOGISTICS_RF_POWERPROVIDER:
        return new LogisticsRFPowerProviderTileEntity();
      case LOGISTICS_IC2_POWERPROVIDER:
        return new LogisticsIC2PowerProviderTileEntity();
          default:
View Full Code Here

    super(id);
  }

  @Override
  public void processPacket(EntityPlayer player) {
    LogisticsCraftingTableTileEntity tile = this.getTile(player.worldObj, LogisticsCraftingTableTileEntity.class);
    if(tile == null) return;
    if(!tile.isFuzzy()) return;
    tile.handleFuzzyFlagsChange(this.getInteger(), this.getInteger2(), player);
  }
View Full Code Here

TOP

Related Classes of logisticspipes.blocks.crafting.LogisticsCraftingTableTileEntity

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.