Skip to content

Various GregTech fixes#2

Merged
Brickmaster1 merged 7 commits intoBrickmaster1:version/1.20.1from
Acuadragon100:registrate-fluids-gt-fix
Feb 11, 2026
Merged

Various GregTech fixes#2
Brickmaster1 merged 7 commits intoBrickmaster1:version/1.20.1from
Acuadragon100:registrate-fluids-gt-fix

Conversation

@Acuadragon100
Copy link
Copy Markdown

@Acuadragon100 Acuadragon100 commented Jan 25, 2026

Looking at this again I realised that SimpleWrappedForgeFlowingFluid is actually not necessary. All forge mods will assume it's a ForgeFlowingFluid anyway so we won't get any ClassCastExceptions from them. Only Fabric mods will expect SimpleFlowableFluid. We just have to make sure to avoid getting caught by Registrate.

I also changed the priority of registering fabric storage providers to make extracting fluids into potions possible.

There are just 2 more issues I noticed while using this.
1. My game would sometimes crash with the following error:

java.lang.IncompatibleClassChangeError: Class com.gregtechceu.gtceu.common.data.GTFluids$$Lambda$9913/0x00007febd1681c40 does not implement the requested interface xyz.bluspring.kilt.compat.create.registrate.FluidTypeFactoryToken
at knot//xyz.bluspring.kilt.compat.create.registrate.FluidBuilderHelper.createFluidTypeSupplier$lambda$0(FluidBuilderHelper.kt:73)

It would happen once the first time when accessing an inventory, but only sometimes. Maybe caused by mod loading order?

2. It doesn't look like the GT block entities save their state when modifying the amount of existing fluid. They also seem to leave an air fluidstack behind instead of emptying themselves properly. Not sure if those are separate issues.
I managed to fix the second issue (see Brickmaster1/NeoForge#2).
I think I have also fixed the first issue now.

All forge mods will assume it's a ForgeFlowingFluid anyway so we won't get any ClassCastExceptions from them. Only Fabric mods will expect SimpleFlowableFluid. We just have to make sure to avoid getting caught by Registrate.
Required to allow extracting potions from GT containers.
I just got rid of the amount and tag variables from the forge FluidStack and instead store them in the porting lib FluidStack directly. I also got rid of the isEmpty boolean since I think it only adds complexity for no good reason.
…pped.

This should hopefully solve that weird random crash I had.
@Acuadragon100 Acuadragon100 force-pushed the registrate-fluids-gt-fix branch from 19c57bb to a3bdfd7 Compare January 26, 2026 18:32
@Brickmaster1
Copy link
Copy Markdown
Owner

Thank you so much!

@Brickmaster1 Brickmaster1 merged commit befca37 into Brickmaster1:version/1.20.1 Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants