mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-13 17:04:03 +00:00
Correctly filtering neifluids (#1027)
This commit is contained in:
1 parent
2bf5a1cf9f
commit
af6dba1269
5 files changed
+43
-13
No files matched your search
@@ -126,7 +126,15 @@ public class StackInfo {
|
||||
}
|
||||
|
||||
public static boolean equalItemAndNBT(ItemStack stackA, ItemStack stackB, boolean useNBT) {
|
||||
if (stackA == null || stackB == null || stackA.getItem() != stackB.getItem()) {
|
||||
if (stackA == null || stackB == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isFluidDisplayItem(stackA)) {
|
||||
return isFluidDisplayItem(stackB) && getFluid(stackA).isFluidEqual(getFluid(stackB));
|
||||
}
|
||||
|
||||
if (stackA.getItem() != stackB.getItem()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -158,7 +166,8 @@ public class StackInfo {
|
||||
}
|
||||
|
||||
public static boolean isFluidContainer(ItemStack stack) {
|
||||
return stack.getItem() instanceof IFluidContainerItem || FluidContainerRegistry.isContainer(stack);
|
||||
return stack.getItem() instanceof IFluidContainerItem && !isFluidDisplayItem(stack)
|
||||
|| FluidContainerRegistry.isContainer(stack);
|
||||
}
|
||||
|
||||
public static String getItemStackGUID(ItemStack stack) {
|
||||
|
||||
Reference in new issue
Block a user