mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-21 04:32:27 +00:00
Merge remote-tracking branch 'origin/master' into mu
This commit is contained in:
3 files changed
+16
-2
No files matched your search
@@ -144,7 +144,7 @@ public class BookmarkItem {
|
||||
private static synchronized String getItemGUID(ItemStack stack) {
|
||||
final FluidStack fluidStack = StackInfo.getFluid(stack);
|
||||
|
||||
if (fluidStack != null) {
|
||||
if (fluidStack != null && (fluidStack.amount > 0 || !StackInfo.isFluidContainer(stack))) {
|
||||
return fluidStack.getFluid().getName() + ":" + fluidStack.tag;
|
||||
} else {
|
||||
|
||||
|
||||
@@ -135,7 +135,14 @@ public class StackInfo {
|
||||
}
|
||||
|
||||
if (isFluidDisplayItem(stackA)) {
|
||||
return isFluidDisplayItem(stackB) && getFluid(stackA).isFluidEqual(getFluid(stackB));
|
||||
|
||||
if (isFluidDisplayItem(stackB)) {
|
||||
final FluidStack fluidA = getFluid(stackA);
|
||||
final FluidStack fluidB = getFluid(stackB);
|
||||
return fluidA != null && fluidA.isFluidEqual(fluidB);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (stackA.getItem() != stackB.getItem()) {
|
||||
|
||||
@@ -21,6 +21,7 @@ public class GTFluidStackStringifyHandler implements IStackStringifyHandler {
|
||||
protected static Method getFluidFromDisplayStack = null;
|
||||
protected static Class<?> gtMetaGeneratedTool = null;
|
||||
protected static Field playSound = null;
|
||||
private static boolean loggedNoNbtDisplay = false;
|
||||
|
||||
static {
|
||||
try {
|
||||
@@ -88,6 +89,12 @@ public class GTFluidStackStringifyHandler implements IStackStringifyHandler {
|
||||
return (FluidStack) obj;
|
||||
}
|
||||
|
||||
final Fluid fluid = FluidRegistry.getFluid(stack.getItemDamage());
|
||||
|
||||
if (fluid != null) {
|
||||
return new FluidStack(fluid, 0);
|
||||
}
|
||||
|
||||
} else if (item == GameRegistry.findItem("ae2fc", "fluid_packet")) {
|
||||
NBTTagCompound nbtTag = stack.getTagCompound();
|
||||
|
||||
|
||||
Reference in new issue
Block a user