Package extracells.tileentity

Examples of extracells.tileentity.TileEntityBusFluidStorage


  }

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


  public void onNeighborBlockChange(World world, int x, int y, int z, int neighbourID)
  {
    TileEntity blockTE = world.getBlockTileEntity(x, y, z);
    if (blockTE instanceof TileEntityBusFluidStorage)
    {
      TileEntityBusFluidStorage storageBus = (TileEntityBusFluidStorage) blockTE;
      if (!world.isRemote)
      {
        storageBus.updateGrid();
        PacketDispatcher.sendPacketToAllPlayers(world.getBlockTileEntity(x, y, z).getDescriptionPacket());
        MinecraftForge.EVENT_BUS.post(new GridStorageUpdateEvent(world, new WorldCoord(x, y, z), storageBus.getGrid()));
      }
      ForgeDirection blockOrientation = ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z));

      TileEntity fluidHandler = world.getBlockTileEntity(x + blockOrientation.offsetX, y + blockOrientation.offsetY, z + blockOrientation.offsetZ);
      storageBus.setFluidHandler(fluidHandler instanceof IFluidHandler ? (IFluidHandler) fluidHandler : null);
    }
  }
View Full Code Here

  @Override
  public void execute(EntityPlayer player, Side side) throws ProtocolException
  {
    if (side.isServer())
    {
      TileEntityBusFluidStorage tile = (TileEntityBusFluidStorage) world.getBlockTileEntity(x, y, z);
      tile.setPriority(priority);
    }
  }
View Full Code Here

TOP

Related Classes of extracells.tileentity.TileEntityBusFluidStorage

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.