mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-11-22 19:58:35 +01:00
parent
cb98ef5be1
commit
f861c0bbb5
2 changed files with 3 additions and 2 deletions
|
@ -20,6 +20,7 @@ public class PacketRequest {
|
||||||
public PacketRequest(BlockPos pos, ItemStack stack, int amount) {
|
public PacketRequest(BlockPos pos, ItemStack stack, int amount) {
|
||||||
this.pos = pos;
|
this.pos = pos;
|
||||||
this.stack = stack;
|
this.stack = stack;
|
||||||
|
if (stack.hasTag())
|
||||||
this.nbtHash = stack.getTag().hashCode();
|
this.nbtHash = stack.getTag().hashCode();
|
||||||
this.amount = amount;
|
this.amount = amount;
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,7 +163,7 @@ public class ItemTerminalTileEntity extends TileEntity implements INamedContaine
|
||||||
stack = this.networkItems.values().stream()
|
stack = this.networkItems.values().stream()
|
||||||
.map(NetworkItem::asStack)
|
.map(NetworkItem::asStack)
|
||||||
// don't compare with nbt equality here or the whole hashing thing is pointless
|
// don't compare with nbt equality here or the whole hashing thing is pointless
|
||||||
.filter(s -> ItemEquality.compareItems(s, filter) && s.getTag().hashCode() == nbtHash)
|
.filter(s -> ItemEquality.compareItems(s, filter) && s.hasTag() && s.getTag().hashCode() == nbtHash)
|
||||||
.findFirst().orElse(filter);
|
.findFirst().orElse(filter);
|
||||||
}
|
}
|
||||||
int requested = this.requestItemImpl(stack, onItemUnavailable(player, false));
|
int requested = this.requestItemImpl(stack, onItemUnavailable(player, false));
|
||||||
|
|
Loading…
Reference in a new issue