mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +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)
|
@Callback(direct = true, limit = 4)
|
||||||
@Optional.Method(modid = "OpenComputers")
|
@Optional.Method(modid = "OpenComputers")
|
||||||
public Object[] setThrottle(Context context, Arguments args) {
|
public Object[] setThrottle(Context context, Arguments args) {
|
||||||
powerSliderPos = (int) (args.checkInteger(0) * 60D / 100D);
|
double input = args.checkInteger(0) * 60D / 100D;
|
||||||
return new Object[] {};
|
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)
|
@Callback(direct = true, limit = 4)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user