use of com.simibubi.create.content.contraptions.components.motor.CreativeMotorTileEntity in project Create by Creators-of-Create.
the class SpeedControllerTileEntity method addBehaviours.
@Override
public void addBehaviours(List<TileEntityBehaviour> behaviours) {
super.addBehaviours(behaviours);
Integer max = AllConfigs.SERVER.kinetics.maxRotationSpeed.get();
targetSpeed = new ScrollValueBehaviour(Lang.translate("generic.speed"), this, new ControllerValueBoxTransform());
targetSpeed.between(-max, max);
targetSpeed.value = DEFAULT_SPEED;
targetSpeed.moveText(new Vec3(9, 0, 10));
targetSpeed.withUnit(i -> Lang.translate("generic.unit.rpm"));
targetSpeed.withCallback(i -> this.updateTargetRotation());
targetSpeed.withStepFunction(CreativeMotorTileEntity::step);
behaviours.add(targetSpeed);
}
Aggregations