From 494ddc53912785d7c82b14abeeb256dd46eb009c Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Tue, 26 Sep 2023 11:01:47 +0200 Subject: [PATCH] fixed items with nbt being requested in wrong amounts closes #175 --- .../ellpeck/prettypipes/terminal/ItemTerminalBlockEntity.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/de/ellpeck/prettypipes/terminal/ItemTerminalBlockEntity.java b/src/main/java/de/ellpeck/prettypipes/terminal/ItemTerminalBlockEntity.java index 98fe789..b0c4456 100644 --- a/src/main/java/de/ellpeck/prettypipes/terminal/ItemTerminalBlockEntity.java +++ b/src/main/java/de/ellpeck/prettypipes/terminal/ItemTerminalBlockEntity.java @@ -161,6 +161,7 @@ public class ItemTerminalBlockEntity extends BlockEntity implements IPipeConnect // don't compare with nbt equality here or the whole hashing thing is pointless .filter(s -> ItemEquality.compareItems(s, filter) && s.hasTag() && s.getTag().hashCode() == nbtHash) .findFirst().orElse(filter); + stack.setCount(filter.getCount()); } var requested = this.requestItemImpl(stack, ItemTerminalBlockEntity.onItemUnavailable(player, false)); if (requested > 0) { @@ -321,4 +322,5 @@ public class ItemTerminalBlockEntity extends BlockEntity implements IPipeConnect player.sendSystemMessage(Component.translatable("info." + PrettyPipes.ID + ".not_found", s.getHoverName()).setStyle(Style.EMPTY.applyFormat(ChatFormatting.RED))); }; } + }