mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-02-24 15:00:48 +00:00
fix CCGT allowing throttle over max when using OpenComputers callbacks
This commit is contained in:
parent
5fb88801ec
commit
8686a64141
@ -619,8 +619,11 @@ public class TileEntityMachineTurbineGas extends TileEntityMachineBase implement
|
||||
@Callback(direct = true, limit = 4)
|
||||
@Optional.Method(modid = "OpenComputers")
|
||||
public Object[] setThrottle(Context context, Arguments args) {
|
||||
powerSliderPos = (int) (args.checkInteger(0) * 60D / 100D);
|
||||
return new Object[] {};
|
||||
double input = args.checkInteger(0) * 60D / 100D;
|
||||
if (input < 0 || input > 100)
|
||||
return new Object[] {null, "Input out of range."};
|
||||
powerSliderPos = (int) (input);
|
||||
return new Object[] {true};
|
||||
}
|
||||
|
||||
@Callback(direct = true, limit = 4)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user