From 1f2613b331f1ddde5ef590fbb52ca2a4ac279fe8 Mon Sep 17 00:00:00 2001 From: lc-1337 <62835225+lc-1337@users.noreply.github.com> Date: Thu, 7 May 2026 07:33:48 +0300 Subject: [PATCH] Cell Restriction rework (#428) Co-authored-by: UltraProdigy <187078471+UltraProdigy@users.noreply.github.com> --- dependencies.gradle | 2 +- .../github/common/item/FCBaseItemCell.java | 16 ++-------------- .../common/item/ItemPortableFluidCell.java | 5 +++++ 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/dependencies.gradle b/dependencies.gradle index 257aa280..f6ce6760 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -35,7 +35,7 @@ */ dependencies { api('com.github.GTNewHorizons:NotEnoughItems:2.8.91-GTNH:dev') - api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-919-GTNH:dev') + api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-928-GTNH:dev') api('com.github.GTNewHorizons:waila:1.19.22:dev') api("com.github.GTNewHorizons:GTNHLib:0.9.50:dev") diff --git a/src/main/java/com/glodblock/github/common/item/FCBaseItemCell.java b/src/main/java/com/glodblock/github/common/item/FCBaseItemCell.java index 9a11153e..99631884 100644 --- a/src/main/java/com/glodblock/github/common/item/FCBaseItemCell.java +++ b/src/main/java/com/glodblock/github/common/item/FCBaseItemCell.java @@ -12,7 +12,6 @@ import com.google.common.base.Optional; import appeng.api.storage.data.IAEStackType; import appeng.items.AEBaseCell; -import appeng.util.Platform; public abstract class FCBaseItemCell extends AEBaseCell { @@ -53,18 +52,7 @@ public abstract class FCBaseItemCell extends AEBaseCell { } @Override - public String getCellData(ItemStack is) { - return totalBytes + "," - + this.getTotalTypes(null) - + "," - + perType - + "," - + 8 * 256 - + "," - + Platform.openNbtData(is).getByte("cellRestrictionTypes") - + "," - + Platform.openNbtData(is).getLong("cellRestrictionAmount") - + "," - + "fluid"; + public int getTypeWeight() { + return 8 * 256; } } diff --git a/src/main/java/com/glodblock/github/common/item/ItemPortableFluidCell.java b/src/main/java/com/glodblock/github/common/item/ItemPortableFluidCell.java index d40f9c7e..0d9a051e 100644 --- a/src/main/java/com/glodblock/github/common/item/ItemPortableFluidCell.java +++ b/src/main/java/com/glodblock/github/common/item/ItemPortableFluidCell.java @@ -101,4 +101,9 @@ public class ItemPortableFluidCell extends AEBasePortableCell implements IRegist public ItemStack stack() { return new ItemStack(this, 1); } + + @Override + public int getTypeWeight() { + return 8 * 256; + } }