Fix stupidity

This commit is contained in:
t3435ryt 2025-01-24 20:42:44 -05:00
parent 1274fdcbac
commit 0222ebfaf9

View File

@ -398,11 +398,11 @@ public class TileEntityMachineCombustionEngine extends TileEntityMachinePollutin
@Callback(direct = true, limit = 4)
@Optional.Method(modid = "OpenComputers")
public Object[] setThrottle(Context context, Arguments args) {
throttleRequest = args.checkInteger(0);
if ((throttleRequest < 0) or (throttleRequest > 30)) { // return false without doing anything if number is outside normal
int throttleRequest = args.checkInteger(0);
if ((throttleRequest < 0) || (throttleRequest > 30)) { // return false without doing anything if number is outside normal
return new Object[] {false, "Throttle request outside of range 0-30"};
};
setting = (int) (throttleRequest);
setting = throttleRequest;
return new Object[] {true};
}