diff --git a/src/main/java/reobf/proghatches/ae/BlockAutoFillerMKII.java b/src/main/java/reobf/proghatches/ae/BlockAutoFillerMKII.java new file mode 100644 index 0000000..2173f6a --- /dev/null +++ b/src/main/java/reobf/proghatches/ae/BlockAutoFillerMKII.java @@ -0,0 +1,79 @@ +package reobf.proghatches.ae; + +import java.util.List; + +import com.glodblock.github.FluidCraft; +import com.glodblock.github.common.tile.TileFluidAutoFiller; +import com.glodblock.github.inventory.InventoryHandler; +import com.glodblock.github.inventory.gui.GuiType; +import com.glodblock.github.util.BlockPos; +import com.glodblock.github.util.NameConst; +import com.glodblock.github.util.Util; + +import appeng.api.config.SecurityPermissions; +import appeng.util.Platform; +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.StatCollector; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import reobf.proghatches.block.INameAndTooltips; + +public class BlockAutoFillerMKII extends BlockContainer implements INameAndTooltips{ + + public BlockAutoFillerMKII() { + super(Material.rock); + this.setLightOpacity(255); + this.setLightLevel(0); + this.setHardness(2.2F); + this.setHarvestLevel("pickaxe", 0); + setBlockName("proghatches.autofillerMKII"); + setBlockTextureName(FluidCraft.MODID + ":" + NameConst.BLOCK_FLUID_AUTO_FILLER); + } + + @Override + public TileEntity createNewTileEntity(World worldIn, int meta) { + + return new TileAutoFillerMKII(); + } +@Override +public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int facing, float hitX, + float hitY, float hitZ) { + if (player.isSneaking()) { + return false; + } + TileAutoFillerMKII tile =(TileAutoFillerMKII) world. getTileEntity( x, y, z); + if (tile != null) { + if (Platform.isServer()) { + if (Util.hasPermission(player, SecurityPermissions.INJECT, tile)) { + InventoryHandler.openGui( + player, + world, + new BlockPos(x, y, z), + ForgeDirection.getOrientation(facing), + GuiType.FLUID_AUTO_FILLER); + } else { + player.addChatComponentMessage(new ChatComponentText("You don't have permission to view.")); + } + } + return true; + } + return false; +} + +@Override +public void addInformation(ItemStack p_77624_1_, List l) { + l.add(StatCollector.translateToLocal("tile.proghatches.autofillerMKII.tooltip.0")); + l.add(StatCollector.translateToLocal("tile.proghatches.autofillerMKII.tooltip.1")); +} + +@Override +public String getName(ItemStack p_77624_1_) { + // TODO Auto-generated method stub + return null; +} +} diff --git a/src/main/java/reobf/proghatches/ae/PartAmountMaintainer.java b/src/main/java/reobf/proghatches/ae/PartAmountMaintainer.java index f34e261..f5780a7 100644 --- a/src/main/java/reobf/proghatches/ae/PartAmountMaintainer.java +++ b/src/main/java/reobf/proghatches/ae/PartAmountMaintainer.java @@ -228,14 +228,15 @@ public boolean shouldProceed(boolean red, boolean lastredstone){ int reqcooldown; public void requestForMissing(IAEStack primitive){ if(upgrade[1]==null)return; - if(reqcooldown>0)reqcooldown--; + IAEItemStack iaeStack=(primitive instanceof IAEItemStack)?(IAEItemStack) primitive: ItemFluidDrop.newAeStack((AEFluidStack) primitive); try { if(link==null){ if(job==null){ - reqcooldown=40; + if(reqcooldown>0){reqcooldown--;return;} + reqcooldown=80; job=getProxy().getCrafting().beginCraftingJob(this.getTile().getWorldObj(), getProxy().getGrid(), source, iaeStack, null); } else{ diff --git a/src/main/java/reobf/proghatches/ae/TileAutoFillerMKII.java b/src/main/java/reobf/proghatches/ae/TileAutoFillerMKII.java new file mode 100644 index 0000000..d5b64fb --- /dev/null +++ b/src/main/java/reobf/proghatches/ae/TileAutoFillerMKII.java @@ -0,0 +1,250 @@ +package reobf.proghatches.ae; + +import static com.glodblock.github.loader.RecipeLoader.BUCKET; + +import java.util.Arrays; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; + +import org.apache.commons.lang3.tuple.MutablePair; + +import com.glodblock.github.common.item.ItemFluidDrop; +import com.glodblock.github.common.tile.TileFluidAutoFiller; +import com.glodblock.github.util.Util; + +import appeng.api.AEApi; +import appeng.api.config.Actionable; +import appeng.api.implementations.ICraftingPatternItem; +import appeng.api.networking.IGridNode; +import appeng.api.networking.crafting.ICraftingPatternDetails; +import appeng.api.networking.crafting.ICraftingProviderHelper; +import appeng.api.networking.events.MENetworkCraftingPatternChange; +import appeng.api.networking.events.MENetworkEventSubscribe; +import appeng.api.networking.security.BaseActionSource; +import appeng.api.networking.security.MachineSource; +import appeng.api.networking.storage.IStorageGrid; +import appeng.api.networking.ticking.TickRateModulation; +import appeng.api.networking.ticking.TickingRequest; +import appeng.api.storage.data.IAEFluidStack; +import appeng.api.storage.data.IAEItemStack; +import appeng.api.storage.data.IItemList; +import appeng.me.GridAccessException; +import appeng.tile.TileEvent; +import appeng.tile.events.TileEventType; +import appeng.util.item.AEItemStack; +import net.minecraft.inventory.InventoryCrafting; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.nbt.NBTTagList; +import net.minecraftforge.common.util.ForgeDirection; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidStack; +import reobf.proghatches.eucrafting.IInstantCompletable; + +public class TileAutoFillerMKII extends TileFluidAutoFiller/* implements IInstantCompletable*/{ + public TileAutoFillerMKII() { + super(); + } + public void updatePattern() { + updateMark=true;delay=0; + + super.updatePattern(); + } + + private final Item encodedPattern = AEApi.instance().definitions().items().encodedPattern().maybeItem().orNull(); + + private ItemStack getPattern(ItemStack emptyContainer, ItemStack filledContainer) { + NBTTagList in = new NBTTagList(); + NBTTagList out = new NBTTagList(); + in.appendTag(emptyContainer.writeToNBT(new NBTTagCompound())); + ItemStack fluidDrop = ItemFluidDrop.newStack(Util.FluidUtil.getFluidFromContainer(filledContainer)); + in.appendTag(createItemTag(fluidDrop)); + out.appendTag(filledContainer.writeToNBT(new NBTTagCompound())); + NBTTagCompound itemTag = new NBTTagCompound(); + itemTag.setTag("in", in); + itemTag.setTag("out", out); + itemTag.setBoolean("crafting", false); + ItemStack pattern = new ItemStack(this.encodedPattern); + pattern.setTagCompound(itemTag); + return pattern; + } + @Override + public void provideCrafting(ICraftingProviderHelper craftingTracker) { + super.provideCrafting(craftingTracker); + try { + if(previousCraftable!=null) + Arrays.stream(previousCraftable) + .filter(s->s.getItem() instanceof ItemFluidDrop).forEach(s->{ + + FluidStack fluidStack = ItemFluidDrop.getFluidStack(s.getItemStack()); + Fluid fluid = fluidStack.getFluid(); + if (fluid == null) return; + int maxCapacity = Util.FluidUtil.getCapacity(this.getContainerItem(), fluid); + if (maxCapacity == 0) return; + MutablePair filled = Util.FluidUtil + .fillStack(this.getContainerItem().copy(), new FluidStack(fluid, maxCapacity)); + if (filled.right == null) return; + ItemStack pattern = getPattern(this.getContainerItem(), filled.right); + ICraftingPatternItem patter = (ICraftingPatternItem) pattern.getItem(); + craftingTracker.addCraftingOption(this, patter.getPatternForItem(pattern, getWorldObj())); + + + + + + }); + + ; + // previousCraftableUseless=true; + + } catch (Exception e) { + + } + /*IStorageGrid storage = getStorageGrid(); + if (storage == null) return; + IItemList fluidStorage = this.fluids.isEmpty() ? storage.getFluidInventory().getStorageList() + : this.fluids; + for (IAEFluidStack fluidStack : fluidStorage) { + Fluid fluid = fluidStack.getFluid(); + if (fluid == null) continue; + int maxCapacity = Util.FluidUtil.getCapacity(this.getContainerItem(), fluid); + if (maxCapacity == 0) continue; + MutablePair filled = Util.FluidUtil + .fillStack(this.getContainerItem().copy(), new FluidStack(fluid, maxCapacity)); + if (filled.right == null) continue; + ItemStack pattern = getPattern(this.getContainerItem(), filled.right); + ICraftingPatternItem patter = (ICraftingPatternItem) pattern.getItem(); + craftingTracker.addCraftingOption(this, patter.getPatternForItem(pattern, getWorldObj())); + }*/ + } + + + IAEItemStack[] previousCraftable; + //boolean previousCraftableUseless; + int delay; + @TileEvent(value = TileEventType.TICK) + public void update(){ + + if(updateMark){ + if(delay++<5){return;}delay=0; + + try {//previousCraftableUseless=false; + previousCraftable=this.getProxy().getCrafting().getCraftingPatterns().keySet().stream() + .filter(s->s.getItem() instanceof ItemFluidDrop).toArray(IAEItemStack[]::new); + + this.getProxy().getGrid() + .postEvent(new MENetworkCraftingPatternChange(this, getGridNode(ForgeDirection.UNKNOWN))); + + } catch (GridAccessException ignored) {} + + + }updateMark=false; + + } + + boolean updateMark=true; + @MENetworkEventSubscribe + public void onPatternUpdate(MENetworkCraftingPatternChange e){ + if(e.provider instanceof TileAutoFillerMKII)return; + updateMark=true;delay=0; + } + + List returnStackArr=new LinkedList<>(); + + + @Override + public TickRateModulation tickingRequest(IGridNode node, int TicksSinceLastCall) { + if (this.getStorageGrid() == null) { + return TickRateModulation.SLOWER; + } + + return complete()? TickRateModulation.SLEEP:TickRateModulation.SLOWER; + + } + + @Override + public boolean pushPattern(ICraftingPatternDetails patternDetails, InventoryCrafting table) { + this.returnStackArr .add( AEApi.instance().storage() + .createItemStack(patternDetails.getCondensedOutputs()[0].getItemStack())); + try { + this.getProxy().getTick().alertDevice(this.getProxy().getNode()); + } catch (GridAccessException ignored) { + + } + return true; + } + + private IStorageGrid getStorageGrid() { + try { + return this.getProxy().getGrid().getCache(IStorageGrid.class); + } catch (GridAccessException e) { + return null; + } + } + private final BaseActionSource source = new MachineSource(this); + @Override + public boolean isBusy() { + return false; + } + + + + + + //@Override + public boolean complete() { + boolean allClear=true; + IAEItemStack item; + for(Iterator it = returnStackArr.iterator();it.hasNext();){ + item=it.next(); + IAEItemStack left = getStorageGrid().getItemInventory().injectItems(item, Actionable.MODULATE, this.source); + if(left!=null&&left.getStackSize()>0){ + item.setStackSize(left.getStackSize()); + allClear=false; + }else{ + it.remove(); + } + } + return allClear; + + + + } + + + @TileEvent(TileEventType.WORLD_NBT_READ) + public void readFromNBTEventX(NBTTagCompound data) { + try{ + while(true){ + int[] a=new int[1];returnStackArr.clear(); + NBTTagCompound tag=(NBTTagCompound) data.getTag("cache@"+(a[0]++)); + if(tag==null)break; + + IAEItemStack item = AEItemStack.loadItemStackFromNBT(tag); + if(item==null){break;} + returnStackArr.add(item); + + + } + }catch(Exception e){e.printStackTrace();} + + + + } + + @TileEvent(TileEventType.WORLD_NBT_WRITE) + public NBTTagCompound writeToNBTEventX(NBTTagCompound data) { + int[] a=new int[1]; + returnStackArr.forEach(s->{ + NBTTagCompound tag=new NBTTagCompound(); + s.writeToNBT(tag); + data.setTag("cache@"+(a[0]++), data); + + }); + + return data; + } + +} diff --git a/src/main/java/reobf/proghatches/item/ItemProgrammingToolkit.java b/src/main/java/reobf/proghatches/item/ItemProgrammingToolkit.java index e3d4b16..394aca4 100644 --- a/src/main/java/reobf/proghatches/item/ItemProgrammingToolkit.java +++ b/src/main/java/reobf/proghatches/item/ItemProgrammingToolkit.java @@ -102,6 +102,11 @@ public void onUpdate(ItemStack stack, World worldIn, Entity entityIn, int p_7766 lastholdingtick = Minecraft.getMinecraft().thePlayer.ticksExisted; mode = stack.getItemDamage(); + if(entityIn instanceof EntityPlayer){ + if( entityIn.ticksExisted%80==12){ + EntityPlayer p=(EntityPlayer) entityIn; + p.triggerAchievement(MyMod.achievement);} + } } diff --git a/src/main/java/reobf/proghatches/main/CommonProxy.java b/src/main/java/reobf/proghatches/main/CommonProxy.java index 92af102..f72aa60 100644 --- a/src/main/java/reobf/proghatches/main/CommonProxy.java +++ b/src/main/java/reobf/proghatches/main/CommonProxy.java @@ -23,6 +23,7 @@ import gregtech.api.util.GTModHandler; import mcp.mobius.waila.api.IWailaRegistrar; import reobf.proghatches.Tags; +import reobf.proghatches.ae.BlockAutoFillerMKII; import reobf.proghatches.ae.BlockCraftingCondenser; import reobf.proghatches.ae.BlockCyclicPatternSubmitter; import reobf.proghatches.ae.BlockMolecularAssemblerInterface; @@ -33,6 +34,7 @@ import reobf.proghatches.ae.ItemPartStockingExportBus; import reobf.proghatches.ae.ItemPartStorageProxy; import reobf.proghatches.ae.ItemPartSubnetExciter; +import reobf.proghatches.ae.TileAutoFillerMKII; import reobf.proghatches.ae.TileCraftingCondenser; import reobf.proghatches.ae.TileCyclicPatternSubmitter; import reobf.proghatches.ae.TileMolecularAssemblerInterface; @@ -101,6 +103,8 @@ public void preInit(FMLPreInitializationEvent event) { GameRegistry.registerTileEntity(TileStorageProxy.class, "proghatches.proxy"); GameRegistry.registerTileEntity(TileMolecularAssemblerInterface.class, "proghatches.ma_inface"); GameRegistry.registerTileEntity(TileStockingCircuitRequestInterceptor.class, "proghatches.circuit_interceptor"); + GameRegistry.registerTileEntity(TileAutoFillerMKII.class, "proghatches.autofillerMKII"); + ItemMEPlunger a=new ItemMEPlunger(100000); @@ -223,7 +227,10 @@ public void preInit(FMLPreInitializationEvent event) { MyMod.circuit_interceptor = new BlockStockingCircuitRequestInterceptor(),ItemBlockTooltip.class, /*.setUnlocalizedName("proghatches.circuit_interceptor").setTextureName("?")*/ "circuit_interceptor",new Object[]{""}); - + GameRegistry + .registerBlock( + MyMod.autofiller = new BlockAutoFillerMKII(),ItemBlockTooltip.class, + "autofillerMKII",new Object[]{""}); GameRegistry.registerTileEntity(TileCraftingCondenser.class, "proghatches.craftingdumper"); diff --git a/src/main/java/reobf/proghatches/main/MyMod.java b/src/main/java/reobf/proghatches/main/MyMod.java index 2dfd630..7f0649f 100644 --- a/src/main/java/reobf/proghatches/main/MyMod.java +++ b/src/main/java/reobf/proghatches/main/MyMod.java @@ -42,10 +42,12 @@ import net.minecraft.launchwrapper.Launch; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.server.MinecraftServer; +import net.minecraft.stats.Achievement; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ChatComponentTranslation; import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import net.minecraftforge.common.AchievementPage; import net.minecraftforge.common.IExtendedEntityProperties; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.ForgeDirection; @@ -71,6 +73,8 @@ import com.google.common.collect.Sets; import com.gtnewhorizon.structurelib.alignment.constructable.IMultiblockInfoContainer; +import WayofTime.alchemicalWizardry.common.achievements.AchievementTrigger; +import WayofTime.alchemicalWizardry.common.achievements.AchievementsRegistry; import appeng.api.AEApi; import appeng.api.config.FuzzyMode; import appeng.api.config.Upgrades; @@ -116,6 +120,7 @@ import cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent; import cpw.mods.fml.common.gameevent.TickEvent.Phase; import cpw.mods.fml.common.gameevent.TickEvent.WorldTickEvent; +import cpw.mods.fml.common.gameevent.PlayerEvent; import cpw.mods.fml.common.gameevent.TickEvent; import cpw.mods.fml.common.network.IGuiHandler; import cpw.mods.fml.common.network.NetworkRegistry; @@ -146,6 +151,7 @@ import gregtech.crossmod.waila.GregtechWailaDataProvider; import li.cil.oc.api.Driver; import reobf.proghatches.Tags; +import reobf.proghatches.ae.BlockAutoFillerMKII; import reobf.proghatches.ae.BlockMolecularAssemblerInterface; import reobf.proghatches.block.ChunkTrackingGridCahce; import reobf.proghatches.block.TileIOHub; @@ -408,7 +414,7 @@ public void join(PlayerLoggedInEvent e) { ; } - + public static Achievement achievement; /** * @param event */ @@ -418,8 +424,26 @@ public void postInit(FMLPostInitializationEvent event) { proxy.postInit(event); //KeyBindings - - + + { + AchievementPage page = new AchievementPage(MODID, achievement=new Achievement("proghatch.toolkit", "proghatch.toolkit", 0, 0, new ItemStack(toolkit), null ).registerStat()); + AchievementPage.registerAchievementPage(page); + /*FMLCommonHandler.instance().bus().register(new Object(){ + @SubscribeEvent + public void onItemPickedUp(PlayerEvent.ItemPickupEvent event) { + ItemStack stack = event.pickedUp.getEntityItem(); + + if (stack != null && stack.getItem() == toolkit) { + Achievement achievement = tmp; + + if (achievement != null) { + event.player.addStat(achievement, 1); + } + } + } + + });*/ + } @@ -758,6 +782,7 @@ public void init(Entity entity, World world) { public static ItemMAConduit ma_conduit; public static Block circuit_interceptor; public static BlockMolecularAssemblerInterface ma_iface; + public static BlockAutoFillerMKII autofiller; @SubscribeEvent(priority = EventPriority.HIGH, receiveCanceled = false) public void pretick(final TickEvent.ServerTickEvent event) { @@ -765,4 +790,6 @@ public void pretick(final TickEvent.ServerTickEvent event) { callbacks.forEach((a, b) -> b.run()); } } + + } diff --git a/src/main/java/reobf/proghatches/main/registration/PHRecipes.java b/src/main/java/reobf/proghatches/main/registration/PHRecipes.java index 8aa81d1..b1278b2 100644 --- a/src/main/java/reobf/proghatches/main/registration/PHRecipes.java +++ b/src/main/java/reobf/proghatches/main/registration/PHRecipes.java @@ -5,8 +5,11 @@ import static gregtech.api.enums.Mods.GTPlusPlus; import static gregtech.api.util.GTRecipeBuilder.HOURS; import static gregtech.api.util.GTRecipeBuilder.SECONDS; +import static gregtech.api.util.GTRecipeConstants.FUEL_VALUE; import static gregtech.api.util.GTRecipeConstants.RESEARCH_ITEM; import static gregtech.api.util.GTRecipeConstants.RESEARCH_TIME; +import static gregtech.api.util.GTRecipeConstants.RTG_DURATION_IN_DAYS; +import static gtPlusPlus.api.recipe.GTPPRecipeMaps.rtgFuels; import java.util.ArrayList; import java.util.Arrays; @@ -51,6 +54,8 @@ import gregtech.api.util.GTRecipeBuilder; import gregtech.api.util.GTRecipeConstants; import gregtech.api.util.GTUtility; +import gtPlusPlus.core.util.math.MathUtils; +import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import mods.railcraft.common.core.Railcraft; import reobf.proghatches.item.ItemProgrammingCircuit; import reobf.proghatches.main.Config; @@ -1879,6 +1884,30 @@ bb,new ItemStack(MyMod.smartarm, 4,i+5) ); CraftingManager.getInstance().getRecipeList().add(rec); + + + GTValues.RA.stdBuilder() + .itemInputs(new ItemStack(MyMod.book,1,OreDictionary.WILDCARD_VALUE)) + .itemOutputs() + .duration(0) + .eut(0) + .metadata(FUEL_VALUE, 4) + .addTo(RecipeMaps.magicFuels); + + + GTValues.RA.stdBuilder() + .itemInputs( + Api.INSTANCE.definitions().materials().cardPatternCapacity().maybeStack(4).get(), + new ItemStack( ItemAndBlockHolder.FLUID_AUTO_FILLER), + + GTUtility.getIntegratedCircuit(23) + ) + .itemOutputs( + new ItemStack(MyMod.autofiller, 1) + ) + .duration(10 * SECONDS) + .eut(30) + .addTo(RecipeMaps.assemblerRecipes); /*GTRecipeBuilder.builder() .metadata(RESEARCH_ITEM, new ItemStack(ChiselBlocks.present,1,16)) .metadata(RESEARCH_TIME, 1 ) diff --git a/src/main/resources/assets/proghatches/lang/en_US.lang b/src/main/resources/assets/proghatches/lang/en_US.lang index 3c8d0ee..34c692a 100644 --- a/src/main/resources/assets/proghatches/lang/en_US.lang +++ b/src/main/resources/assets/proghatches/lang/en_US.lang @@ -721,3 +721,8 @@ tile.proghatches.circuit_interceptor.change=Item to intercept: %s tile.proghatches.circuit_interceptor.1.name=CPU Extract Request Inteceptor proghatch.circuit_interceptor.tooltip.1.0=Prevent Crafting CPU from using item in stocking. proghatch.circuit_interceptor.tooltip.1.1=Right click with item to specify the item. +tile.proghatches.autofillerMKII.name=Advanced Fluid Auto Filler +tile.proghatches.autofillerMKII.tooltip.0=Besides normal Auto Filler behaviour, also generate patterns for craftable fluid. +tile.proghatches.autofillerMKII.tooltip.1=Infinite parallels. +achievement.proghatch.toolkit=Try equipping this on Baubles Slot! +achievement.proghatch.toolkit.desc=Then bind a key in settings to switch mode! diff --git a/src/main/resources/assets/proghatches/lang/zh_CN.lang b/src/main/resources/assets/proghatches/lang/zh_CN.lang index 8b9feb3..6ea0d96 100644 --- a/src/main/resources/assets/proghatches/lang/zh_CN.lang +++ b/src/main/resources/assets/proghatches/lang/zh_CN.lang @@ -719,3 +719,8 @@ tile.proghatches.circuit_interceptor.change=Item to intercept: %s tile.proghatches.circuit_interceptor.1.name=CPU提取请求拦截器 proghatch.circuit_interceptor.tooltip.1.0=阻止合成CPU使用库存的物品合成 proghatch.circuit_interceptor.tooltip.1.1=右键以指定物品 +tile.proghatches.autofillerMKII.name=进阶流体自动装填机 +tile.proghatches.autofillerMKII.tooltip.0=除了自动装填机的功能,还能为可合成但没有存量的的流体生成样板 +tile.proghatches.autofillerMKII.tooltip.1=无穷并行 +achievement.proghatch.toolkit=尝试把工具箱装备在在饰品栏! +achievement.proghatch.toolkit.desc=在设置中绑定按键就能切换模式! diff --git a/src/main/resources/assets/proghatches/lang/zh_CN/DIBME.lang b/src/main/resources/assets/proghatches/lang/zh_CN/DIBME.lang index a0de0dd..1d89dda 100644 --- a/src/main/resources/assets/proghatches/lang/zh_CN/DIBME.lang +++ b/src/main/resources/assets/proghatches/lang/zh_CN/DIBME.lang @@ -1,19 +1,17 @@ 多方块的物品输入 -用于解决装配线使用独立ME网络+自动拉取模式ME进阶输入总线 在有处理有重复物品配方时无法工作 -如果选用所有ME输入总线共享同一个ME网络,或者虽然每个ME输入总线使用独立网络但配方没有重复物品时,你不需要此仓 -当然你也可以选择重命名重复的物品来绕过这个特性 -无法工作的原因是: -装配线会检查ME输入总线的第一格物品,并去最后一个出现该物品的ME输入总线检查数量并抽取物品 -形如{螺丝x1,板x1,板x1,板x1}的装配线配方,装配线会去第四个总线检查板的数量,在少于3个时拒绝启动 -即使四个ME输入总线使用独立ME网络,且数量足够 -就算输入三份配方通过检查,装配线也只会从第四个ME输入总线一次性抽取3个板,导致剩余两个配方无法继续 -使用方法: -前15个ME存储直连ME进阶输入总线,第16个ME存储不直连装配线 -装配线第16个输入总线使用此总线,通过存储总线访问前15个ME存储子网以及第16个ME存储 -按照从小到大的顺序设置存储总线的优先级即可,别忘了开启自动拉取 ------------------------------------------------------------------------------------------------------- -这个总线的原理是伪装成"所有ME输入总线共享同一个ME网络"的配置诱骗装配线启动,并按正常逻辑从子网抽取原料 -这个总线自动拉取时会优先拉取优先级高的子网,保证第16个ME存储的物品总是会出现在第一格 -因为它是最后一个总线,且包含配方16格的全部物品,装配线总是会从它这里检查数量并抽取 -正确的配方总是能通过检查,在抽取时,按优先级逆序抽取,这保证了有重复物品是总是优先消耗序号低的子网,与使用普通总线时行为一致 -使用螺丝刀Shift右键以切换是否在最高优先级存储为空时 留空第一格 \ No newline at end of file +所有多方块机器在处理多个ME输入总线时,如果遇到相同物品 +后面的ME输入总线会覆盖前面ME输入总线中的相同物品 +导致形如{螺丝x1,板x1,板x1,板x1}的装配线配方,若用四个独立子网提供物品 +装配线会因为仅检测到第四个ME输入总线中的一个板,认为其数量小于总量的3个板而拒绝启动 +即使你倍增了3倍数量,装配线也会优先抽干最后一个网络,导致卡单 +这个特殊的ME输入总线为解决这个问题而生 +-------------------------------------------------------------------------------------- +装配线采用全进阶ME输入总线,开自动拉取 +最后一个进阶ME输入总线换成ME诱骗输入总线,通过存储总线访问16个子网 +ME诱骗输入总线就能统计所有子网的物品数量,而且因为它总是是最后一个总线,总能覆盖前面所有ME输入总线的内容 +并在装配线抽取时均匀从子网抽取,避免提前抽干某个子网 +-------------------------------------------------------------------------------------- +16个子网需要从小到大调整好优先级,第16个子网优先级最大 +这样ME诱骗输入总线就能保证第16个子网的物品出现在自己的第一格(重要!) +使用螺丝刀Shift右键以切换是否在最高优先级存储为空时 留空第一格 +提示:你可以通过重命名装配线配方中重复物品作为解决这个问题的备选方案 \ No newline at end of file