Search in sources :

Example 11 with TileEntityElevatorBase

use of pneumaticCraft.common.tileentity.TileEntityElevatorBase in project PneumaticCraft by MineMaarten.

the class BlockElevatorFrame method getElevatorBlockHeight.

private float getElevatorBlockHeight(World world, int x, int y, int z) {
    TileEntityElevatorBase te = getElevatorTE(world, x, y, z);
    if (te == null)
        return 0F;
    float blockHeight = te.extension - (y - te.yCoord) + 1;
    // + blockHeight);
    if (blockHeight < 0F)
        return 0F;
    if (blockHeight > 1F)
        return 1F;
    return blockHeight;
}
Also used : TileEntityElevatorBase(pneumaticCraft.common.tileentity.TileEntityElevatorBase)

Aggregations

TileEntityElevatorBase (pneumaticCraft.common.tileentity.TileEntityElevatorBase)11 TileEntity (net.minecraft.tileentity.TileEntity)4 EntityItem (net.minecraft.entity.item.EntityItem)2 ItemStack (net.minecraft.item.ItemStack)2 Random (java.util.Random)1 Block (net.minecraft.block.Block)1 ItemBlock (net.minecraft.item.ItemBlock)1