From 16a3eaf7bf284486ecc2fab42f776d2e2bf499f2 Mon Sep 17 00:00:00 2001 From: Sam <78055941+samhaines-wustl@users.noreply.github.com> Date: Mon, 3 Aug 2026 01:35:12 -0500 Subject: [PATCH 1/9] Textures + map w/ FCParts Basic & Multi implement ICellHandler. Still unable to call "AEApi.instance().registries().cell().addCellHandler(this);" w/o a stack overflow --- .../client/textures/FCPartsTexture.java | 5 +- .../item/ItemBasicFluidStorageCell.java | 56 +++++++++++++++- .../item/ItemMultiFluidStorageCell.java | 62 +++++++++++++++++- .../blocks/BlockMEChestFluids_Dark.png | Bin 0 -> 95 bytes .../blocks/BlockMEChestFluids_Light.png | Bin 0 -> 119 bytes .../blocks/BlockMEChestFluids_Medium.png | Bin 0 -> 115 bytes 6 files changed, 120 insertions(+), 3 deletions(-) create mode 100644 src/main/resources/assets/ae2fc/textures/blocks/BlockMEChestFluids_Dark.png create mode 100644 src/main/resources/assets/ae2fc/textures/blocks/BlockMEChestFluids_Light.png create mode 100644 src/main/resources/assets/ae2fc/textures/blocks/BlockMEChestFluids_Medium.png diff --git a/src/main/java/com/glodblock/github/client/textures/FCPartsTexture.java b/src/main/java/com/glodblock/github/client/textures/FCPartsTexture.java index 2c1af821a..e1eb98152 100644 --- a/src/main/java/com/glodblock/github/client/textures/FCPartsTexture.java +++ b/src/main/java/com/glodblock/github/client/textures/FCPartsTexture.java @@ -27,7 +27,10 @@ public enum FCPartsTexture { PartFluidFormationPlane("fluid_formation_plane"), PartFluidAnnihilationPlane("fluid_annihilation_plane"), PartFluidFormationPlaneOn("fluid_formation_plane_on"), - PartFluidAnnihilationPlaneOn("fluid_annihilation_plane_on"); + PartFluidAnnihilationPlaneOn("fluid_annihilation_plane_on"), + BlockMEChestFluid_Bright("fluid_terminal_bright"), + BlockMEChestFluid_Dark("fluid_terminal_dark"), + BlockMEChestFluid_Medium("fluid_terminal_medium"); private final String name; public net.minecraft.util.IIcon IIcon; diff --git a/src/main/java/com/glodblock/github/common/item/ItemBasicFluidStorageCell.java b/src/main/java/com/glodblock/github/common/item/ItemBasicFluidStorageCell.java index d9467926c..86e356310 100644 --- a/src/main/java/com/glodblock/github/common/item/ItemBasicFluidStorageCell.java +++ b/src/main/java/com/glodblock/github/common/item/ItemBasicFluidStorageCell.java @@ -4,12 +4,14 @@ import java.util.HashMap; import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import com.glodblock.github.FluidCraft; +import com.glodblock.github.client.textures.FCPartsTexture; import com.glodblock.github.common.Config; import com.glodblock.github.common.storage.CellType; import com.glodblock.github.common.tabs.FluidCraftingTabs; @@ -18,13 +20,20 @@ import com.glodblock.github.util.NameConst; import com.google.common.base.Optional; +import appeng.api.AEApi; import appeng.api.exceptions.MissingDefinition; +import appeng.api.implementations.tiles.IChestOrDrive; +import appeng.api.storage.ICellHandler; +import appeng.api.storage.IMEInventory; +import appeng.api.storage.IMEInventoryHandler; +import appeng.api.storage.StorageChannel; import appeng.core.features.AEFeature; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class ItemBasicFluidStorageCell extends FCBaseItemCell implements IRegister { +public class ItemBasicFluidStorageCell extends FCBaseItemCell + implements IRegister, ICellHandler { private static final HashMap icon = new HashMap<>(); private final int housingValue; @@ -77,6 +86,9 @@ public ItemBasicFluidStorageCell(final CellType whichCell, final int housingValu this.perType = 8; } } + + // Add the handler to AE2 + AEApi.instance().registries().cell().addCellHandler(this); } @Override @@ -123,4 +135,46 @@ public ItemBasicFluidStorageCell register() { setCreativeTab(FluidCraftingTabs.INSTANCE); return this; } + + @Override + public boolean isCell(ItemStack is) { + return false; + } + + @Override + public void openChestGui(EntityPlayer player, IChestOrDrive chest, ICellHandler cellHandler, + IMEInventoryHandler inv, ItemStack is, StorageChannel chan) { + + } + + @Override + public int getStatusForCell(ItemStack is, IMEInventory handler) { + return 0; + } + + @Override + public double cellIdleDrain(ItemStack is, IMEInventory handler) { + return 0; + } + + /** + * ME Chest icon + */ + @Override + @SideOnly(Side.CLIENT) + public IIcon getTopTexture_Dark() { + return FCPartsTexture.BlockMEChestFluid_Dark.getIcon(); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getTopTexture_Light() { + return FCPartsTexture.BlockMEChestFluid_Bright.getIcon(); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getTopTexture_Medium() { + return FCPartsTexture.BlockMEChestFluid_Medium.getIcon(); + } } diff --git a/src/main/java/com/glodblock/github/common/item/ItemMultiFluidStorageCell.java b/src/main/java/com/glodblock/github/common/item/ItemMultiFluidStorageCell.java index f48648c3b..07a35045d 100644 --- a/src/main/java/com/glodblock/github/common/item/ItemMultiFluidStorageCell.java +++ b/src/main/java/com/glodblock/github/common/item/ItemMultiFluidStorageCell.java @@ -4,12 +4,15 @@ import java.util.HashMap; import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import com.glodblock.github.FluidCraft; +import com.glodblock.github.client.textures.FCPartsTexture; import com.glodblock.github.common.Config; import com.glodblock.github.common.storage.CellType; import com.glodblock.github.common.tabs.FluidCraftingTabs; @@ -19,12 +22,21 @@ import com.google.common.base.Optional; import appeng.api.exceptions.MissingDefinition; +import appeng.api.implementations.tiles.IChestOrDrive; +import appeng.api.storage.ICellHandler; +import appeng.api.storage.IMEInventory; +import appeng.api.storage.IMEInventoryHandler; +import appeng.api.storage.StorageChannel; import appeng.core.features.AEFeature; +import appeng.core.sync.GuiBridge; +import appeng.me.storage.FluidCellInventoryHandler; +import appeng.util.Platform; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class ItemMultiFluidStorageCell extends FCBaseItemCell implements IRegister { +public class ItemMultiFluidStorageCell extends FCBaseItemCell + implements IRegister, ICellHandler { private static final HashMap icon = new HashMap<>(); private final int housingValue; @@ -32,6 +44,7 @@ public class ItemMultiFluidStorageCell extends FCBaseItemCell implements IRegist @SuppressWarnings("Guava") public ItemMultiFluidStorageCell(final CellType whichCell, final int housingValue, final long kilobytes) { super(Optional.of(kilobytes + "k")); + this.setFeature(EnumSet.of(AEFeature.StorageCells)); this.setMaxStackSize(1); this.totalBytes = kilobytes * 1024; @@ -124,4 +137,51 @@ public ItemMultiFluidStorageCell register() { setCreativeTab(FluidCraftingTabs.INSTANCE); return this; } + + @Override + public void openChestGui(final EntityPlayer player, final IChestOrDrive chest, final ICellHandler cellHandler, + @SuppressWarnings("rawtypes") final IMEInventoryHandler inv, final ItemStack itemStack, + final StorageChannel channel) { + Platform.openGUI(player, (TileEntity) chest, chest.getUp(), GuiBridge.GUI_ME); + } + + @Override + public int getStatusForCell(ItemStack is, IMEInventory handler) { + if (handler instanceof FluidCellInventoryHandler ci) { + return ci.getStatusForCell(); + } + return 0; + } + + @Override + public double cellIdleDrain(ItemStack is, IMEInventory handler) { + return this.idleDrain; + } + + @Override + public boolean isCell(ItemStack is) { + return is.getItem() == this; + } + + /** + * ME Chest icon + */ + @Override + @SideOnly(Side.CLIENT) + public IIcon getTopTexture_Dark() { + return FCPartsTexture.BlockMEChestFluid_Dark.getIcon(); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getTopTexture_Light() { + return FCPartsTexture.BlockMEChestFluid_Bright.getIcon(); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getTopTexture_Medium() { + return FCPartsTexture.BlockMEChestFluid_Medium.getIcon(); + } + } diff --git a/src/main/resources/assets/ae2fc/textures/blocks/BlockMEChestFluids_Dark.png b/src/main/resources/assets/ae2fc/textures/blocks/BlockMEChestFluids_Dark.png new file mode 100644 index 0000000000000000000000000000000000000000..8cc51c790c440a7a035a322997b280854e8e256a GIT binary patch literal 95 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6I14-?iy0XBmVq#1`<<2fKtVxI p7srr_Tgeia9{m3w$a;m9;mT+JkMo}V?FULSc)I$ztaD0e0stAO8}R@D literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/ae2fc/textures/blocks/BlockMEChestFluids_Light.png b/src/main/resources/assets/ae2fc/textures/blocks/BlockMEChestFluids_Light.png new file mode 100644 index 0000000000000000000000000000000000000000..29334b5b28a14c34d7228119fecea6083e89f210 GIT binary patch literal 119 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6I14-?iy0XBmVq#1`<<2fKtWAU z7srr_TgeNgfAljJXf=E&)N1%xpwY1LWN5>NnK`Tu4vor&%w2U140k=NTc1w*Ck52R N;OXk;vd$@?2>=CMBhUZ< literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/ae2fc/textures/blocks/BlockMEChestFluids_Medium.png b/src/main/resources/assets/ae2fc/textures/blocks/BlockMEChestFluids_Medium.png new file mode 100644 index 0000000000000000000000000000000000000000..6d24fcb8cd8fbd26f03dc1edf0db0d4a06c5f655 GIT binary patch literal 115 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6I14-?iy0XBmVq#1`<<2fKtWYc z7srr_Tgeg*AO73xaT+jO{IR65VS!2IuSBmCVGOJ-vX(Cx7%tAVKKfG3;vY~0gQu&X J%Q~loCIDjwA_@Qi literal 0 HcmV?d00001 From 4755889b0eb1b6ef0c021ab22a5167c493b22f04 Mon Sep 17 00:00:00 2001 From: Sam <78055941+samhaines-wustl@users.noreply.github.com> Date: Mon, 3 Aug 2026 01:54:20 -0500 Subject: [PATCH 2/9] Added fluid handler & moved everything to there. Still getting error though (when I comment out the addCellHandler function in Fluidcraft.java no error) --- .../java/com/glodblock/github/FluidCraft.java | 4 +- .../item/ItemBasicFluidStorageCell.java | 56 +-------------- .../item/ItemMultiFluidStorageCell.java | 62 +---------------- .../github/util/FluidCellHandler.java | 69 +++++++++++++++++++ 4 files changed, 74 insertions(+), 117 deletions(-) create mode 100644 src/main/java/com/glodblock/github/util/FluidCellHandler.java diff --git a/src/main/java/com/glodblock/github/FluidCraft.java b/src/main/java/com/glodblock/github/FluidCraft.java index 1728a0c70..482b218b2 100644 --- a/src/main/java/com/glodblock/github/FluidCraft.java +++ b/src/main/java/com/glodblock/github/FluidCraft.java @@ -10,8 +10,10 @@ import com.glodblock.github.loader.ItemAndBlockHolder; import com.glodblock.github.loader.RecipeLoader; import com.glodblock.github.proxy.CommonProxy; +import com.glodblock.github.util.FluidCellHandler; import com.glodblock.github.util.ModAndClassUtil; +import appeng.api.AEApi; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; @@ -60,7 +62,7 @@ public static void init(FMLInitializationEvent event) { @Mod.EventHandler public static void postInit(FMLPostInitializationEvent event) { NetworkRegistry.INSTANCE.registerGuiHandler(FluidCraft.INSTANCE, new InventoryHandler()); - + //AEApi.instance().registries().cell().addCellHandler(new FluidCellHandler()); ItemAndBlockHolder.loadSetting(); if (!Config.removeRecipe) { diff --git a/src/main/java/com/glodblock/github/common/item/ItemBasicFluidStorageCell.java b/src/main/java/com/glodblock/github/common/item/ItemBasicFluidStorageCell.java index 86e356310..d9467926c 100644 --- a/src/main/java/com/glodblock/github/common/item/ItemBasicFluidStorageCell.java +++ b/src/main/java/com/glodblock/github/common/item/ItemBasicFluidStorageCell.java @@ -4,14 +4,12 @@ import java.util.HashMap; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import com.glodblock.github.FluidCraft; -import com.glodblock.github.client.textures.FCPartsTexture; import com.glodblock.github.common.Config; import com.glodblock.github.common.storage.CellType; import com.glodblock.github.common.tabs.FluidCraftingTabs; @@ -20,20 +18,13 @@ import com.glodblock.github.util.NameConst; import com.google.common.base.Optional; -import appeng.api.AEApi; import appeng.api.exceptions.MissingDefinition; -import appeng.api.implementations.tiles.IChestOrDrive; -import appeng.api.storage.ICellHandler; -import appeng.api.storage.IMEInventory; -import appeng.api.storage.IMEInventoryHandler; -import appeng.api.storage.StorageChannel; import appeng.core.features.AEFeature; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class ItemBasicFluidStorageCell extends FCBaseItemCell - implements IRegister, ICellHandler { +public class ItemBasicFluidStorageCell extends FCBaseItemCell implements IRegister { private static final HashMap icon = new HashMap<>(); private final int housingValue; @@ -86,9 +77,6 @@ public ItemBasicFluidStorageCell(final CellType whichCell, final int housingValu this.perType = 8; } } - - // Add the handler to AE2 - AEApi.instance().registries().cell().addCellHandler(this); } @Override @@ -135,46 +123,4 @@ public ItemBasicFluidStorageCell register() { setCreativeTab(FluidCraftingTabs.INSTANCE); return this; } - - @Override - public boolean isCell(ItemStack is) { - return false; - } - - @Override - public void openChestGui(EntityPlayer player, IChestOrDrive chest, ICellHandler cellHandler, - IMEInventoryHandler inv, ItemStack is, StorageChannel chan) { - - } - - @Override - public int getStatusForCell(ItemStack is, IMEInventory handler) { - return 0; - } - - @Override - public double cellIdleDrain(ItemStack is, IMEInventory handler) { - return 0; - } - - /** - * ME Chest icon - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getTopTexture_Dark() { - return FCPartsTexture.BlockMEChestFluid_Dark.getIcon(); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getTopTexture_Light() { - return FCPartsTexture.BlockMEChestFluid_Bright.getIcon(); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getTopTexture_Medium() { - return FCPartsTexture.BlockMEChestFluid_Medium.getIcon(); - } } diff --git a/src/main/java/com/glodblock/github/common/item/ItemMultiFluidStorageCell.java b/src/main/java/com/glodblock/github/common/item/ItemMultiFluidStorageCell.java index 07a35045d..f48648c3b 100644 --- a/src/main/java/com/glodblock/github/common/item/ItemMultiFluidStorageCell.java +++ b/src/main/java/com/glodblock/github/common/item/ItemMultiFluidStorageCell.java @@ -4,15 +4,12 @@ import java.util.HashMap; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IIcon; import net.minecraft.util.StatCollector; import com.glodblock.github.FluidCraft; -import com.glodblock.github.client.textures.FCPartsTexture; import com.glodblock.github.common.Config; import com.glodblock.github.common.storage.CellType; import com.glodblock.github.common.tabs.FluidCraftingTabs; @@ -22,21 +19,12 @@ import com.google.common.base.Optional; import appeng.api.exceptions.MissingDefinition; -import appeng.api.implementations.tiles.IChestOrDrive; -import appeng.api.storage.ICellHandler; -import appeng.api.storage.IMEInventory; -import appeng.api.storage.IMEInventoryHandler; -import appeng.api.storage.StorageChannel; import appeng.core.features.AEFeature; -import appeng.core.sync.GuiBridge; -import appeng.me.storage.FluidCellInventoryHandler; -import appeng.util.Platform; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -public class ItemMultiFluidStorageCell extends FCBaseItemCell - implements IRegister, ICellHandler { +public class ItemMultiFluidStorageCell extends FCBaseItemCell implements IRegister { private static final HashMap icon = new HashMap<>(); private final int housingValue; @@ -44,7 +32,6 @@ public class ItemMultiFluidStorageCell extends FCBaseItemCell @SuppressWarnings("Guava") public ItemMultiFluidStorageCell(final CellType whichCell, final int housingValue, final long kilobytes) { super(Optional.of(kilobytes + "k")); - this.setFeature(EnumSet.of(AEFeature.StorageCells)); this.setMaxStackSize(1); this.totalBytes = kilobytes * 1024; @@ -137,51 +124,4 @@ public ItemMultiFluidStorageCell register() { setCreativeTab(FluidCraftingTabs.INSTANCE); return this; } - - @Override - public void openChestGui(final EntityPlayer player, final IChestOrDrive chest, final ICellHandler cellHandler, - @SuppressWarnings("rawtypes") final IMEInventoryHandler inv, final ItemStack itemStack, - final StorageChannel channel) { - Platform.openGUI(player, (TileEntity) chest, chest.getUp(), GuiBridge.GUI_ME); - } - - @Override - public int getStatusForCell(ItemStack is, IMEInventory handler) { - if (handler instanceof FluidCellInventoryHandler ci) { - return ci.getStatusForCell(); - } - return 0; - } - - @Override - public double cellIdleDrain(ItemStack is, IMEInventory handler) { - return this.idleDrain; - } - - @Override - public boolean isCell(ItemStack is) { - return is.getItem() == this; - } - - /** - * ME Chest icon - */ - @Override - @SideOnly(Side.CLIENT) - public IIcon getTopTexture_Dark() { - return FCPartsTexture.BlockMEChestFluid_Dark.getIcon(); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getTopTexture_Light() { - return FCPartsTexture.BlockMEChestFluid_Bright.getIcon(); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getTopTexture_Medium() { - return FCPartsTexture.BlockMEChestFluid_Medium.getIcon(); - } - } diff --git a/src/main/java/com/glodblock/github/util/FluidCellHandler.java b/src/main/java/com/glodblock/github/util/FluidCellHandler.java new file mode 100644 index 000000000..444719573 --- /dev/null +++ b/src/main/java/com/glodblock/github/util/FluidCellHandler.java @@ -0,0 +1,69 @@ +package com.glodblock.github.util; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; + +import com.glodblock.github.client.textures.FCPartsTexture; + +import appeng.api.implementations.tiles.IChestOrDrive; +import appeng.api.storage.ICellHandler; +import appeng.api.storage.IMEInventory; +import appeng.api.storage.IMEInventoryHandler; +import appeng.api.storage.StorageChannel; +import appeng.core.sync.GuiBridge; +import appeng.me.storage.FluidCellInventory; +import appeng.me.storage.FluidCellInventoryHandler; +import appeng.util.Platform; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; + +public class FluidCellHandler implements ICellHandler { + + @Override + public boolean isCell(final ItemStack is) { + return FluidCellInventory.isCell(is); + } + + /** + * ME Chest icon + */ + @Override + @SideOnly(Side.CLIENT) + public IIcon getTopTexture_Dark() { + return FCPartsTexture.BlockMEChestFluid_Dark.getIcon(); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getTopTexture_Light() { + return FCPartsTexture.BlockMEChestFluid_Bright.getIcon(); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getTopTexture_Medium() { + return FCPartsTexture.BlockMEChestFluid_Medium.getIcon(); + } + + @Override + public void openChestGui(final EntityPlayer player, final IChestOrDrive chest, final ICellHandler cellHandler, + @SuppressWarnings("rawtypes") final IMEInventoryHandler inv, final ItemStack itemStack, + final StorageChannel channel) { + Platform.openGUI(player, (TileEntity) chest, chest.getUp(), GuiBridge.GUI_ME); + } + + @Override + public int getStatusForCell(ItemStack is, IMEInventory handler) { + if (handler instanceof FluidCellInventoryHandler ci) { + return ci.getStatusForCell(); + } + return 0; + } + + @Override + public double cellIdleDrain(final ItemStack is, @SuppressWarnings("rawtypes") final IMEInventory handler) { + return 0.0; + } +} From bea630c8dadd3f7a731ed346a4637c9e5cbfa062 Mon Sep 17 00:00:00 2001 From: Sam <78055941+samhaines-wustl@users.noreply.github.com> Date: Mon, 3 Aug 2026 02:10:43 -0500 Subject: [PATCH 3/9] Fixed texture name, still need to format it to align with others --- .../glodblock/github/client/textures/FCPartsTexture.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/glodblock/github/client/textures/FCPartsTexture.java b/src/main/java/com/glodblock/github/client/textures/FCPartsTexture.java index e1eb98152..66d53c5f5 100644 --- a/src/main/java/com/glodblock/github/client/textures/FCPartsTexture.java +++ b/src/main/java/com/glodblock/github/client/textures/FCPartsTexture.java @@ -28,9 +28,9 @@ public enum FCPartsTexture { PartFluidAnnihilationPlane("fluid_annihilation_plane"), PartFluidFormationPlaneOn("fluid_formation_plane_on"), PartFluidAnnihilationPlaneOn("fluid_annihilation_plane_on"), - BlockMEChestFluid_Bright("fluid_terminal_bright"), - BlockMEChestFluid_Dark("fluid_terminal_dark"), - BlockMEChestFluid_Medium("fluid_terminal_medium"); + BlockMEChestFluid_Bright("BlockMEChestFluids_Light"), + BlockMEChestFluid_Dark("BlockMEChestFluids_Dark"), + BlockMEChestFluid_Medium("BlockMEChestFluids_Medium"); private final String name; public net.minecraft.util.IIcon IIcon; From f937bee7a2ba42876a33ed7b2839b0348a651b5f Mon Sep 17 00:00:00 2001 From: Sam <78055941+samhaines-wustl@users.noreply.github.com> Date: Mon, 3 Aug 2026 02:11:25 -0500 Subject: [PATCH 4/9] Added in CellHandler and fixed error by overriding getCellInventory function. New issue -> even item cells get fluid texture --- .../java/com/glodblock/github/FluidCraft.java | 2 +- .../github/util/FluidCellHandler.java | 20 +++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/glodblock/github/FluidCraft.java b/src/main/java/com/glodblock/github/FluidCraft.java index 482b218b2..6140edae4 100644 --- a/src/main/java/com/glodblock/github/FluidCraft.java +++ b/src/main/java/com/glodblock/github/FluidCraft.java @@ -62,7 +62,7 @@ public static void init(FMLInitializationEvent event) { @Mod.EventHandler public static void postInit(FMLPostInitializationEvent event) { NetworkRegistry.INSTANCE.registerGuiHandler(FluidCraft.INSTANCE, new InventoryHandler()); - //AEApi.instance().registries().cell().addCellHandler(new FluidCellHandler()); + AEApi.instance().registries().cell().addCellHandler(new FluidCellHandler()); ItemAndBlockHolder.loadSetting(); if (!Config.removeRecipe) { diff --git a/src/main/java/com/glodblock/github/util/FluidCellHandler.java b/src/main/java/com/glodblock/github/util/FluidCellHandler.java index 444719573..e51d07409 100644 --- a/src/main/java/com/glodblock/github/util/FluidCellHandler.java +++ b/src/main/java/com/glodblock/github/util/FluidCellHandler.java @@ -1,17 +1,21 @@ package com.glodblock.github.util; +import static appeng.util.item.AEFluidStackType.FLUID_STACK_TYPE; + +import appeng.api.implementations.items.IStorageCell; +import appeng.me.storage.CellInventory; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import com.glodblock.github.client.textures.FCPartsTexture; +import com.glodblock.github.common.item.ItemBasicFluidStorageCell; +import appeng.api.exceptions.AppEngException; import appeng.api.implementations.tiles.IChestOrDrive; -import appeng.api.storage.ICellHandler; -import appeng.api.storage.IMEInventory; -import appeng.api.storage.IMEInventoryHandler; -import appeng.api.storage.StorageChannel; +import appeng.api.storage.*; +import appeng.api.storage.data.IAEStackType; import appeng.core.sync.GuiBridge; import appeng.me.storage.FluidCellInventory; import appeng.me.storage.FluidCellInventoryHandler; @@ -66,4 +70,12 @@ public int getStatusForCell(ItemStack is, IMEInventory handler) { public double cellIdleDrain(final ItemStack is, @SuppressWarnings("rawtypes") final IMEInventory handler) { return 0.0; } + + @Override + public IMEInventoryHandler getCellInventory(ItemStack fluidCell, ISaveProvider saveProvider, IAEStackType type) { + if (fluidCell != null && fluidCell.getItem() instanceof IStorageCell cell && cell.getStackType() == type) { + return CellInventory.getCell(fluidCell, saveProvider, type); + } + return null; + } } From 31ab669ffb860c84a121c2980056547b950940ee Mon Sep 17 00:00:00 2001 From: Sam <78055941+samhaines-wustl@users.noreply.github.com> Date: Mon, 3 Aug 2026 02:13:15 -0500 Subject: [PATCH 5/9] Fixed bug, better filtering makes only fluid cells get new texture --- .../java/com/glodblock/github/util/FluidCellHandler.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/glodblock/github/util/FluidCellHandler.java b/src/main/java/com/glodblock/github/util/FluidCellHandler.java index e51d07409..919ae65fb 100644 --- a/src/main/java/com/glodblock/github/util/FluidCellHandler.java +++ b/src/main/java/com/glodblock/github/util/FluidCellHandler.java @@ -4,6 +4,8 @@ import appeng.api.implementations.items.IStorageCell; import appeng.me.storage.CellInventory; +import com.glodblock.github.common.item.ItemFluidExtremeStorageCell; +import com.glodblock.github.common.item.ItemMultiFluidStorageCell; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; @@ -27,7 +29,8 @@ public class FluidCellHandler implements ICellHandler { @Override public boolean isCell(final ItemStack is) { - return FluidCellInventory.isCell(is); + return is != null && (is.getItem() instanceof ItemBasicFluidStorageCell + || is.getItem() instanceof ItemMultiFluidStorageCell || is.getItem() instanceof ItemFluidExtremeStorageCell); } /** From 12bc4d8f2f70c4b0c2280a327b8e58e6d1f72d93 Mon Sep 17 00:00:00 2001 From: Sam <78055941+samhaines-wustl@users.noreply.github.com> Date: Mon, 3 Aug 2026 09:40:03 -0500 Subject: [PATCH 6/9] Cleaner filtering using super class --- .../github/util/FluidCellHandler.java | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/glodblock/github/util/FluidCellHandler.java b/src/main/java/com/glodblock/github/util/FluidCellHandler.java index 919ae65fb..d2d499f69 100644 --- a/src/main/java/com/glodblock/github/util/FluidCellHandler.java +++ b/src/main/java/com/glodblock/github/util/FluidCellHandler.java @@ -1,25 +1,23 @@ package com.glodblock.github.util; -import static appeng.util.item.AEFluidStackType.FLUID_STACK_TYPE; - -import appeng.api.implementations.items.IStorageCell; -import appeng.me.storage.CellInventory; -import com.glodblock.github.common.item.ItemFluidExtremeStorageCell; -import com.glodblock.github.common.item.ItemMultiFluidStorageCell; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import com.glodblock.github.client.textures.FCPartsTexture; -import com.glodblock.github.common.item.ItemBasicFluidStorageCell; +import com.glodblock.github.common.item.FCBaseItemCell; -import appeng.api.exceptions.AppEngException; +import appeng.api.implementations.items.IStorageCell; import appeng.api.implementations.tiles.IChestOrDrive; -import appeng.api.storage.*; +import appeng.api.storage.ICellHandler; +import appeng.api.storage.IMEInventory; +import appeng.api.storage.IMEInventoryHandler; +import appeng.api.storage.ISaveProvider; +import appeng.api.storage.StorageChannel; import appeng.api.storage.data.IAEStackType; import appeng.core.sync.GuiBridge; -import appeng.me.storage.FluidCellInventory; +import appeng.me.storage.CellInventory; import appeng.me.storage.FluidCellInventoryHandler; import appeng.util.Platform; import cpw.mods.fml.relauncher.Side; @@ -29,8 +27,10 @@ public class FluidCellHandler implements ICellHandler { @Override public boolean isCell(final ItemStack is) { - return is != null && (is.getItem() instanceof ItemBasicFluidStorageCell - || is.getItem() instanceof ItemMultiFluidStorageCell || is.getItem() instanceof ItemFluidExtremeStorageCell); + /* + * FCBaseItemCell covers Basic, Multi, and Extreme fluid storage + */ + return is != null && is.getItem() instanceof FCBaseItemCell; } /** From ef2a7c955933f37559aed05c85537b842191bee7 Mon Sep 17 00:00:00 2001 From: Sam <78055941+samhaines-wustl@users.noreply.github.com> Date: Mon, 3 Aug 2026 10:13:28 -0500 Subject: [PATCH 7/9] Properly uses idleDrain of cells in own classes --- .../java/com/glodblock/github/util/FluidCellHandler.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/glodblock/github/util/FluidCellHandler.java b/src/main/java/com/glodblock/github/util/FluidCellHandler.java index d2d499f69..16f0ddc24 100644 --- a/src/main/java/com/glodblock/github/util/FluidCellHandler.java +++ b/src/main/java/com/glodblock/github/util/FluidCellHandler.java @@ -1,5 +1,6 @@ package com.glodblock.github.util; +import appeng.api.storage.*; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; @@ -10,11 +11,6 @@ import appeng.api.implementations.items.IStorageCell; import appeng.api.implementations.tiles.IChestOrDrive; -import appeng.api.storage.ICellHandler; -import appeng.api.storage.IMEInventory; -import appeng.api.storage.IMEInventoryHandler; -import appeng.api.storage.ISaveProvider; -import appeng.api.storage.StorageChannel; import appeng.api.storage.data.IAEStackType; import appeng.core.sync.GuiBridge; import appeng.me.storage.CellInventory; @@ -71,7 +67,8 @@ public int getStatusForCell(ItemStack is, IMEInventory handler) { @Override public double cellIdleDrain(final ItemStack is, @SuppressWarnings("rawtypes") final IMEInventory handler) { - return 0.0; + //return EnumEssentiaStorageTypes.fromIndex[itemStack.getItemDamage()].idleAEPowerDrain; + return ((ICellInventoryHandler) handler).getCellInv().getIdleDrain(); } @Override From c8f0ce1b952f167b7384d2f62358cff8cb28df9c Mon Sep 17 00:00:00 2001 From: Sam <78055941+samhaines-wustl@users.noreply.github.com> Date: Mon, 3 Aug 2026 10:15:44 -0500 Subject: [PATCH 8/9] Renamed fluid terminal textures to better align with other names --- .../github/client/textures/FCPartsTexture.java | 6 +++--- ...ChestFluids_Dark.png => fluid_terminal_dark.png} | Bin ...estFluids_Light.png => fluid_terminal_light.png} | Bin ...tFluids_Medium.png => fluid_terminal_medium.png} | Bin 4 files changed, 3 insertions(+), 3 deletions(-) rename src/main/resources/assets/ae2fc/textures/blocks/{BlockMEChestFluids_Dark.png => fluid_terminal_dark.png} (100%) rename src/main/resources/assets/ae2fc/textures/blocks/{BlockMEChestFluids_Light.png => fluid_terminal_light.png} (100%) rename src/main/resources/assets/ae2fc/textures/blocks/{BlockMEChestFluids_Medium.png => fluid_terminal_medium.png} (100%) diff --git a/src/main/java/com/glodblock/github/client/textures/FCPartsTexture.java b/src/main/java/com/glodblock/github/client/textures/FCPartsTexture.java index 66d53c5f5..513437850 100644 --- a/src/main/java/com/glodblock/github/client/textures/FCPartsTexture.java +++ b/src/main/java/com/glodblock/github/client/textures/FCPartsTexture.java @@ -28,9 +28,9 @@ public enum FCPartsTexture { PartFluidAnnihilationPlane("fluid_annihilation_plane"), PartFluidFormationPlaneOn("fluid_formation_plane_on"), PartFluidAnnihilationPlaneOn("fluid_annihilation_plane_on"), - BlockMEChestFluid_Bright("BlockMEChestFluids_Light"), - BlockMEChestFluid_Dark("BlockMEChestFluids_Dark"), - BlockMEChestFluid_Medium("BlockMEChestFluids_Medium"); + BlockMEChestFluid_Bright("fluid_terminal_light"), + BlockMEChestFluid_Dark("fluid_terminal_dark"), + BlockMEChestFluid_Medium("fluid_terminal_medium"); private final String name; public net.minecraft.util.IIcon IIcon; diff --git a/src/main/resources/assets/ae2fc/textures/blocks/BlockMEChestFluids_Dark.png b/src/main/resources/assets/ae2fc/textures/blocks/fluid_terminal_dark.png similarity index 100% rename from src/main/resources/assets/ae2fc/textures/blocks/BlockMEChestFluids_Dark.png rename to src/main/resources/assets/ae2fc/textures/blocks/fluid_terminal_dark.png diff --git a/src/main/resources/assets/ae2fc/textures/blocks/BlockMEChestFluids_Light.png b/src/main/resources/assets/ae2fc/textures/blocks/fluid_terminal_light.png similarity index 100% rename from src/main/resources/assets/ae2fc/textures/blocks/BlockMEChestFluids_Light.png rename to src/main/resources/assets/ae2fc/textures/blocks/fluid_terminal_light.png diff --git a/src/main/resources/assets/ae2fc/textures/blocks/BlockMEChestFluids_Medium.png b/src/main/resources/assets/ae2fc/textures/blocks/fluid_terminal_medium.png similarity index 100% rename from src/main/resources/assets/ae2fc/textures/blocks/BlockMEChestFluids_Medium.png rename to src/main/resources/assets/ae2fc/textures/blocks/fluid_terminal_medium.png From f70498ee739cd986e9d6c4bb71169cfa4bf923a5 Mon Sep 17 00:00:00 2001 From: Sam <78055941+samhaines-wustl@users.noreply.github.com> Date: Mon, 3 Aug 2026 10:44:03 -0500 Subject: [PATCH 9/9] Removed asterisk import and gradlew spotlessApply --- .../java/com/glodblock/github/util/FluidCellHandler.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/glodblock/github/util/FluidCellHandler.java b/src/main/java/com/glodblock/github/util/FluidCellHandler.java index 16f0ddc24..ec48ea834 100644 --- a/src/main/java/com/glodblock/github/util/FluidCellHandler.java +++ b/src/main/java/com/glodblock/github/util/FluidCellHandler.java @@ -1,6 +1,5 @@ package com.glodblock.github.util; -import appeng.api.storage.*; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; @@ -11,6 +10,12 @@ import appeng.api.implementations.items.IStorageCell; import appeng.api.implementations.tiles.IChestOrDrive; +import appeng.api.storage.ICellHandler; +import appeng.api.storage.ICellInventoryHandler; +import appeng.api.storage.IMEInventory; +import appeng.api.storage.IMEInventoryHandler; +import appeng.api.storage.ISaveProvider; +import appeng.api.storage.StorageChannel; import appeng.api.storage.data.IAEStackType; import appeng.core.sync.GuiBridge; import appeng.me.storage.CellInventory; @@ -67,7 +72,6 @@ public int getStatusForCell(ItemStack is, IMEInventory handler) { @Override public double cellIdleDrain(final ItemStack is, @SuppressWarnings("rawtypes") final IMEInventory handler) { - //return EnumEssentiaStorageTypes.fromIndex[itemStack.getItemDamage()].idleAEPowerDrain; return ((ICellInventoryHandler) handler).getCellInv().getIdleDrain(); }