Package net.minecraft.tileentity

Examples of net.minecraft.tileentity.TileEntity


    @Override
    public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World worldObj, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
    {
        if (!worldObj.isRemote && this.onUse(stack))
        {
            TileEntity te = worldObj.getBlockTileEntity(x, y, z);
           
            if (te instanceof IConductor)
            {
                IConductor wireTile = (IConductor) te;
               
View Full Code Here


    @Override
    public void onBlockAdded(World world, int x, int y, int z)
    {
        super.onBlockAdded(world, x, y, z);
       
        TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
       
        if (tileEntity != null)
        {
            if (tileEntity instanceof IConductor)
            {
View Full Code Here

    }
   
    @Override
    public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int x, int y, int z)
    {
        TileEntity tileEntity = par1IBlockAccess.getBlockTileEntity(x, y, z);
        if (tileEntity instanceof TileEntityConductorBase)
        {
            TileEntityConductorBase te = (TileEntityConductorBase) tileEntity;
            this.minX = te.getAdjacentConnections()[4] != null ? 0F : 0.3F;
            this.minY = te.getAdjacentConnections()[0] != null ? 0F : 0.3F;
View Full Code Here

    }
   
    @Override
    public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int x, int y, int z)
    {
        TileEntity tileEntity = par1IBlockAccess.getBlockTileEntity(x, y, z);
        if (tileEntity instanceof TileEntityConductorBase)
        {
            TileEntityConductorBase te = (TileEntityConductorBase) tileEntity;
            this.minX = te.getAdjacentConnections()[4] != null ? 0F : 0.3F;
            this.minY = te.getAdjacentConnections()[0] != null ? 0F : 0.3F;
View Full Code Here

    }
   
    @Override
    public void setBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int x, int y, int z)
    {
        TileEntity tileEntity = par1IBlockAccess.getBlockTileEntity(x, y, z);
        if (tileEntity instanceof TileEntityConductorBase)
        {
            TileEntityConductorBase te = (TileEntityConductorBase) tileEntity;
            this.minX = te.getAdjacentConnections()[4] != null ? 0F : 0.3F;
            this.minY = te.getAdjacentConnections()[0] != null ? 0F : 0.3F;
View Full Code Here

        return true;
    }
   
    public int getComparatorInputOverride(World par1World, int x, int y, int z, int meta)
    {
        TileEntity tileEntity = par1World.getBlockTileEntity(x, y, z);
       
        if (tileEntity instanceof TileEntityAdvancedBatteryBox)
        {
            TileEntityAdvancedBatteryBox te = (TileEntityAdvancedBatteryBox) tileEntity;
            float max = te.getMaxEnergyStored();
View Full Code Here

    public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9)
    {
        if (super.onBlockActivated(world, x, y, z, player, par6, par7, par8, par9))
            return true;
       
        TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
        if (tileEntity instanceof TileEntityConductorBase)
        {
            TileEntityConductorBase te = (TileEntityConductorBase) tileEntity;
            if (player.inventory.getCurrentItem() != null && player.inventory.getCurrentItem().getItem() instanceof ItemBlock)
            {
View Full Code Here

        super.updateEntity();
       
        if (!this.worldObj.isRemote)
        {
            ForgeDirection inputDirection = ForgeDirection.getOrientation(this.getBlockMetadata() + 2);
            TileEntity inputTile = VectorHelper.getTileEntityFromSide(this.worldObj, new Vector3(this), inputDirection);
           
            if (inputTile instanceof INetworkProvider)
                this.network = ((INetworkProvider) inputTile).getNetwork();
            else
                this.network = null;
View Full Code Here

    }
   
    @Override
    public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
    {
        TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
        if (tileEntity != null)
        {
            switch (ID)
            {
                case 0:
View Full Code Here

    }
   
    @Override
    public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
    {
        TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
        if (tileEntity != null)
        {
            switch (ID)
            {
                case 0:
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.