MapleSap$Flowing throws on getAmount
jpenilla opened this issue ยท 1 comments
I am working on a mod that includes optimizations for fluids, and when testing ATM10 I noticed that the productive trees maple sap fluid attempts to get the LEVEL_FLOWING property without it being registered to the fluid type: https://github.com/JDKDigital/productivetrees/blob/dev-1.21.0/src/main/java/cy/jdkdigital/productivetrees/common/fluid/MapleSap.java#L27
This leads to an exception when calling getAmount:
[09:53:23] [modloading-sync-worker/ERROR] [ne.ne.fm.ja.FMLModContainer/]: Exception caught during firing event: Cannot get property IntegerProperty{name=level, clazz=class java.lang.Integer, values=[1, 2, 3, 4, 5, 6, 7, 8]} as it does not exist in cy.jdkdigital.productivetrees.common.fluid.MapleSap$Flowing@5ef58294
I'm not exactly sure the best way to resolve this, however it looks like NeoForge registers the property in BaseFlowingFluid$Fluid#createFluidStateDefinition.