Fix AESU and Fusion control buttons

This commit is contained in:
modmuss50 2019-08-18 15:54:25 +01:00
parent 7f8bd2ab1f
commit 0bcf782f57
4 changed files with 35 additions and 32 deletions

View file

@ -68,29 +68,19 @@ public class AdjustableSUBlockEntity extends EnergyStorageBlockEntity implements
}
public void handleGuiInputFromClient(int id, boolean shift, boolean ctrl) {
if (id == 300) {
OUTPUT += shift ? 4096 : 256;
if(ctrl){
//Set to max, limited to the max later
OUTPUT = Integer.MAX_VALUE;
}
if(shift){
id *= 4;
}
if (id == 301) {
OUTPUT += shift ? 512 : 64;
}
if (id == 302) {
OUTPUT -= shift ? 512 : 64;
}
if (id == 303) {
OUTPUT -= shift ? 4096 : 256;
if(ctrl){
OUTPUT = 1;
}
if(ctrl){
id *= 8;
}
OUTPUT += id;
if (OUTPUT > getMaxConfigOutput()) {
OUTPUT = getMaxConfigOutput();
}
if (OUTPUT <= -1) {
if (OUTPUT <= 0) {
OUTPUT = 0;
}
}