Examples of TileEntityDynamicTank


Examples of mekanism.common.tile.TileEntityDynamicTank

    if(this == Mekanism.BasicBlock)
    {
      if(meta == 9 || meta == 10 || meta == 11)
      {
        TileEntityDynamicTank tileEntity = (TileEntityDynamicTank)world.getTileEntity(x, y, z);

        if(tileEntity != null)
        {
          if(FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER)
          {
View Full Code Here

Examples of mekanism.common.tile.TileEntityDynamicTank

      }
      else if(metadata == 9 || metadata == 10 || metadata == 11)
      {
        if(!entityplayer.isSneaking() && ((TileEntityDynamicTank)world.getTileEntity(x, y, z)).structure != null)
        {
          TileEntityDynamicTank tileEntity = (TileEntityDynamicTank)world.getTileEntity(x, y, z);

          if(!manageInventory(entityplayer, tileEntity))
          {
            Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(tileEntity), tileEntity.getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(tileEntity)));
            entityplayer.openGui(Mekanism.instance, 18, world, x, y, z);
          }
          else {
            entityplayer.inventory.markDirty();
            tileEntity.sendPacketToRenderer();
          }

          return true;
        }
      }
View Full Code Here

Examples of mekanism.common.tile.TileEntityDynamicTank

      switch(metadata)
      {
        case 6:
          return new TileEntityBin();
        case 9:
          return new TileEntityDynamicTank();
        case 10:
          return new TileEntityDynamicTank();
        case 11:
          return new TileEntityDynamicValve();
        case 14:
          return new TileEntitySalinationController();
        case 15:
View Full Code Here

Examples of mekanism.common.tile.TileEntityDynamicTank

      for(int inventoryID : idsToKill)
      {
        for(Coord4D obj : Mekanism.dynamicInventories.get(inventoryID).locations)
        {
          TileEntityDynamicTank dynamicTank = (TileEntityDynamicTank)obj.getTileEntity(world);

          if(dynamicTank != null)
          {
            dynamicTank.cachedData = new DynamicTankCache();
            dynamicTank.inventory = new ItemStack[2];
View Full Code Here

Examples of mekanism.common.tile.TileEntityDynamicTank

  {
    DynamicTankCache toReturn = Mekanism.dynamicInventories.get(id);

    for(Coord4D obj : Mekanism.dynamicInventories.get(id).locations)
    {
      TileEntityDynamicTank tileEntity = (TileEntityDynamicTank)obj.getTileEntity(world);

      if(tileEntity != null)
      {
        tileEntity.cachedData = new DynamicTankCache();
        tileEntity.inventory = new ItemStack[2];
View Full Code Here

Examples of mekanism.common.tile.TileEntityDynamicTank

      int idFound = -1;

      for(Coord4D obj : structureFound.locations)
      {
        TileEntityDynamicTank tileEntity = (TileEntityDynamicTank)obj.getTileEntity(pointer.getWorldObj());

        if(tileEntity.inventoryID != -1)
        {
          idFound = tileEntity.inventoryID;
          break;
        }
      }

      DynamicTankCache cache = new DynamicTankCache();

      if(idFound != -1)
      {
        if(Mekanism.dynamicInventories.get(idFound) != null)
        {
          cache = MekanismUtils.pullInventory(pointer.getWorldObj(), idFound);
        }
      }
      else {
        idFound = MekanismUtils.getUniqueInventoryID();
      }

      cache.apply(structureFound);

      if(structureFound.fluidStored != null)
      {
        structureFound.fluidStored.amount = Math.min(structureFound.fluidStored.amount, structureFound.volume*FLUID_PER_TANK);
      }

      for(Coord4D obj : structureFound.locations)
      {
        TileEntityDynamicTank tileEntity = (TileEntityDynamicTank)obj.getTileEntity(pointer.getWorldObj());

        tileEntity.inventoryID = idFound;
        tileEntity.structure = structureFound;
       
        tileEntity.cachedData.sync(structureFound);
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.