Search in sources :

Example 1 with IRotation

use of com.builtbroken.mc.api.tile.access.IRotation in project Engine by VoltzEngine-Project.

the class MultiBlockListener method getLayoutOfMultiBlock.

@Override
public HashMap<IPos3D, String> getLayoutOfMultiBlock() {
    if (doRotation) {
        TileEntity tileEntity = getTileEntity();
        ForgeDirection dir = null;
        if (tileEntity instanceof IRotation) {
            dir = ((IRotation) tileEntity).getDirection();
        } else if (tileEntity instanceof ITileNodeHost && ((ITileNodeHost) tileEntity).getTileNode() instanceof IRotation) {
            dir = ((IRotation) ((ITileNodeHost) tileEntity).getTileNode()).getDirection();
        }
        return getLayoutOfMultiBlock(dir);
    }
    return MultiBlockLayoutHandler.get(layoutKey);
}
Also used : TileEntity(net.minecraft.tileentity.TileEntity) IRotation(com.builtbroken.mc.api.tile.access.IRotation) ITileNodeHost(com.builtbroken.mc.api.tile.node.ITileNodeHost) ForgeDirection(net.minecraftforge.common.util.ForgeDirection)

Aggregations

IRotation (com.builtbroken.mc.api.tile.access.IRotation)1 ITileNodeHost (com.builtbroken.mc.api.tile.node.ITileNodeHost)1 TileEntity (net.minecraft.tileentity.TileEntity)1 ForgeDirection (net.minecraftforge.common.util.ForgeDirection)1