mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-11-26 13:28:33 +01:00
fixed currently crafting amount being incorrect with multiple crafting modules in a pipe
This commit is contained in:
parent
f9d72a3b87
commit
c041b2320b
1 changed files with 5 additions and 6 deletions
|
@ -7,11 +7,11 @@ import de.ellpeck.prettypipes.PrettyPipes;
|
||||||
import de.ellpeck.prettypipes.Registry;
|
import de.ellpeck.prettypipes.Registry;
|
||||||
import de.ellpeck.prettypipes.Utility;
|
import de.ellpeck.prettypipes.Utility;
|
||||||
import de.ellpeck.prettypipes.misc.ItemEqualityType;
|
import de.ellpeck.prettypipes.misc.ItemEqualityType;
|
||||||
|
import de.ellpeck.prettypipes.packets.PacketHandler;
|
||||||
|
import de.ellpeck.prettypipes.packets.PacketItemEnterPipe;
|
||||||
import de.ellpeck.prettypipes.pipe.IPipeItem;
|
import de.ellpeck.prettypipes.pipe.IPipeItem;
|
||||||
import de.ellpeck.prettypipes.pipe.PipeBlock;
|
import de.ellpeck.prettypipes.pipe.PipeBlock;
|
||||||
import de.ellpeck.prettypipes.pipe.PipeTileEntity;
|
import de.ellpeck.prettypipes.pipe.PipeTileEntity;
|
||||||
import de.ellpeck.prettypipes.packets.PacketHandler;
|
|
||||||
import de.ellpeck.prettypipes.packets.PacketItemEnterPipe;
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.CompoundNBT;
|
import net.minecraft.nbt.CompoundNBT;
|
||||||
|
@ -254,10 +254,9 @@ public class PipeNetwork implements ICapabilitySerializable<CompoundNBT>, GraphL
|
||||||
public List<Pair<BlockPos, ItemStack>> getCurrentlyCrafting(BlockPos node) {
|
public List<Pair<BlockPos, ItemStack>> getCurrentlyCrafting(BlockPos node) {
|
||||||
this.startProfile("get_currently_crafting");
|
this.startProfile("get_currently_crafting");
|
||||||
List<Pair<BlockPos, ItemStack>> items = new ArrayList<>();
|
List<Pair<BlockPos, ItemStack>> items = new ArrayList<>();
|
||||||
for (Pair<BlockPos, ItemStack> craftable : this.getAllCraftables(node)) {
|
Iterator<PipeTileEntity> craftingPipes = this.getAllCraftables(node).stream().map(c -> this.getPipe(c.getLeft())).distinct().iterator();
|
||||||
PipeTileEntity pipe = this.getPipe(craftable.getLeft());
|
while (craftingPipes.hasNext()) {
|
||||||
if (pipe == null)
|
PipeTileEntity pipe = craftingPipes.next();
|
||||||
continue;
|
|
||||||
for (Pair<BlockPos, ItemStack> request : pipe.craftResultRequests) {
|
for (Pair<BlockPos, ItemStack> request : pipe.craftResultRequests) {
|
||||||
BlockPos dest = request.getLeft();
|
BlockPos dest = request.getLeft();
|
||||||
ItemStack stack = request.getRight();
|
ItemStack stack = request.getRight();
|
||||||
|
|
Loading…
Reference in a new issue