diff --git a/src/main/java/gregapi/cover/covers/CoverDrain.java b/src/main/java/gregapi/cover/covers/CoverDrain.java index 95be0098e..ede791e06 100644 --- a/src/main/java/gregapi/cover/covers/CoverDrain.java +++ b/src/main/java/gregapi/cover/covers/CoverDrain.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2023 GregTech-6 Team + * Copyright (c) 2024 GregTech-6 Team * * This file is part of GregTech. * diff --git a/src/main/java/gregtech/tileentity/sensors/MultiTileEntityItemometer.java b/src/main/java/gregtech/tileentity/sensors/MultiTileEntityItemometer.java index 9ac068b20..be84dd1a6 100644 --- a/src/main/java/gregtech/tileentity/sensors/MultiTileEntityItemometer.java +++ b/src/main/java/gregtech/tileentity/sensors/MultiTileEntityItemometer.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2019 Gregorius Techneticies + * Copyright (c) 2024 GregTech-6 Team * * This file is part of GregTech. * @@ -19,8 +19,7 @@ package gregtech.tileentity.sensors; -import static gregapi.data.CS.*; - +import gregapi.data.IL; import gregapi.data.LH; import gregapi.old.Textures; import gregapi.render.IIconContainer; @@ -31,6 +30,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import static gregapi.data.CS.*; + /** * @author Gregorius Techneticies */ @@ -48,14 +49,14 @@ public long getCurrentValue(DelegatorTileEntity aDelegator) { if (tSlots != null && tSlots.length > 0) { for (int i : tSlots) { ItemStack tStack = ((IInventory)aDelegator.mTileEntity).getStackInSlot(i); - if (tStack != null) rAmount += tStack.stackSize; + if (tStack != null && !IL.Display_Fluid.equal(tStack, T, T)) rAmount += tStack.stackSize; } return rAmount; } } for (int i = 0, j = ((IInventory)aDelegator.mTileEntity).getSizeInventory(); i < j; i++) { ItemStack tStack = ((IInventory)aDelegator.mTileEntity).getStackInSlot(i); - if (tStack != null) rAmount += tStack.stackSize; + if (tStack != null && !IL.Display_Fluid.equal(tStack, T, T)) rAmount += tStack.stackSize; } return rAmount; } @@ -65,8 +66,8 @@ public long getCurrentValue(DelegatorTileEntity aDelegator) { @Override public long getCurrentMax(DelegatorTileEntity aDelegator) { if (aDelegator.mTileEntity instanceof IInventory) { - if (aDelegator.mTileEntity instanceof ISidedInventory) return ((ISidedInventory)aDelegator.mTileEntity).getAccessibleSlotsFromSide(aDelegator.mSideOfTileEntity).length * ((IInventory)aDelegator.mTileEntity).getInventoryStackLimit(); - return ((IInventory)aDelegator.mTileEntity).getSizeInventory() * ((IInventory)aDelegator.mTileEntity).getInventoryStackLimit(); + if (aDelegator.mTileEntity instanceof ISidedInventory) return (long)((ISidedInventory)aDelegator.mTileEntity).getAccessibleSlotsFromSide(aDelegator.mSideOfTileEntity).length * ((IInventory)aDelegator.mTileEntity).getInventoryStackLimit(); + return (long)((IInventory)aDelegator.mTileEntity).getSizeInventory() * ((IInventory)aDelegator.mTileEntity).getInventoryStackLimit(); } return 0; } diff --git a/src/main/java/gregtech/tileentity/sensors/MultiTileEntityStackometer.java b/src/main/java/gregtech/tileentity/sensors/MultiTileEntityStackometer.java index 7a3ab2829..2cfc3338d 100644 --- a/src/main/java/gregtech/tileentity/sensors/MultiTileEntityStackometer.java +++ b/src/main/java/gregtech/tileentity/sensors/MultiTileEntityStackometer.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2019 Gregorius Techneticies + * Copyright (c) 2024 GregTech-6 Team * * This file is part of GregTech. * @@ -19,8 +19,7 @@ package gregtech.tileentity.sensors; -import static gregapi.data.CS.*; - +import gregapi.data.IL; import gregapi.data.LH; import gregapi.old.Textures; import gregapi.render.IIconContainer; @@ -31,6 +30,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; +import static gregapi.data.CS.*; + /** * @author Gregorius Techneticies */ @@ -48,14 +49,14 @@ public long getCurrentValue(DelegatorTileEntity aDelegator) { if (tSlots != null && tSlots.length > 0) { for (int i : tSlots) { ItemStack tStack = ((IInventory)aDelegator.mTileEntity).getStackInSlot(i); - if (tStack != null && tStack.stackSize > 0) rAmount++; + if (tStack != null && tStack.stackSize > 0 && !IL.Display_Fluid.equal(tStack, T, T)) rAmount++; } return rAmount; } } for (int i = 0, j = ((IInventory)aDelegator.mTileEntity).getSizeInventory(); i < j; i++) { ItemStack tStack = ((IInventory)aDelegator.mTileEntity).getStackInSlot(i); - if (tStack != null && tStack.stackSize > 0) rAmount++; + if (tStack != null && tStack.stackSize > 0 && !IL.Display_Fluid.equal(tStack, T, T)) rAmount++; } return rAmount; }