uh substitutions mode is not complete yet

This commit is contained in:
asdflj committed 2022-11-15 09:15:30 +08:00
1 parent 244e7fb4f8
commit dc7c33bfa0
7 files changed
+33 -31

No files matched your search

@@ -2,7 +2,6 @@ package com.glodblock.github.client.gui;
import appeng.api.config.ActionItems;
import appeng.api.config.ItemSubstitution;
import appeng.api.config.PatternBeSubstitution;
import appeng.api.config.Settings;
import appeng.api.storage.ITerminalHost;
import appeng.client.gui.widgets.GuiImgButton;
@@ -118,19 +117,19 @@ public class GuiBaseFluidPatternTerminal extends GuiFCBaseMonitor {
this.buttonList.add(this.doubleBtn);
combineLeft = 84;
}
if (ModAndClassUtil.isBeSubstitutionsButton) {
combineLeft = 74;
combineTop -= 11;
this.beSubstitutionsEnabledBtn = new GuiImgButton(
this.guiLeft + 84, this.guiTop + this.ySize - 153, Settings.ACTIONS, PatternBeSubstitution.ENABLED);
this.beSubstitutionsEnabledBtn.setHalfSize(true);
this.buttonList.add(this.beSubstitutionsEnabledBtn);
this.beSubstitutionsDisabledBtn = new GuiImgButton(
this.guiLeft + 84, this.guiTop + this.ySize - 153, Settings.ACTIONS, PatternBeSubstitution.DISABLED);
this.beSubstitutionsDisabledBtn.setHalfSize(true);
this.buttonList.add(this.beSubstitutionsDisabledBtn);
}
// if (ModAndClassUtil.isBeSubstitutionsButton) {
// combineLeft = 74;
// combineTop -= 11;
// this.beSubstitutionsEnabledBtn = new GuiImgButton(
// this.guiLeft + 84, this.guiTop + this.ySize - 153, Settings.ACTIONS, PatternBeSubstitution.ENABLED);
// this.beSubstitutionsEnabledBtn.setHalfSize(true);
// this.buttonList.add(this.beSubstitutionsEnabledBtn);
//
// this.beSubstitutionsDisabledBtn = new GuiImgButton(
// this.guiLeft + 84, this.guiTop + this.ySize - 153, Settings.ACTIONS, PatternBeSubstitution.DISABLED);
// this.beSubstitutionsDisabledBtn.setHalfSize(true);
// this.buttonList.add(this.beSubstitutionsDisabledBtn);
// }
this.combineEnableBtn = new GuiFCImgButton(this.guiLeft + combineLeft, this.guiTop + this.ySize - combineTop, "FORCE_COMBINE", "DO_COMBINE");
this.combineEnableBtn.setHalfSize(true);
this.buttonList.add(this.combineEnableBtn);
@@ -1,6 +1,9 @@
package com.glodblock.github.client.gui;
import appeng.api.config.*;
import appeng.api.config.ActionItems;
import appeng.api.config.ItemSubstitution;
import appeng.api.config.PatternSlotConfig;
import appeng.api.config.Settings;
import appeng.api.storage.ITerminalHost;
import appeng.client.gui.widgets.GuiImgButton;
import appeng.client.gui.widgets.GuiScrollbar;
@@ -133,17 +136,17 @@ public class GuiBaseFluidPatternTerminalEx extends GuiFCBaseMonitor {
this.combineDisableBtn = new GuiFCImgButton(this.guiLeft + 87, this.guiTop + this.ySize - 114, "NOT_COMBINE", "DONT_COMBINE");
this.combineDisableBtn.setHalfSize(true);
this.buttonList.add(this.combineDisableBtn);
if (ModAndClassUtil.isBeSubstitutionsButton) {
this.beSubstitutionsEnabledBtn = new GuiImgButton(
this.guiLeft + 87, this.guiTop + this.ySize - 103, Settings.ACTIONS, PatternBeSubstitution.ENABLED);
this.beSubstitutionsEnabledBtn.setHalfSize(true);
this.buttonList.add(this.beSubstitutionsEnabledBtn);
this.beSubstitutionsDisabledBtn = new GuiImgButton(
this.guiLeft + 87, this.guiTop + this.ySize - 103, Settings.ACTIONS, PatternBeSubstitution.DISABLED);
this.beSubstitutionsDisabledBtn.setHalfSize(true);
this.buttonList.add(this.beSubstitutionsDisabledBtn);
}
// if (ModAndClassUtil.isBeSubstitutionsButton) {
// this.beSubstitutionsEnabledBtn = new GuiImgButton(
// this.guiLeft + 87, this.guiTop + this.ySize - 103, Settings.ACTIONS, PatternBeSubstitution.ENABLED);
// this.beSubstitutionsEnabledBtn.setHalfSize(true);
// this.buttonList.add(this.beSubstitutionsEnabledBtn);
//
// this.beSubstitutionsDisabledBtn = new GuiImgButton(
// this.guiLeft + 87, this.guiTop + this.ySize - 103, Settings.ACTIONS, PatternBeSubstitution.DISABLED);
// this.beSubstitutionsDisabledBtn.setHalfSize(true);
// this.buttonList.add(this.beSubstitutionsDisabledBtn);
// }
processingScrollBar.setTop(this.ySize - 164);
}
@@ -119,7 +119,7 @@ public class ContainerFluidPatternTerminal extends FCBasePartContainer implement
FluidPatternDetails pattern = new FluidPatternDetails(patternStack);
pattern.setInputs(collectInventory(craftingSlots));
pattern.setOutputs(collectInventory(outputSlots));
pattern.setCanBeSubstitute(this.beSubstitute ? 1 : 0);
// pattern.setCanBeSubstitute(this.beSubstitute ? 1 : 0);
patternSlotOUT.putStack(pattern.writeToStack());
}
@@ -116,7 +116,7 @@ public class ContainerFluidPatternTerminalEx extends FCBasePartContainerEx imple
pattern.setCombine(this.combine ? 1:0);
pattern.setInputs(collectInventory(craftingSlots));
pattern.setOutputs(collectInventory(outputSlots));
pattern.setCanBeSubstitute(this.beSubstitute ? 1 : 0);
// pattern.setCanBeSubstitute(this.beSubstitute ? 1 : 0);
patternSlotOUT.putStack(pattern.writeToStack());
}
@@ -140,7 +140,7 @@ public class PartFluidPatternTerminal extends FCBasePart {
if(newStack != null){
NBTTagCompound data = newStack.getTagCompound();
this.setCombineMode(data.getInteger("combine") == 1);
this.setBeSubstitute(data.getBoolean("beSubstitute"));
// this.setBeSubstitute(data.getBoolean("beSubstitute"));
}
for (int i = 0; i < this.crafting.getSizeInventory(); i++) {
this.crafting.setInventorySlotContents(i, null);
@@ -165,7 +165,7 @@ public class PartFluidPatternTerminalEx extends FCBasePart {
if(newStack != null){
NBTTagCompound data = newStack.getTagCompound();
this.setCombineMode(data.getInteger("combine") == 1);
this.setBeSubstitute(data.getBoolean("beSubstitute"));
// this.setBeSubstitute(data.getBoolean("beSubstitute"));
}
this.setInverted(inputsCount <= 8 && outputCount > 8);
this.setActivePage(0);
@@ -73,7 +73,7 @@ public final class ModAndClassUtil {
}
try {
Field d = ButtonToolTips.class.getDeclaredField("BeSubstitutionsDescEnabled");
isBeSubstitutionsButton = true;
// isBeSubstitutionsButton = true;
} catch (NoSuchFieldException e) {
isBeSubstitutionsButton = false;
}