Package net.minecraft.tileentity

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


  }

  @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

    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

    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

  }

  @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

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

    }
    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

    public IIcon getIconFromSideAfterCheck(TileEntity tile, int meta, int side) {
        return icons[((TileRPlacer) tile).orientation == side ? 1 : 0];
    }
    @Override
    public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack) {
        TileEntity tile = par1World.getTileEntity(par2, par3, par4);
        ((TileRPlacer) tile).orientation = BlockPistonBase.determineOrientation(par1World, par2, par3, par4, par5EntityLivingBase);
        par1World.markBlockForUpdate(par2, par3, par4);
    }
View Full Code Here

        return true;
    }

    @Override
    public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) {
        TileEntity tile = par1World.getTileEntity(par2, par3, par4);
        if (tile != null && tile instanceof TileRPlacer) {
            TileRPlacer placer = (TileRPlacer) tile;
            placer.receiveRedstonePulse();
        }
    }
View Full Code Here

  public final TileEntity getTile() {
    if (!worldObj.blockExists(x, y, z))
      return null;

    TileEntity tile = worldObj.getTileEntity(x, y, z);

    if (tile == null && tileRequiredAtLink() || (Math.abs(x - xCoord) > getMaxDistance() || Math.abs(y - yCoord) > getMaxDistance() || Math.abs(z - zCoord) > getMaxDistance()) && !cheaty) {
      y = -1;
      return null;
    }
View Full Code Here

TOP

Related Classes of net.minecraft.tileentity.TileEntity

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.