Examples of TileEntity


Examples of net.minecraft.tileentity.TileEntity

    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

Examples of net.minecraft.tileentity.TileEntity

        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

Examples of net.minecraft.tileentity.TileEntity

  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

Examples of net.minecraft.tileentity.TileEntity

      this(worldObj.getBlock(coords.posX, coords.posY, coords.posZ), worldObj.getBlockMetadata(coords.posX, coords.posY, coords.posZ), worldObj.getTileEntity(coords.posX, coords.posY, coords.posZ), coords);
    }

    public void clearTileEntityAt() {
      if (block != null) {
        TileEntity tileToSet = block.createTileEntity(worldObj, meta);
        worldObj.setTileEntity(coords.posX, coords.posY, coords.posZ, tileToSet);
      }
    }
View Full Code Here

Examples of net.minecraft.tileentity.TileEntity

    }

    public void setTo(ChunkCoordinates coords) {
            worldObj.setBlock(coords.posX, coords.posY, coords.posZ, block, meta, 2);

      TileEntity tile = this.tile == null ? null : TileEntity.createAndLoadEntity(this.tile);

      worldObj.setTileEntity(coords.posX, coords.posY, coords.posZ, tile);

      if (tile != null) {
        tile.xCoord = coords.posX;
        tile.yCoord = coords.posY;
        tile.zCoord = coords.posZ;
        tile.updateContainingBlockInfo();
      }

            //if (block != null)
            //  block.onNeighborBlockChange(worldObj, coords.posX, coords.posY, coords.posZ, ThaumicTinkerer.registry.getFirstBlockFromClass(BlockTransvectorDislocator.class));
View Full Code Here

Examples of net.minecraft.tileentity.TileEntity

    }

    @Override
    public void markDirty() {
        super.markDirty();
        TileEntity tile = getTile();
        if (tile != null)
            tile.markDirty();
    }
View Full Code Here

Examples of net.minecraft.tileentity.TileEntity

            tile.markDirty();
    }

    @Override
    public int getSizeInventory() {
        TileEntity tile = getTile();
        return tile instanceof IInventory ? ((IInventory) tile).getSizeInventory() : 0;
    }
View Full Code Here

Examples of net.minecraft.tileentity.TileEntity

        return tile instanceof IInventory ? ((IInventory) tile).getSizeInventory() : 0;
    }

    @Override
    public ItemStack getStackInSlot(int i) {
        TileEntity tile = getTile();
        return tile instanceof IInventory ? ((IInventory) tile).getStackInSlot(i) : null;
    }
View Full Code Here

Examples of net.minecraft.tileentity.TileEntity

        return tile instanceof IInventory ? ((IInventory) tile).getStackInSlot(i) : null;
    }

    @Override
    public ItemStack decrStackSize(int i, int j) {
        TileEntity tile = getTile();
        return tile instanceof IInventory ? ((IInventory) tile).decrStackSize(i, j) : null;
    }
View Full Code Here

Examples of net.minecraft.tileentity.TileEntity

        return tile instanceof IInventory ? ((IInventory) tile).decrStackSize(i, j) : null;
    }

    @Override
    public ItemStack getStackInSlotOnClosing(int i) {
        TileEntity tile = getTile();
        return tile instanceof IInventory ? ((IInventory) tile).getStackInSlotOnClosing(i) : null;
    }
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.