Examples of TileEntity


Examples of net.minecraft.tileentity.TileEntity

public class GuiHandler implements IGuiHandler {

  @Override
  public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
    TileEntity tile = world.getTileEntity(x, y, z);
    switch (ID) {
      case LibGuiIDs.GUI_ID_TABLET:
        return new ContainerAnimationTablet((TileAnimationTablet) tile, player.inventory);

      case LibGuiIDs.GUI_ID_MOB_MAGNET:
View Full Code Here

Examples of net.minecraft.tileentity.TileEntity

    return null;
  }

  @Override
  public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
    TileEntity tile = world.getTileEntity(x, y, z);
    switch (ID) {
      case LibGuiIDs.GUI_ID_TABLET:
        return new GuiAnimationTablet((TileAnimationTablet) tile, player.inventory);

      case LibGuiIDs.GUI_ID_MOB_MAGNET:
View Full Code Here

Examples of net.minecraft.tileentity.TileEntity

      if (world == null) {
        MiscHelper.printCurrentStackTrace("No world found for dimension " + message.dim + "!");
        return null;
      }

      TileEntity tile = world.getTileEntity(message.x, message.y, message.z);
      if (tile != null) {
        message.tile = (T) tile;
      }
    }
    return null;
View Full Code Here

Examples of net.minecraft.tileentity.TileEntity

    if (!set) {
      Block bBlock = getBlock(par1ItemStack);
      int bmeta = getBlockMeta(par1ItemStack);

      TileEntity tile = par3World.getTileEntity(par4, par5, par6);
      if (tile != null && tile instanceof IInventory) {
        IInventory inv = (IInventory) tile;
        int[] slots = inv instanceof ISidedInventory ? ((ISidedInventory) inv).getAccessibleSlotsFromSide(par7) : TileTransvectorInterface.buildSlotsForLinearInventory(inv);
        for (int slot : slots) {
          ItemStack stackInSlot = inv.getStackInSlot(slot);
View Full Code Here

Examples of net.minecraft.tileentity.TileEntity

  }

  @Override
  public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) {
    if (!par1World.isRemote) {
      TileEntity tile = par1World.getTileEntity(par2, par3, par4);
      if (tile != null) {
        par1World.markBlockForUpdate(par2, par3, par4);
        par5EntityPlayer.openGui(ThaumicTinkerer.instance, LibGuiIDs.GUI_ID_ENCHANTER, par1World, par2, par3, par4);
      }
    }
View Full Code Here

Examples of net.minecraft.tileentity.TileEntity

    super(par2Material);
  }

  @Override
  public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
    TileEntity tile = world.getTileEntity(x, y, z);
    int meta = world.getBlockMetadata(x, y, z);

    if (tile instanceof TileCamo) {
      TileCamo camo = (TileCamo) tile;
      Block block = camo.camo;
View Full Code Here

Examples of net.minecraft.tileentity.TileEntity

    return validRenderTypes.contains(type);
  }

  @Override
  public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) {
    TileEntity tile = par1World.getTileEntity(par2, par3, par4);

    if (tile instanceof TileCamo) {
      TileCamo camo = (TileCamo) tile;
      ItemStack currentStack = par5EntityPlayer.getCurrentEquippedItem();
View Full Code Here

Examples of net.minecraft.tileentity.TileEntity

  }

  @SideOnly(Side.CLIENT)
  @Override
  public int colorMultiplier(IBlockAccess par1World, int par2, int par3, int par4) {
    TileEntity tile = par1World.getTileEntity(par2, par3, par4);
    if (tile instanceof TileCamo) {
      TileCamo camo = (TileCamo) tile;
      Block block = camo.camo;
      if (block != null)
        return block instanceof BlockCamo ? 0xFFFFFF : block.colorMultiplier(par1World, par2, par3, par4);
View Full Code Here

Examples of net.minecraft.tileentity.TileEntity

public class BlockMobilizer extends BlockMod {

  @Override
  public void onBlockPreDestroy(World par1World, int par2, int par3,
                                int par4, int par5) {
    TileEntity tile = par1World.getTileEntity(par2, par3, par4);
    if (tile != null && tile instanceof TileEntityMobilizer) {

      ((TileEntityMobilizer) tile).dead = true;
    }
    super.onBlockPreDestroy(par1World, par2, par3, par4, par5);
View Full Code Here

Examples of net.minecraft.tileentity.TileEntity

    }
    IIcon[] icons = new IIcon[2];

    @Override
    public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) {
        TileEntity tile = par1World.getTileEntity(par2, par3, par4);

        TileRPlacer dislocator = (TileRPlacer) tile;
        ItemStack currentStack = par5EntityPlayer.getCurrentEquippedItem();

        if (currentStack != null && currentStack.getItem() == ConfigItems.itemWandCasting) {
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.