Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: FluidStackImpl#getRawFluidSupplier crashing on forge/neoforge #483

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

desht
Copy link
Contributor

@desht desht commented Mar 11, 2024

Wrap the Holder.Reference returned from Registry#getHolderOrThrow in an actual Supplier

Holder.Reference does not implement Supplier so attempting to create a fluidstack currently crashes:

Caused by: java.lang.IncompatibleClassChangeError: Class net.minecraft.core.Holder$Reference does not implement the requested interface java.util.function.Supplier
    at dev.architectury.fluid.forge.FluidStackImpl.create(FluidStackImpl.java:52) ~[architectury-neoforge-11.1.13.jar%23177!/:?] {re:classloading}
    at dev.architectury.fluid.forge.FluidStackImpl.create(FluidStackImpl.java:33) ~[architectury-neoforge-11.1.13.jar%23177!/:?] {re:classloading}
    at dev.architectury.fluid.FluidStack.<init>(FluidStack.java:44) ~[architectury-neoforge-11.1.13.jar%23177!/:?] {re:classloading}
    at dev.architectury.fluid.FluidStack.copyWithAmount(FluidStack.java:245) ~[architectury-neoforge-11.1.13.jar%23177!/:?] {re:classloading}
    at
...

Wrap the Holder.Reference returned from Registry#getHolderOrThrow
 inside an actual Supplier
@MaxNeedsSnacks
Copy link
Member

Ah, I think Neo changed that within the 1.20.4 breaking changes window; thanks for the fix!

@MaxNeedsSnacks MaxNeedsSnacks merged commit 327480e into architectury:1.20.4 Mar 11, 2024
4 checks passed
Jab125 pushed a commit to Jab125/architectury-api that referenced this pull request Mar 17, 2024
fix: FluidStackImpl#getRawFluidSupplier crashing on forge/neoforge
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