Search in sources :

Example 1 with DirectionalExtenderScrollOptionSlot

use of com.simibubi.create.content.contraptions.components.structureMovement.DirectionalExtenderScrollOptionSlot in project Create by Creators-of-Create.

the class MechanicalPistonTileEntity method getMovementModeSlot.

@Override
protected ValueBoxTransform getMovementModeSlot() {
    return new DirectionalExtenderScrollOptionSlot((state, d) -> {
        Axis axis = d.getAxis();
        Axis extensionAxis = state.getValue(MechanicalPistonBlock.FACING).getAxis();
        Axis shaftAxis = ((IRotate) state.getBlock()).getRotationAxis(state);
        return extensionAxis != axis && shaftAxis != axis;
    });
}
Also used : IRotate(com.simibubi.create.content.contraptions.base.IRotate) DirectionalExtenderScrollOptionSlot(com.simibubi.create.content.contraptions.components.structureMovement.DirectionalExtenderScrollOptionSlot) Axis(net.minecraft.core.Direction.Axis)

Example 2 with DirectionalExtenderScrollOptionSlot

use of com.simibubi.create.content.contraptions.components.structureMovement.DirectionalExtenderScrollOptionSlot in project Create by Creators-of-Create.

the class IBearingTileEntity method getMovementModeSlot.

default ValueBoxTransform getMovementModeSlot() {
    return new DirectionalExtenderScrollOptionSlot((state, d) -> {
        Axis axis = d.getAxis();
        Axis bearingAxis = state.getValue(BearingBlock.FACING).getAxis();
        return bearingAxis != axis;
    });
}
Also used : DirectionalExtenderScrollOptionSlot(com.simibubi.create.content.contraptions.components.structureMovement.DirectionalExtenderScrollOptionSlot) Axis(net.minecraft.core.Direction.Axis)

Aggregations

DirectionalExtenderScrollOptionSlot (com.simibubi.create.content.contraptions.components.structureMovement.DirectionalExtenderScrollOptionSlot)2 Axis (net.minecraft.core.Direction.Axis)2 IRotate (com.simibubi.create.content.contraptions.base.IRotate)1