sorry guys, no more ccgt fusion

- fixes OC compat state functions to check current state before changing it
- fixed shutdown glitching out when doing it immediately after startup
This commit is contained in:
Voxelstice 2026-02-26 17:08:45 +03:00
parent c34e9c15e4
commit d5e53550ef

View File

@ -278,6 +278,7 @@ public class TileEntityMachineTurbineGas extends TileEntityMachineBase implement
}
if(counter == 580) {
counter = 225; // ensures it shuts down properly when done immediately after startup
state = 1;
}
}
@ -636,14 +637,14 @@ public class TileEntityMachineTurbineGas extends TileEntityMachineBase implement
@Callback(direct = true, limit = 4)
@Optional.Method(modid = "OpenComputers")
public Object[] start(Context context, Arguments args) {
state = -1;
if (state == 0) state = -1;
return new Object[] {};
}
@Callback(direct = true, limit = 4)
@Optional.Method(modid = "OpenComputers")
public Object[] stop(Context context, Arguments args) {
state = 0;
if (state == 1) state = 0;
return new Object[] {};
}