Skip to content

Commit 7b1a930

Browse files
committed
Add missing comparator outputs that were documented in the manual, also add documentation for the sawmill
1 parent 7cfcfac commit 7b1a930

File tree

5 files changed

+28
-5
lines changed

5 files changed

+28
-5
lines changed

changelog.md

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
- Add some missing Concrete recipes to make crafting easier (voidsong-dragonfly)
33
- Add missing potion recipes for Thick & Mundane potions (voidsong-dragonfly)
44
- Add machine interface support for the Assembler (BluSunrize)
5+
- Add missing comparator outputs that were documented in the manual (BluSunrize)
56
- Change text in the Circuit Table not being translatable (André Augusto)
67
- Change Arc Furnace electrode comparator (and machine interface) output to represent the *lowest* electrode
78
- Reduce damage taken from decelerating with the Skyhook by 60% (BluSunrize)

src/main/java/blusunrize/immersiveengineering/common/blocks/multiblocks/logic/AssemblerLogic.java

+9-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
import blusunrize.immersiveengineering.api.Lib;
1212
import blusunrize.immersiveengineering.api.energy.MutableEnergyStorage;
13+
import blusunrize.immersiveengineering.api.multiblocks.blocks.component.ComparatorManager;
14+
import blusunrize.immersiveengineering.api.multiblocks.blocks.component.ComparatorManager.SimpleComparatorValue;
1315
import blusunrize.immersiveengineering.api.multiblocks.blocks.component.IClientTickableComponent;
1416
import blusunrize.immersiveengineering.api.multiblocks.blocks.component.IServerTickableComponent;
1517
import blusunrize.immersiveengineering.api.multiblocks.blocks.component.RedstoneControl.RSState;
@@ -27,7 +29,6 @@
2729
import blusunrize.immersiveengineering.api.tool.assembler.RecipeQuery;
2830
import blusunrize.immersiveengineering.common.blocks.metal.CrafterPatternInventory;
2931
import blusunrize.immersiveengineering.common.blocks.multiblocks.logic.AssemblerLogic.State;
30-
import blusunrize.immersiveengineering.common.blocks.multiblocks.logic.arcfurnace.ArcFurnaceLogic;
3132
import blusunrize.immersiveengineering.common.blocks.multiblocks.shapes.AssemblerShapes;
3233
import blusunrize.immersiveengineering.common.config.IEServerConfig;
3334
import blusunrize.immersiveengineering.common.fluids.ArrayFluidHandler;
@@ -338,6 +339,13 @@ public Function<BlockPos, VoxelShape> shapeGetter(ShapeType forType)
338339
return AssemblerShapes.SHAPE_GETTER;
339340
}
340341

342+
public static ComparatorManager<State> makeComparator()
343+
{
344+
return ComparatorManager.makeSimple(
345+
SimpleComparatorValue.inventory(State::getInventory, 0, 18), REDSTONE_PORTS
346+
);
347+
}
348+
341349
public static class State implements IMultiblockState
342350
{
343351
public final FluidTank[] tanks = IntStream.range(0, NUM_TANKS)

src/main/java/blusunrize/immersiveengineering/common/blocks/multiblocks/logic/mixer/MixerLogic.java

+10
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
import blusunrize.immersiveengineering.api.Lib;
1313
import blusunrize.immersiveengineering.api.crafting.MixerRecipe;
1414
import blusunrize.immersiveengineering.api.energy.AveragingEnergyStorage;
15+
import blusunrize.immersiveengineering.api.multiblocks.blocks.component.ComparatorManager;
16+
import blusunrize.immersiveengineering.api.multiblocks.blocks.component.ComparatorManager.SimpleComparatorValue;
1517
import blusunrize.immersiveengineering.api.multiblocks.blocks.component.IClientTickableComponent;
1618
import blusunrize.immersiveengineering.api.multiblocks.blocks.component.IServerTickableComponent;
1719
import blusunrize.immersiveengineering.api.multiblocks.blocks.component.RedstoneControl.RSState;
@@ -25,6 +27,7 @@
2527
import blusunrize.immersiveengineering.api.tool.MachineInterfaceHandler.IMachineInterfaceConnection;
2628
import blusunrize.immersiveengineering.api.tool.MachineInterfaceHandler.MachineCheckImplementation;
2729
import blusunrize.immersiveengineering.client.fx.FluidSplashOptions;
30+
import blusunrize.immersiveengineering.common.blocks.multiblocks.logic.FermenterLogic;
2831
import blusunrize.immersiveengineering.common.blocks.multiblocks.logic.mixer.MixerLogic.State;
2932
import blusunrize.immersiveengineering.common.blocks.multiblocks.process.MultiblockProcess;
3033
import blusunrize.immersiveengineering.common.blocks.multiblocks.process.MultiblockProcessInMachine;
@@ -249,6 +252,13 @@ public Function<BlockPos, VoxelShape> shapeGetter(ShapeType forType)
249252
return MixerShapes.SHAPE_GETTER;
250253
}
251254

255+
public static ComparatorManager<State> makeComparator()
256+
{
257+
return ComparatorManager.makeSimple(
258+
SimpleComparatorValue.inventory(State::getInventory, 0, NUM_SLOTS), REDSTONE_POS
259+
);
260+
}
261+
252262
public static class State implements IMultiblockState, ProcessContextInMachine<MixerRecipe>
253263
{
254264
public final AveragingEnergyStorage energy = new AveragingEnergyStorage(ENERGY_CAPACITY);

src/main/java/blusunrize/immersiveengineering/common/register/IEMultiblockLogic.java

+2
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ public class IEMultiblockLogic
9595
.notMirrored()
9696
.redstoneNoComputer(s -> s.rsState, AssemblerLogic.REDSTONE_PORTS)
9797
.gui(IEMenuTypes.ASSEMBLER)
98+
.comparator(AssemblerLogic.makeComparator())
9899
.build();
99100

100101
public static final MultiblockRegistration<AutoWorkbenchLogic.State> AUTO_WORKBENCH = metal(new AutoWorkbenchLogic(), "auto_workbench")
@@ -127,6 +128,7 @@ public class IEMultiblockLogic
127128
.structure(() -> IEMultiblocks.MIXER)
128129
.redstone(s -> s.rsState, MixerLogic.REDSTONE_POS)
129130
.gui(IEMenuTypes.MIXER)
131+
.comparator(MixerLogic.makeComparator())
130132
.build();
131133

132134
public static final MultiblockRegistration<RefineryLogic.State> REFINERY = metal(new RefineryLogic(), "refinery")

src/main/resources/assets/immersiveengineering/manual/en_us/redstone_probe.txt

+6-4
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ Note that many multiblocks feature comparator-support, as described on the follo
77
§lTank: §rAs detailed in its <link;tank;manual entry>
88
§lSilo: §rAs detailed in its <link;silo;manual entry>
99
§lAssembler: §rOutputs a signal relative to the fill of the inventory.
10-
§lAutoWorkbench: §rOutputs a signal relative to the fill of the inventory.
10+
§lAutomated Workbench: §rOutputs a signal relative to the fill of the inventory.
1111
§lCrusher: §rOutputs a signal relative to the fill of the inventory.
12+
§lSawmill: §rOutputs a signal relative to the integrity of the sawblade.<np>
13+
§lArc Furnace: §rOutputs a signal relative to the fill of the inventory.
14+
A comparator at the electrodes at the top will send a signal reflecting the integrity of the most damaged electrode.
1215
§lSqueezer: §rOutputs a signal relative to the fill of the inventory.
1316
§lFermenter: §rOutputs a signal relative to the fill of the inventory.
14-
§lExcavator: §rOutputs a signal relative to the remaining ore in the vein.
15-
§lArcFurnace: §rOutputs a signal relative to the fill of the inventory.
16-
Additionally, connecting a comparator to the electrodes at the top will send a signal based on their integrity.
1717
§lMixer: §rOutputs a signal relative to the fill of the inventory.<np>
18+
§lExcavator: §rOutputs a signal relative to the remaining ore in the vein.<br>
19+
<br>
1820
For more detailed analysis of the various multiblocks, their inventories, energy- and fluid storages, consider using the <link;machine_interface;Machine Interface> instead.

0 commit comments

Comments
 (0)