Package extracells.tileentity

Examples of extracells.tileentity.TileEntityMonitorStorageFluid


    int[] color =
    { 0, 0, 0 };
    TileEntity blockTE = world.getBlockTileEntity(x, y, z);
    if (blockTE instanceof TileEntityMonitorStorageFluid)
    {
      TileEntityMonitorStorageFluid monitorTE = (TileEntityMonitorStorageFluid) blockTE;
      switch (monitorTE.getColor())
      {
      case -1:
        color = fluix.clone();
        break;
      case 0:
        color = blue.clone();
        break;
      case 1:
        color = black.clone();
        break;
      case 2:
        color = white.clone();
        break;
      case 3:
        color = brown.clone();
        break;
      case 4:
        color = red.clone();
        break;
      case 5:
        color = yellow.clone();
        break;
      case 6:
        color = green.clone();
        break;
      }

      boolean active = monitorTE.isMachineActive();
      ts.setBrightness(15 << 2 | 15 << 0);
      if (active)
        ts.setBrightness(15 << 20 | 15 << 4);

      for (int i = 0; i < 3; i++)
View Full Code Here


    List<String> list = currenttip;
    Class clazz = accessor.getClass();
    TileEntity tileEntity = accessor.getTileEntity();
    if (tileEntity instanceof TileEntityMonitorStorageFluid)
    {
      TileEntityMonitorStorageFluid fluidMonitor = (TileEntityMonitorStorageFluid) tileEntity;
      Fluid fluid = fluidMonitor.getFluid();
      String fluidName = fluid != null ? fluid.getLocalizedName() : "-";
      long fluidAmount = fluid != null ? fluidMonitor.getAmount() : 0;

      String amountToText = Long.toString(fluidAmount) + "mB";
      if (Extracells.shortenedBuckets)
      {
        if (fluidAmount > 1000000000L)
View Full Code Here

    if (!world.isRemote)
    {
      TileEntity te = world.getBlockTileEntity(x, y, z);
      if (te instanceof TileEntityMonitorStorageFluid)
      {
        TileEntityMonitorStorageFluid monitorTE = (TileEntityMonitorStorageFluid) te;
        ItemStack currItem = player.getCurrentEquippedItem();
        if (currItem != null)
        {
          if (!monitorTE.isMatrixed() && currItem.isItemEqual(Materials.matConversionMatrix))
          {
            monitorTE.setMatrixed();
            currItem.stackSize -= 1;
            if (currItem.stackSize <= 0)
              currItem = null;
            return true;
          }
          if (!monitorTE.isLocked())
          {
            if (currItem.getItem() instanceof IFluidContainerItem)
            {
              FluidStack fluid = ((IFluidContainerItem) currItem.getItem()).getFluid(currItem);
              monitorTE.setFluid(fluid != null ? fluid.getFluid() : null);
            } else if (FluidContainerRegistry.isFilledContainer(currItem))
            {
              FluidStack fluid = FluidContainerRegistry.getFluidForFilledItem(currItem);
              monitorTE.setFluid(fluid != null ? fluid.getFluid() : null);
            } else if (FluidContainerRegistry.isEmptyContainer(currItem))
            {
              monitorTE.setFluid(null);
            }
          } else
          {
            if (monitorTE.isMatrixed())
            {
              ItemStack toAdd = monitorTE.fillContainer(currItem.copy());
              if (toAdd != null)
              {
                ForgeDirection orientation = ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z));
                dropBlockAsItem_do(world, x + orientation.offsetX, y + orientation.offsetY, z + orientation.offsetZ, toAdd);
                currItem.stackSize -= 1;
                if (currItem.stackSize <= 0)
                  currItem = null;
              }
            }
          }
        } else if (player.isSneaking())
        {
          if (!monitorTE.isLocked())
          {
            monitorTE.setLocked(true);
            player.sendChatToPlayer(new ChatMessageComponent().addText(StatCollector.translateToLocal("ChatMsg.Locked")));
          } else
          {
            monitorTE.setLocked(false);
            player.sendChatToPlayer(new ChatMessageComponent().addText(StatCollector.translateToLocal("ChatMsg.Unlocked")));
          }
        } else if (!player.isSneaking() && !monitorTE.isLocked())
        {
          monitorTE.setFluid(null);
        }
      }
    }
    return true;
  }
View Full Code Here

        {
          msg = Long.toString(qty / 1000L) + "B";
        }
      }

      TileEntityMonitorStorageFluid TE = (TileEntityMonitorStorageFluid) tileentity;
      if (TE.isMachineActive())
      {
        GL11.glTranslated(-8.6F, -16.3, -1.2F);
        Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
        Tessellator cake = Tessellator.instance;
        cake.startDrawingQuads();
View Full Code Here

  }

  @Override
  public TileEntity createNewTileEntity(World world)
  {
    return new TileEntityMonitorStorageFluid();
  }
View Full Code Here

TOP

Related Classes of extracells.tileentity.TileEntityMonitorStorageFluid

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.