Package net.minecraft.tileentity

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


    }

    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

    }

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

            tile.markDirty();
    }

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

        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

        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

        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

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

    @Override
    public void setInventorySlotContents(int i, ItemStack itemstack) {
        TileEntity tile = getTile();
        if (tile instanceof IInventory)
            ((IInventory) tile).setInventorySlotContents(i, itemstack);
    }
View Full Code Here

            ((IInventory) tile).setInventorySlotContents(i, itemstack);
    }

    @Override
    public String getInventoryName() {
        TileEntity tile = getTile();
        return tile instanceof IInventory ? ((IInventory) tile).getInventoryName() : "";
    }
View Full Code Here

        return tile instanceof IInventory ? ((IInventory) tile).getInventoryName() : "";
    }

    @Override
    public boolean hasCustomInventoryName() {
        TileEntity tile = getTile();
        return tile instanceof IInventory && ((IInventory) tile).hasCustomInventoryName();
    }
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.