From 95261c5d28b558d64b17b70f01e0909674b9bf55 Mon Sep 17 00:00:00 2001 From: reobf <2215595288@qq.com> Date: Wed, 28 Aug 2024 14:51:59 +0800 Subject: [PATCH] update --- build.gradle | 2 +- dependencies.gradle | 5 + .../ae/BlockCyclicPatternSubmitter.java | 15 +- .../proghatches/ae/PartAmountMaintainer.java | 103 +++++++++++- .../ae/TileCyclicPatternSubmitter.java | 150 ++++++++++++++++-- .../reobf/proghatches/eucrafting/AECover.java | 68 +++++++- .../proghatches/eucrafting/InterfaceData.java | 1 + .../eucrafting/InterfaceP2PData.java | 1 + .../eucrafting/InterfaceP2PEUData.java | 1 + .../eucrafting/InterfaceP2PNoFluidData.java | 1 + .../BufferedDualInputHatch.java | 8 +- .../gt/metatileentity/DataHatchME.java | 7 + .../gt/metatileentity/DualInputHatch.java | 26 ++- .../metatileentity/DualInputHatchSlave.java | 2 +- .../metatileentity/PatternDualInputHatch.java | 6 +- .../java/reobf/proghatches/main/MyMod.java | 6 +- .../proghatches/main/mixin/MixinPlugin.java | 2 +- .../mixin/mixins/part2/MixinIsWailaCall.java | 50 ++++++ .../main/registration/PHRecipes.java | 32 +++- .../registration/ProgHatchCreativeTab.java | 1 + .../proghatches/util/StackTraceUtil.java | 55 +++++++ .../assets/proghatches/lang/en_US.lang | 19 ++- .../assets/proghatches/lang/zh_CN.lang | 19 ++- 23 files changed, 525 insertions(+), 55 deletions(-) create mode 100644 src/main/java/reobf/proghatches/main/mixin/mixins/part2/MixinIsWailaCall.java create mode 100644 src/main/java/reobf/proghatches/util/StackTraceUtil.java diff --git a/build.gradle b/build.gradle index eb645d7..b3b181f 100644 --- a/build.gradle +++ b/build.gradle @@ -373,7 +373,7 @@ catch (Exception ignored) { // Pulls version first from the VERSION env and then git tag String identifiedVersion = null -String versionOverride = '0.0.18p14' +String versionOverride = '0.0.18p15' try { // Produce a version based on the tag, or for branches something like 0.2.2-configurable-maven-and-extras.38+43090270b6-dirty if (versionOverride == null) { diff --git a/dependencies.gradle b/dependencies.gradle index e3df693..95e606f 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -41,6 +41,7 @@ api("com.github.GTNewHorizons:NotEnoughEnergistics:1.5.1:dev") api("com.github.GTNewHorizons:NotEnoughItems:2.5.27-GTNH:dev") api("com.github.GTNewHorizons:GTNHLib:0.2.11:dev") api("com.github.GTNewHorizons:ModularUI:1.1.42:dev") + api("com.github.GTNewHorizons:ModularUI2:2.1.2-1.7.10:dev") api("com.github.GTNewHorizons:waila:1.7.3:dev") api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-356-GTNH:dev") api("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.2.29-gtnh:dev") @@ -77,4 +78,8 @@ api("com.github.GTNewHorizons:NotEnoughEnergistics:1.5.1:dev") api("com.github.GTNewHorizons:ae2stuff:0.8.2-GTNH:dev") api("com.github.GTNewHorizons:CraftTweaker:3.3.1:dev") { transitive = false } api('com.github.GTNewHorizons:GigaGramFab:0.3.19:dev') + + api("com.github.GTNewHorizons:ProjectRed:4.9.3-GTNH:dev") + api("com.github.GTNewHorizons:MrTJPCore:1.1.6:dev") + } diff --git a/src/main/java/reobf/proghatches/ae/BlockCyclicPatternSubmitter.java b/src/main/java/reobf/proghatches/ae/BlockCyclicPatternSubmitter.java index 4ac32eb..780ecc9 100644 --- a/src/main/java/reobf/proghatches/ae/BlockCyclicPatternSubmitter.java +++ b/src/main/java/reobf/proghatches/ae/BlockCyclicPatternSubmitter.java @@ -173,5 +173,18 @@ public boolean rotateBlock(World worldObj, int x, int y, int z, ForgeDirection a return true; } - +@Override +public boolean hasComparatorInputOverride() { + + return true; +} +@Override +public int getComparatorInputOverride(World worldIn, int x, int y, int z, int side) { + TileEntity te = worldIn.getTileEntity(x, y, z); + TileCyclicPatternSubmitter ts=(TileCyclicPatternSubmitter) te; + + + + return (ts.index*16)/ts.inv.length; +} } diff --git a/src/main/java/reobf/proghatches/ae/PartAmountMaintainer.java b/src/main/java/reobf/proghatches/ae/PartAmountMaintainer.java index cd5cd5d..d319dcf 100644 --- a/src/main/java/reobf/proghatches/ae/PartAmountMaintainer.java +++ b/src/main/java/reobf/proghatches/ae/PartAmountMaintainer.java @@ -3,6 +3,7 @@ import java.lang.reflect.Field; import java.util.Arrays; import java.util.HashMap; +import java.util.List; import java.util.Map; import com.glodblock.github.common.item.ItemFluidPacket; @@ -12,7 +13,9 @@ import com.google.common.collect.ImmutableMap; import com.gtnewhorizons.modularui.api.ModularUITextures; import com.gtnewhorizons.modularui.api.drawable.IDrawable; +import com.gtnewhorizons.modularui.api.drawable.ItemDrawable; import com.gtnewhorizons.modularui.api.drawable.Text; +import com.gtnewhorizons.modularui.api.drawable.shapes.Rectangle; import com.gtnewhorizons.modularui.api.forge.ItemStackHandler; import com.gtnewhorizons.modularui.api.math.Alignment; import com.gtnewhorizons.modularui.api.math.Color; @@ -94,7 +97,7 @@ public class PartAmountMaintainer extends PartBasicState implements IGuiProvidingPart,IGridTickable,IPowerChannelState{ private int mode; - + private int rsmode; //bit0 ->when offline,clear or maintain //bit1 ->when online,invert redstone @@ -119,9 +122,32 @@ public TickingRequest getTickingRequest(IGridNode node) { StorageChannel.ITEMS,AEItemStack.create(new ItemStack(Items.apple,0)) ); + boolean lastredstone; + + public boolean shouldProceed(boolean red, boolean lastredstone){ + switch (rsmode) { + case 0:return true; + case 1:return false; + case 2:return red; + case 3:return !red; + case 4:return red&&(!lastredstone); + case 5:return (!red)&&lastredstone; + + } + + + return true;} + + + @SuppressWarnings({ "rawtypes", "unchecked" }) @Override public TickRateModulation tickingRequest(IGridNode node, int TicksSinceLastCall) { + if(upgrade[0]==null)rsmode=0; + boolean red=this.getHost().hasRedstone(this.getSide()); + boolean should=shouldProceed(red,lastredstone); + lastredstone=red; + if(!should){return TickRateModulation.SAME;} if(getProxy().isActive()==false)return TickRateModulation.SAME; for(StorageChannel ch:new StorageChannel[]{StorageChannel.FLUIDS,StorageChannel.ITEMS}) { @@ -316,9 +342,12 @@ public boolean onPartActivate(EntityPlayer player, Vec3 pos) { return true; } + @Override public ModularWindow createWindow(UIBuildContext buildContext) { ModularWindow.Builder builder = ModularWindow.builder(176, 107+20); + + builder.setBackground(ModularUITextures.VANILLA_BACKGROUND); builder.bindPlayerInventory(buildContext.getPlayer()); @@ -331,6 +360,13 @@ public ModularWindow createWindow(UIBuildContext buildContext) { stack.setStackDisplayName("freq:"+freqTooltip); is.setStackInSlot(0, stack); } + + + + + + + builder.widget( TextWidget.dynamicString(()->{ try{ PartP2PTunnel p2p = getProxy().getP2P().getInput(freq); @@ -379,7 +415,7 @@ protected void phantomClick(ClickData clickData, ItemStack cursorStack) { } - }.setPos(3+4, 3) + }.disableShiftInsert().setPos(3+4, 3) .addTooltip( StatCollector.translateToLocal("proghatches.amountmaintainer.memorycard")) ); @@ -479,6 +515,54 @@ protected void phantomClick(ClickData clickData, ItemStack cursorStack) { ; builder.widget(new FakeSyncWidget.BooleanSyncer(()->on, s->on=s)); + + ItemStackHandler iss0=new ItemStackHandler(upgrade){ + + public boolean isItemValid(int slot, ItemStack stack) { + return Api.INSTANCE.definitions().materials().cardRedstone().isSameAs(stack); + + }; + public int getSlotLimit(int slot) { + return 1;}; + }; + + builder.widget( new SlotWidget(new BaseSlot(iss0, 0)){ + + + } + .setPos(60, 3+20).addTooltip(StatCollector.translateToLocal("proghatches.amountmaintainer.rscard"))); + + builder.widget(new CycleButtonWidget().setGetter(()->rsmode) + .setSetter(s->rsmode=s).setLength(6) + .setTextureGetter(s->{ + if(s==0)return new ItemDrawable(new ItemStack(Items.redstone)); + if(s==1)return new ItemDrawable(new ItemStack(Items.gunpowder)); + if(s==2)return GT_UITextures.OVERLAY_BUTTON_REDSTONE_ON; + if(s==3)return GT_UITextures.OVERLAY_BUTTON_REDSTONE_OFF; + if(s==4)return GT_UITextures.OVERLAY_BUTTON_ARROW_GREEN_UP; + return GT_UITextures.OVERLAY_BUTTON_ARROW_GREEN_DOWN; + }) + .addTooltip(0, StatCollector.translateToLocal("proghatches.amountmaintainer.rscard.mode.0")) + .addTooltip(1, StatCollector.translateToLocal("proghatches.amountmaintainer.rscard.mode.1")) + .addTooltip(2, StatCollector.translateToLocal("proghatches.amountmaintainer.rscard.mode.2")) + .addTooltip(3, StatCollector.translateToLocal("proghatches.amountmaintainer.rscard.mode.3")) + .addTooltip(4, StatCollector.translateToLocal("proghatches.amountmaintainer.rscard.mode.4")) + .addTooltip(5, StatCollector.translateToLocal("proghatches.amountmaintainer.rscard.mode.5")) + + + + .setBackground(() -> { + { + return new IDrawable[] { GT_UITextures.BUTTON_STANDARD, + }; + } + }) + .setEnabled((a)->(upgrade[0]!=null)) + .setSize(18, 18) + .setPos(60+20, 3+20)); + + + return builder.build(); } private boolean on; @@ -518,25 +602,30 @@ public Boolean getSignal(){ } long freq; private BaseActionSource source=new MachineSource(this); - + ItemStack[] upgrade=new ItemStack[1]; @Override public void readFromNBT(NBTTagCompound data) { freq=data.getLong("freq"); mode=data.getInteger("mode"); + rsmode=data.getInteger("rsmode"); redstone=data.getInteger("redstone"); amount=data.getLong("amount"); + lastredstone=data.getBoolean("lastredstone" ); mark[0]=ItemStack.loadItemStackFromNBT(data.getCompoundTag("mark")); + upgrade[0]=ItemStack.loadItemStackFromNBT(data.getCompoundTag("upgrade")); super.readFromNBT(data); } @Override public void writeToNBT(NBTTagCompound data) { data.setLong("freq", freq); data.setInteger("mode", mode); + data.setInteger("rsmode", rsmode); data.setInteger("redstone", redstone); data.setLong("amount", amount); + data.setBoolean("lastredstone", lastredstone); if(mark[0]!=null)data.setTag("mark", mark[0].writeToNBT(new NBTTagCompound())); - + if(upgrade[0]!=null)data.setTag("upgrade", upgrade[0].writeToNBT(new NBTTagCompound())); super.writeToNBT(data); } long amount=64; @@ -622,5 +711,9 @@ private IMEMonitor getStorage(IStorageGrid g,StorageChannel c){ } - + @Override + public void getDrops(final List drops, final boolean wrenched) { + if(upgrade[0]!=null) + drops.add(upgrade[0]); + } } diff --git a/src/main/java/reobf/proghatches/ae/TileCyclicPatternSubmitter.java b/src/main/java/reobf/proghatches/ae/TileCyclicPatternSubmitter.java index f404a1c..efdfdd8 100644 --- a/src/main/java/reobf/proghatches/ae/TileCyclicPatternSubmitter.java +++ b/src/main/java/reobf/proghatches/ae/TileCyclicPatternSubmitter.java @@ -11,12 +11,15 @@ import java.util.UUID; import java.util.function.Supplier; +import com.glodblock.github.common.item.ItemFluidEncodedPattern; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.gtnewhorizons.modularui.api.ModularUITextures; import com.gtnewhorizons.modularui.api.drawable.IDrawable; import com.gtnewhorizons.modularui.api.drawable.ItemDrawable; +import com.gtnewhorizons.modularui.api.drawable.UITexture; import com.gtnewhorizons.modularui.api.forge.IItemHandlerModifiable; +import com.gtnewhorizons.modularui.api.forge.ItemStackHandler; import com.gtnewhorizons.modularui.api.screen.ITileWithModularUI; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.api.screen.UIBuildContext; @@ -41,9 +44,11 @@ import appeng.api.networking.crafting.ICraftingRequester; import appeng.api.networking.security.IActionHost; import appeng.api.networking.security.MachineSource; +import appeng.api.networking.ticking.TickRateModulation; import appeng.api.storage.data.IAEItemStack; import appeng.api.util.AECableType; import appeng.api.util.DimensionalCoord; +import appeng.core.Api; import appeng.crafting.CraftingLink; import appeng.me.GridAccessException; import appeng.me.cluster.implementations.CraftingCPUCluster; @@ -57,6 +62,7 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.init.Items; import net.minecraft.inventory.ICrafting; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -75,8 +81,8 @@ public class TileCyclicPatternSubmitter extends TileEntity implements IGridProxy public static final int ALL = 0; public static final int DIM = 1; public static final int OWNER = 2; - - ItemStack[] inv=new ItemStack[16]; + int SLOT_SIZE=32; + ItemStack[] inv=new ItemStack[SLOT_SIZE]; /** * */ @@ -198,6 +204,10 @@ public void readFromNBT(NBTTagCompound compound) { index=compound.getInteger("index"); abortingMode =compound.getBoolean("abortingMode"); on =compound.getBoolean("on"); + lastredstone =compound.getBoolean("lastredstone"); + rsmode=compound.getInteger("rsmode"); + upgrade[0]=ItemStack.loadItemStackFromNBT(compound.getCompoundTag("upgrade")); + super.readFromNBT(compound); } @Override @@ -217,6 +227,11 @@ public void writeToNBT(NBTTagCompound compound) { compound.setInteger("index", index); compound.setBoolean("abortingMode", abortingMode); compound.setBoolean("on", on); + + compound.setBoolean("lastredstone", lastredstone); + compound.setInteger("rsmode", rsmode); + if(upgrade[0]!=null)compound.setTag("upgrade", upgrade[0].writeToNBT(new NBTTagCompound())); + super.writeToNBT(compound); } MachineSource source=new MachineSource(this); @@ -226,6 +241,15 @@ public void writeToNBT(NBTTagCompound compound) { @Override public void updateEntity() { ticksSinceLoaded++; + + if(upgrade[0]==null)rsmode=0; + boolean red=this.worldObj.isBlockIndirectlyGettingPowered(this.xCoord, this.yCoord, this.zCoord); + boolean should=shouldProceed(red,lastredstone); + lastredstone=red; + if(!should){return ;} + + + super.updateEntity(); if(!getProxy().isReady()) getProxy().onReady(); @@ -247,14 +271,14 @@ public void updateEntity() { if(last.isDone()||last.isCanceled()){ last=null; index=(index+1); - index=index%16; + index=index%SLOT_SIZE; } cpu = getCpu(last); } if(last==null){ int i=0; - while(inv[index]==null&&i<16){i++; - index=(index+1)%16;} + while(inv[index]==null&&i index, s -> index = s)); builder.widget(new FakeSyncWidget.BooleanSyncer(() -> on, s -> on = s)); //builder.widget(new FakeSyncWidget.IntegerSyncer(() -> tankselected, s -> tankselected = s)); - final IDrawable[] background = new IDrawable[] { GUITextureSet.DEFAULT.getItemSlot() }; - final IDrawable[] special = new IDrawable[] { GUITextureSet.DEFAULT.getItemSlot(), + final IDrawable[] background = new IDrawable[] { GUITextureSet.DEFAULT.getItemSlot(), GT_UITextures.OVERLAY_SLOT_PATTERN_ME}; + final IDrawable[] special = new IDrawable[] { GUITextureSet.DEFAULT.getItemSlot(), GT_UITextures.OVERLAY_SLOT_PATTERN_ME, new ItemDrawable(new ItemStack(MyMod.progcircuit)) //GT_UITextures.OVERLAY_BUTTON_CROSS }; - sc.widget(SlotGroup.ofItemHandler(inventoryHandler, 4) + + + + + for (int row = 0; row * 4 < inventoryHandler.getSlots() - 1; row++) { + int columnsToMake = Math.min(inventoryHandler.getSlots() - row * 4, 4); + for (int column = 0; column < columnsToMake; column++) { + int indexl= row * 4 + column; + sc.widget(new SlotWidget(new BaseSlot(inventoryHandler, indexl,true)) { + + public boolean onMouseScroll(int direction) { + return false;}; + public IDrawable[] getBackground() { + + if (indexl == index) { + return special; + } + ; + return background; + }}.setPos(column * 18, row * 18) + ); + } + } + + + /* + * SlotGroup do not respect Scrollable!!! + * sc.widget(SlotGroup.ofItemHandler(inventoryHandler, 4) .startFromSlot(0).endAtSlot(inv.length-1).background(background) .slotCreator(s->new BaseSlot(inventoryHandler, s,true)) @@ -517,8 +573,9 @@ public IDrawable[] getBackground() { .build() - ); - builder.widget(sc.setPos(3 + 4, 3 + 8).setSize(18 * 4, 18 * 4)); + );*/ + + builder.widget(sc.setPos(3 + 4, 3 + 8).setSize(18 * 4+1, 18 * 4)); @@ -543,14 +600,14 @@ public IDrawable[] getBackground() { builder.widget(new ButtonWidget() .setOnClick((a,b)->{ if(a.mouseButton==0){ - if(on)last=null; + //if(on)last=null; on=!on; } if(a.mouseButton==1){ on=false; last=null; - index=(index+1)%16; + index=(index+1)%SLOT_SIZE; } @@ -573,6 +630,54 @@ public IDrawable[] getBackground() { .setSize(18, 18) .setPos(120+20, 3+20)); + + + + ItemStackHandler iss0=new ItemStackHandler(upgrade){ + + public boolean isItemValid(int slot, ItemStack stack) { + return Api.INSTANCE.definitions().materials().cardRedstone().isSameAs(stack); + + }; + public int getSlotLimit(int slot) { + return 1;}; + }; + + builder.widget( new SlotWidget(new BaseSlot(iss0, 0)){ + + + } + .setPos(60+40, 3+20).addTooltip(StatCollector.translateToLocal("proghatches.amountmaintainer.rscard"))); + + builder.widget(new CycleButtonWidget().setGetter(()->rsmode) + .setSetter(s->rsmode=s).setLength(4) + .setTextureGetter(s->{ + if(s==0)return new ItemDrawable(new ItemStack(Items.redstone)); + if(s==1)return new ItemDrawable(new ItemStack(Items.gunpowder)); + if(s==2)return GT_UITextures.OVERLAY_BUTTON_REDSTONE_ON; + if(s==3)return GT_UITextures.OVERLAY_BUTTON_REDSTONE_OFF; + if(s==4)return GT_UITextures.OVERLAY_BUTTON_ARROW_GREEN_UP; + return GT_UITextures.OVERLAY_BUTTON_ARROW_GREEN_DOWN; + }) + .addTooltip(0, StatCollector.translateToLocal("proghatches.amountmaintainer.rscard.mode.0")) + .addTooltip(1, StatCollector.translateToLocal("proghatches.amountmaintainer.rscard.mode.1")) + .addTooltip(2, StatCollector.translateToLocal("proghatches.amountmaintainer.rscard.mode.2")) + .addTooltip(3, StatCollector.translateToLocal("proghatches.amountmaintainer.rscard.mode.3")) + // .addTooltip(4, StatCollector.translateToLocal("proghatches.amountmaintainer.rscard.mode.4")) + // .addTooltip(5, StatCollector.translateToLocal("proghatches.amountmaintainer.rscard.mode.5")) + + + + .setBackground(() -> { + { + return new IDrawable[] { GT_UITextures.BUTTON_STANDARD, + }; + } + }) + .setEnabled((a)->(upgrade[0]!=null)) + .setSize(18, 18) + .setPos(60+20+40, 3+20)); + /*sc = new Scrollable().setVerticalScroll(); final IDrawable[] background0 = new IDrawable[] { GUITextureSet.DEFAULT.getFluidSlot() }; @@ -628,7 +733,8 @@ protected int getTextColorOrDefault(String textType, int defaultColor) { protected final Supplier COLOR_TITLE = () -> getTextColorOrDefault("title", 0x222222); protected final Supplier COLOR_TEXT_GRAY = () -> getTextColorOrDefault("text_gray", 0x555555); protected final Supplier COLOR_TEXT_WARN = () -> getTextColorOrDefault("text_warn", 0xff0000); -} +} int rsmode; +ItemStack upgrade[]=new ItemStack[1]; @Override public ModularWindow createWindow(UIBuildContext buildContext) { @@ -636,4 +742,20 @@ public ModularWindow createWindow(UIBuildContext buildContext) { } boolean on=true; +boolean lastredstone; + +public boolean shouldProceed(boolean red, boolean lastredstone){ +switch (rsmode) { +case 0:return true; +case 1:return false; +case 2:return red; +case 3:return !red; +case 4:return red&&(!lastredstone); +case 5:return (!red)&&lastredstone; + +} + + +return true;} + } diff --git a/src/main/java/reobf/proghatches/eucrafting/AECover.java b/src/main/java/reobf/proghatches/eucrafting/AECover.java index 7d8bfb0..970d044 100644 --- a/src/main/java/reobf/proghatches/eucrafting/AECover.java +++ b/src/main/java/reobf/proghatches/eucrafting/AECover.java @@ -55,8 +55,14 @@ import net.minecraftforge.fluids.Fluid; import reobf.proghatches.main.Config; import reobf.proghatches.main.MyMod; +import reobf.proghatches.util.StackTraceUtil; public class AECover extends GT_CoverBehaviorBase { + + + public static boolean mixinReady;//mixin will set this to true + public static boolean getWailaBody; + public static boolean getNBTData; public static interface IMemoryCardSensitive { //public boolean shiftClick(EntityPlayer entityPlayer); @@ -206,8 +212,45 @@ public TileEntity fakeTile() { return null; } } - + static int h0="gregtech.crossmod.waila.GregtechWailaDataProvider".hashCode(); public static interface Data extends ISerializableObject, IGridProxyable { + + + default public boolean isWailaCall(){ + if (FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER) { + + /*String s=t.fillInStackTrace().getStackTrace()[6].getMethodName(); + if (s.hashCode()==h0&&s.equals("getNBTData")) { + return true; + } + s=t.fillInStackTrace().getStackTrace()[5].getMethodName(); + if (s.hashCode()==h0&&s.equals("getNBTData")) { + return true; + }*/ + if(mixinReady){ + + return getNBTData; + }else{ + String s=StackTraceUtil.getCallerMethod(6); + if (s.hashCode()==h0&&s.equals("gregtech.crossmod.waila.GregtechWailaDataProvider")) { + return true; + } + s=StackTraceUtil.getCallerMethod(5); + if (s.hashCode()==h0&&s.equals("gregtech.crossmod.waila.GregtechWailaDataProvider")) { + return true; + } + } + + + + + + + + } + return false; + } + IInterfaceHost getInterfaceOrNull(); default boolean hasModularGUI(){return false;} default String tagName(){ @@ -492,22 +535,29 @@ protected ItemStack getDisplayStackImpl(int aCoverID, Data aCoverVariable) { return is; } - private Throwable t = new Throwable(); + //private static Throwable t = new Throwable(); @Override public Data createDataObject() { - a: if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) { - // gregtech.api.metatileentity.CoverableTileEntity.getWailaBody - if (!t.fillInStackTrace().getStackTrace()[4].getMethodName().equals("getWailaBody")) { - break a; - } + if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) { + + + if(mixinReady){ + if(getWailaBody){ return new DummyData();} + }else{ + String s=StackTraceUtil.getCallerMethod(6); + if(s.hashCode()==h0&&s.equals("gregtech.crossmod.waila.GregtechWailaDataProvider")){ + // do not actually load cover data on client side // or there'll be some performance issue // this happens when waila trying to get cover info return new DummyData(); + } + + - } + }} ; try { @@ -631,6 +681,7 @@ protected boolean onCoverRemovalImpl(ForgeDirection side, int aCoverID, Data dat * e.printStackTrace(); } } */ static Method m; + static { try { m = GridNode.class.getDeclaredMethod("isValidDirection", ForgeDirection.class); @@ -848,4 +899,5 @@ public boolean isCoverPlaceable(ForgeDirection side, ItemStack aStack, ICoverabl return super.isCoverPlaceable(side, aStack, aTileEntity); } + } diff --git a/src/main/java/reobf/proghatches/eucrafting/InterfaceData.java b/src/main/java/reobf/proghatches/eucrafting/InterfaceData.java index 722557f..2324633 100644 --- a/src/main/java/reobf/proghatches/eucrafting/InterfaceData.java +++ b/src/main/java/reobf/proghatches/eucrafting/InterfaceData.java @@ -357,6 +357,7 @@ public void saveChanges() { @Override public NBTBase saveDataToNBT() { + if(isWailaCall())return new NBTTagCompound(); NBTBase t = Data.super.saveDataToNBT(); ((NBTTagCompound) t).setInteger("p", p); // ((NBTTagCompound) t).setString("name",name); diff --git a/src/main/java/reobf/proghatches/eucrafting/InterfaceP2PData.java b/src/main/java/reobf/proghatches/eucrafting/InterfaceP2PData.java index 5c9e70b..4ac8b15 100644 --- a/src/main/java/reobf/proghatches/eucrafting/InterfaceP2PData.java +++ b/src/main/java/reobf/proghatches/eucrafting/InterfaceP2PData.java @@ -426,6 +426,7 @@ public void saveChanges() { @Override public NBTBase saveDataToNBT() { + if(isWailaCall())return new NBTTagCompound(); NBTBase t = Data.super.saveDataToNBT(); ((NBTTagCompound) t).setInteger("p", p); duality.writeToNBT((NBTTagCompound) t); diff --git a/src/main/java/reobf/proghatches/eucrafting/InterfaceP2PEUData.java b/src/main/java/reobf/proghatches/eucrafting/InterfaceP2PEUData.java index 0e1e1da..c3677a6 100644 --- a/src/main/java/reobf/proghatches/eucrafting/InterfaceP2PEUData.java +++ b/src/main/java/reobf/proghatches/eucrafting/InterfaceP2PEUData.java @@ -452,6 +452,7 @@ public void saveChanges() { @Override public NBTBase saveDataToNBT() { + if(isWailaCall())return new NBTTagCompound(); NBTTagCompound t = (NBTTagCompound) Data.super.saveDataToNBT(); ((NBTTagCompound) t).setInteger("p", p); duality.writeToNBT((NBTTagCompound) t); diff --git a/src/main/java/reobf/proghatches/eucrafting/InterfaceP2PNoFluidData.java b/src/main/java/reobf/proghatches/eucrafting/InterfaceP2PNoFluidData.java index 37df4c4..a5ce3a5 100644 --- a/src/main/java/reobf/proghatches/eucrafting/InterfaceP2PNoFluidData.java +++ b/src/main/java/reobf/proghatches/eucrafting/InterfaceP2PNoFluidData.java @@ -422,6 +422,7 @@ public void saveChanges() { @Override public NBTBase saveDataToNBT() { + if(isWailaCall())return new NBTTagCompound(); NBTBase t = Data.super.saveDataToNBT(); ((NBTTagCompound) t).setInteger("p", p); duality.writeToNBT((NBTTagCompound) t); diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/BufferedDualInputHatch.java b/src/main/java/reobf/proghatches/gt/metatileentity/BufferedDualInputHatch.java index 799f7c7..be3d992 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/BufferedDualInputHatch.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/BufferedDualInputHatch.java @@ -705,7 +705,7 @@ public boolean updateEveryTick() { public int preventSleep; @Override - public void startRecipeProcessing() { + public void startRecipeProcessingImpl() { if (isInputEmpty() == false&&getBaseMetaTileEntity().isAllowedToWork()) for (DualInvBuffer inv0 : this.sortByEmpty()) { @@ -719,7 +719,7 @@ public void startRecipeProcessing() { //inv0.clearRecipeIfNeeded(); } - super.startRecipeProcessing(); + super.startRecipeProcessingImpl(); } public static class DeferredEvaluator{ public DeferredEvaluator(Supplier provider){this.provider=provider;} @@ -1613,9 +1613,9 @@ public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlaye @Override - public CheckRecipeResult endRecipeProcessing(GT_MetaTileEntity_MultiBlockBase controller) { + public CheckRecipeResult endRecipeProcessingImpl(GT_MetaTileEntity_MultiBlockBase controller) { dirty = true; - return super.endRecipeProcessing(controller); + return super.endRecipeProcessingImpl(controller); } @Override diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/DataHatchME.java b/src/main/java/reobf/proghatches/gt/metatileentity/DataHatchME.java index 69573c1..67c66c4 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/DataHatchME.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/DataHatchME.java @@ -34,6 +34,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_DataAccess; import gregtech.api.render.TextureFactory; import gregtech.api.util.GT_Utility; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -279,4 +280,10 @@ public ITexture[] getTexturesActive(ITexture aBaseTexture) { public ITexture[] getTexturesInactive(ITexture aBaseTexture) { return new ITexture[] { aBaseTexture, TextureFactory.of(BlockIcons.OVERLAY_ME_INPUT_HATCH) }; } +@Override +public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + + return false;//no gui +} + } diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatch.java b/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatch.java index 682c22e..a3cec3d 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatch.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatch.java @@ -1420,9 +1420,18 @@ private void addUIWidgets0(ModularWindow.Builder builder, UIBuildContext buildCo public int fluidSlotsPerRow() { return 1; } - + + boolean recipe; + @Override - public void startRecipeProcessing() { + public final void startRecipeProcessing() { + + if(recipe){return;} + recipe=true; + startRecipeProcessingImpl(); + } + + public void startRecipeProcessingImpl() { if (program) program(); shared.startRecipeProcessing(); @@ -1477,8 +1486,19 @@ private void fillStacksIntoFirstSlotsExtraCircuit() { slots.merge(sID, toSet, (a, b) -> a - b); } } + CheckRecipeResult lastresult; @Override - public CheckRecipeResult endRecipeProcessing(GT_MetaTileEntity_MultiBlockBase controller) { + public final CheckRecipeResult endRecipeProcessing(GT_MetaTileEntity_MultiBlockBase controller) { + + + if(recipe){recipe=false; + return lastresult=endRecipeProcessingImpl(controller); + } + + return lastresult; + } + + public CheckRecipeResult endRecipeProcessingImpl(GT_MetaTileEntity_MultiBlockBase controller) { this.markDirty(); updateSlots(); boolean success=shared.endRecipeProcessing(controller); diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchSlave.java b/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchSlave.java index 09043c8..1f1e9df 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchSlave.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/DualInputHatchSlave.java @@ -309,7 +309,7 @@ public void startRecipeProcessing() { public CheckRecipeResult endRecipeProcessing(GT_MetaTileEntity_MultiBlockBase controller) { if(getMaster() != null) if(getMaster() instanceof IRecipeProcessingAwareDualHatch) - ((IRecipeProcessingAwareDualHatch)getMaster()).endRecipeProcessing(controller); + return ((IRecipeProcessingAwareDualHatch)getMaster()).endRecipeProcessing(controller); return CheckRecipeResultRegistry.SUCCESSFUL; } @Override diff --git a/src/main/java/reobf/proghatches/gt/metatileentity/PatternDualInputHatch.java b/src/main/java/reobf/proghatches/gt/metatileentity/PatternDualInputHatch.java index 254c775..73553cf 100644 --- a/src/main/java/reobf/proghatches/gt/metatileentity/PatternDualInputHatch.java +++ b/src/main/java/reobf/proghatches/gt/metatileentity/PatternDualInputHatch.java @@ -254,6 +254,10 @@ public PatternDualInputHatch(int id, String name, String nameRegional, int tier, throw new AssertionError(); } } + public int fluidSlots(){ + return 16; + + } ItemStack[] pattern = new ItemStack[36]; @@ -508,7 +512,7 @@ private void clearInv() { for (int i = 0; i < 16; i++) mInventory[i] = null; - for (int i = 0; i < 4; i++) + for (int i = 0; i < this.fluidSlots(); i++) mStoredFluid[i].setFluid(null); ; diff --git a/src/main/java/reobf/proghatches/main/MyMod.java b/src/main/java/reobf/proghatches/main/MyMod.java index 7f423a9..4bfab71 100644 --- a/src/main/java/reobf/proghatches/main/MyMod.java +++ b/src/main/java/reobf/proghatches/main/MyMod.java @@ -101,6 +101,7 @@ import gregtech.common.blocks.GT_Block_Machines; import gregtech.common.covers.CoverInfo; import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_HeatExchanger; +import gregtech.crossmod.waila.GregtechWailaDataProvider; import reobf.proghatches.Tags; import reobf.proghatches.block.ChunkTrackingGridCahce; import reobf.proghatches.eucrafting.BlockEUInterface; @@ -136,9 +137,10 @@ ) public class MyMod { public static MyMod instance; - {ContainerOptimizePatterns.class.getDeclaredFields(); - // BaseMetaPipeEntity.class.getDeclaredFields(); + { instance = this; + GregtechWailaDataProvider + .class.getDeclaredFields(); } public static Deque scheduled=new ArrayDeque(); //public static ShutDownReason ACCESS_LOOP=new SimpleShutDownReason("proghatch.access_loop", true){public String getID() {return "proghatch.access_loop";};}; diff --git a/src/main/java/reobf/proghatches/main/mixin/MixinPlugin.java b/src/main/java/reobf/proghatches/main/mixin/MixinPlugin.java index c619303..0626023 100644 --- a/src/main/java/reobf/proghatches/main/mixin/MixinPlugin.java +++ b/src/main/java/reobf/proghatches/main/mixin/MixinPlugin.java @@ -179,7 +179,7 @@ public List getMixins() { retLate.add("MixinGolem"); retLate.add("MixinStorageChangeEvent"); retLate.add("MixinOptimize"); - //retLate.add("part2.MixinNoMultiplyForCircuit"); + retLate.add("part2.MixinIsWailaCall"); if (FMLLaunchHandler.side().isClient()) { if (!"true".equals(pp.get("noAEItemSortMixins"))) if(ff)retLate.add("MixinAEItemStackCompare"); diff --git a/src/main/java/reobf/proghatches/main/mixin/mixins/part2/MixinIsWailaCall.java b/src/main/java/reobf/proghatches/main/mixin/mixins/part2/MixinIsWailaCall.java new file mode 100644 index 0000000..63ad703 --- /dev/null +++ b/src/main/java/reobf/proghatches/main/mixin/mixins/part2/MixinIsWailaCall.java @@ -0,0 +1,50 @@ +package reobf.proghatches.main.mixin.mixins.part2; + +import java.util.List; + +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; + +import gregtech.api.interfaces.tileentity.IGregtechWailaProvider; +import gregtech.crossmod.waila.GregtechWailaDataProvider; +import mcp.mobius.waila.api.IWailaConfigHandler; +import mcp.mobius.waila.api.IWailaDataAccessor; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; +import reobf.proghatches.eucrafting.AECover; + +@Mixin(value=GregtechWailaDataProvider.class,remap=false) +public class MixinIsWailaCall { + static{ + AECover.mixinReady=true; + + } + + @Inject(at = { @At("HEAD") },method="getNBTData",remap=false) + public void getNBTData(final EntityPlayerMP player, final TileEntity tile, final NBTTagCompound tag, + final World world, int x, int y, int z,CallbackInfoReturnable r) { + AECover.getNBTData=true; + } + + @Inject(at = { @At("RETURN") },method="getNBTData",remap=false) + public void getNBTData1(final EntityPlayerMP player, final TileEntity tile, final NBTTagCompound tag, + final World world, int x, int y, int z,CallbackInfoReturnable r) { + AECover.getNBTData=false; + } + + @Inject(at = { @At("HEAD") },method="getWailaBody",remap=false) + public void getWailaBody(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, + IWailaConfigHandler config,CallbackInfoReturnable r) { + AECover.getWailaBody=true; + } + @Inject(at = { @At("RETURN") },method="getWailaBody",remap=false) + public void getWailaBody1(ItemStack itemStack, List currenttip, IWailaDataAccessor accessor, + IWailaConfigHandler config,CallbackInfoReturnable r) { + AECover.getWailaBody=false; + } +} diff --git a/src/main/java/reobf/proghatches/main/registration/PHRecipes.java b/src/main/java/reobf/proghatches/main/registration/PHRecipes.java index 010075b..b3e1817 100644 --- a/src/main/java/reobf/proghatches/main/registration/PHRecipes.java +++ b/src/main/java/reobf/proghatches/main/registration/PHRecipes.java @@ -112,7 +112,7 @@ public void run() { MyMod.LOG.info("Found new dreamcraft Nano-Piko-Quantum circuit, use oredict: Exotic-Cosmic-Transcendent."); mat=matNewVersion;} else{ - MyMod.LOG.info("Old version."); + MyMod.LOG.info("Good ol' version."); } //You just like breaking changes, isn't that true, GTNH dev? @@ -1175,11 +1175,39 @@ public void prefab(){ } + /* + GT_Values.RA.stdBuilder() + .itemInputs( + + gregtech.api.enums.ItemList.Shape_Mold_Block.get(0) + + ).fluidInputs( Materials.Grade8PurifiedWater.getFluid(256000)) + .itemOutputs( new ItemStack( + MyMod.submitter)) + + .duration(150 * SECONDS) + .eut(GT_Values.VP[8]) + .addTo(RecipeMaps.fluidSolidifierRecipes); - + GT_Values.RA.stdBuilder() + .itemInputs( + + gregtech.api.enums.ItemList.Shape_Mold_Plate.get(0) + + ).fluidInputs( Materials.Grade4PurifiedWater.getFluid(64000)) + .itemOutputs( new ItemStack( + MyMod.amountmaintainer)) + + .duration(150 * SECONDS) + .eut(GT_Values.VP[7]) + .addTo(RecipeMaps.fluidSolidifierRecipes); + */ } + + + boolean flag=true; public void smartArm(){ for (int i = 0; i < GT_Values.VP.length - 1; i++) { diff --git a/src/main/java/reobf/proghatches/main/registration/ProgHatchCreativeTab.java b/src/main/java/reobf/proghatches/main/registration/ProgHatchCreativeTab.java index 2a88680..e2b74ce 100644 --- a/src/main/java/reobf/proghatches/main/registration/ProgHatchCreativeTab.java +++ b/src/main/java/reobf/proghatches/main/registration/ProgHatchCreativeTab.java @@ -57,6 +57,7 @@ public void displayAllReleventItems(List p_78018_1_) { p_78018_1_.add(new ItemStack(MyMod.lazer_p2p_part)); p_78018_1_.add(new ItemStack(ConfigItems.itemGolemCore,1,120)); p_78018_1_.add(new ItemStack(MyMod.amountmaintainer)); + p_78018_1_.add(new ItemStack(MyMod.submitter)); // p_78018_1_.add(new ItemStack(MyMod.euupgrade, 1)); } diff --git a/src/main/java/reobf/proghatches/util/StackTraceUtil.java b/src/main/java/reobf/proghatches/util/StackTraceUtil.java new file mode 100644 index 0000000..aa93c87 --- /dev/null +++ b/src/main/java/reobf/proghatches/util/StackTraceUtil.java @@ -0,0 +1,55 @@ +package reobf.proghatches.util; + +import java.lang.invoke.MethodHandle; +import java.lang.invoke.MethodHandles; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.function.IntFunction; + +import akka.util.Unsafe; +import sun.reflect.Reflection; + + +public class StackTraceUtil { + + public static String getCallerMethod(int index){ + + //if(un!=null)return un.apply(index); + return getMethodFallback(index); + } + + static Throwable t=new Throwable(); + public static String getMethodFallback(int index){ + return t.fillInStackTrace().getStackTrace()[index+2].getClassName(); + } + + static IntFunction un;//=scala.concurrent.util.Unsafe.instance; + + static{ + try { + Class c= Class.forName("sun.reflect.Reflection"); + Method m=c.getDeclaredMethod("getCallerClass", int.class); + + MethodHandle mh=MethodHandles.lookup().unreflect(m); + + un=i->{try { + return ((Class)mh.invoke(i+4)).getName(); + } catch (Throwable e) { + e.printStackTrace(); + un=null; + return getMethodFallback(i); + }}; + + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + + + + + } + + +} diff --git a/src/main/resources/assets/proghatches/lang/en_US.lang b/src/main/resources/assets/proghatches/lang/en_US.lang index 0882c7a..7a6cd83 100644 --- a/src/main/resources/assets/proghatches/lang/en_US.lang +++ b/src/main/resources/assets/proghatches/lang/en_US.lang @@ -503,10 +503,10 @@ fluid.input.bus.me.restriced.name=Restricted Stocking Input Bus (ME) proghatches.restricted.multiples=Restrict amount to a multiply of Minimum amount proghatches.amountmaintainer.phantomclick.mode.0=Marked Fluid Container treated as Item proghatches.amountmaintainer.phantomclick.mode.1=Marked Fluid Container treated as Fluid -proghatches.amountmaintainer.redstone.mode.0=Redstone Offline:Maintain Redstone Online:Maintain If On -proghatches.amountmaintainer.redstone.mode.1=Redstone Offline:Clear Redstone Online:Maintain If On -proghatches.amountmaintainer.redstone.mode.2=Redstone Offline:Maintain Redstone Online:Invert -proghatches.amountmaintainer.redstone.mode.3=Redstone Offline:Clear Redstone Online:Invert +proghatches.amountmaintainer.redstone.mode.0=RS P2P Offline:Maintain RS P2P Online:Maintain If On +proghatches.amountmaintainer.redstone.mode.1=RS P2P Offline:Clear RS P2P Online:Maintain If On +proghatches.amountmaintainer.redstone.mode.2=RS P2P Offline:Maintain RS P2P Online:Invert +proghatches.amountmaintainer.redstone.mode.3=RS P2P Offline:Clear RS P2P Online:Invert proghatches.amountmaintainer.redstone.offline=§cOffline proghatches.amountmaintainer.redstone.online=§aOnline proghatches.amountmaintainer.memorycard=Use Memory Card bound to a Redstone P2P to link @@ -524,5 +524,12 @@ item.amountmaintainer.name.tooltip.2=Only active for specified Item/Fluid, will tile.proghatch.submitter.name=Cyclic Pattern Submitter(WIP) proghatches.submitter.mode.0=Cancel Crafting Task if Pattern is pushed: False proghatches.submitter.mode.1=Cancel Crafting Task if Pattern is pushed: True -proghatches.submitter.power.0=Left Click: Turn ON/OFF (will lose track on current task upon OFF) -proghatches.submitter.power.1=Right Click: Turn OFF and move cursor +proghatches.submitter.power.0=Left Click: Turn ON/OFF +proghatches.submitter.power.1=Right Click: Turn OFF and move cursor(and lose track on current task) +proghatches.amountmaintainer.rscard=Put Redstone Card to configure Redstone +proghatches.amountmaintainer.rscard.mode.0=Always ON +proghatches.amountmaintainer.rscard.mode.1=Always OFF +proghatches.amountmaintainer.rscard.mode.2=Redstone +proghatches.amountmaintainer.rscard.mode.3=Redstone Inverted +proghatches.amountmaintainer.rscard.mode.4=Rising Edge +proghatches.amountmaintainer.rscard.mode.5=Falling Edge diff --git a/src/main/resources/assets/proghatches/lang/zh_CN.lang b/src/main/resources/assets/proghatches/lang/zh_CN.lang index abef38c..a70cd30 100644 --- a/src/main/resources/assets/proghatches/lang/zh_CN.lang +++ b/src/main/resources/assets/proghatches/lang/zh_CN.lang @@ -503,10 +503,10 @@ fluid.input.bus.me.restriced.name=限制存储输入总线(ME) proghatches.restricted.multiples=限制拉取数量为数量下限的整数倍 proghatches.amountmaintainer.phantomclick.mode.0=标记的流体容器识别为物品 proghatches.amountmaintainer.phantomclick.mode.1=标记的流体容器识别为流体 -proghatches.amountmaintainer.redstone.mode.0=红石离线时维持 红石在线时有信号时维持 -proghatches.amountmaintainer.redstone.mode.1=红石离线时清空 红石在线时有信号时维持 -proghatches.amountmaintainer.redstone.mode.2=红石离线时维持 红石在线时有信号时清空 -proghatches.amountmaintainer.redstone.mode.3=红石离线时清空 红石在线时有信号时清空 +proghatches.amountmaintainer.redstone.mode.0=红石P2P离线时维持 红石P2P在线时有信号时维持 +proghatches.amountmaintainer.redstone.mode.1=红石P2P离线时清空 红石P2P在线时有信号时维持 +proghatches.amountmaintainer.redstone.mode.2=红石P2P离线时维持 红石P2P在线时有信号时清空 +proghatches.amountmaintainer.redstone.mode.3=红石P2P离线时清空 红石P2P在线时有信号时清空 proghatches.amountmaintainer.redstone.offline=§c离线 proghatches.amountmaintainer.redstone.online=§a在线 proghatches.amountmaintainer.memorycard=使用绑定到红石P2P的内存卡标记 @@ -524,5 +524,12 @@ item.amountmaintainer.name.tooltip.2=只对指定类型物品/流体活跃,不 tile.proghatch.submitter.name=循环样板提交器(WIP) proghatches.submitter.mode.0=样板被发配后不等待产物直接取消合成任务: 否 proghatches.submitter.mode.1=样板被发配后不等待产物直接取消合成任务: 是 -proghatches.submitter.power.0=左键: 开启/关闭 (关闭时会丢失当前合成任务的跟踪) -proghatches.submitter.power.1=右键: 关闭并移动光标 +proghatches.submitter.power.0=左键: 开启/关闭 +proghatches.submitter.power.1=右键: 关闭并移动光标(会丢失当前合成任务的跟踪) +proghatches.amountmaintainer.rscard=放入红石卡以配置红石 +proghatches.amountmaintainer.rscard.mode.0=总是开 +proghatches.amountmaintainer.rscard.mode.1=总是关 +proghatches.amountmaintainer.rscard.mode.2=根据红石信号 +proghatches.amountmaintainer.rscard.mode.3=反转红石信号 +proghatches.amountmaintainer.rscard.mode.4=上升沿 +proghatches.amountmaintainer.rscard.mode.5=下降沿