TerraFirmaCraft

TerraFirmaCraft

2M Downloads

Define BlockLeavesTFC CHECK_DECAY property for compat with other mods

Indiiix opened this issue ยท 3 comments

commented

The Bewitchment mod (ver. 0.0.22.40) checks for the CHECK_DECAY and DECAYABLE properties when getting an IBlockState for its Altar multiblock structure. Adding the CHECK_DECAY property (even when unused) would allow other mods including Bewitchment to get the IBlockState without a crash.

TFC ver. 1.7.4.162

commented

Why don't they check if there was a CHECK_DECAY or DECAYABLE property on said blocks before checking for their respective values?

commented

^ There's a fairly easy way to avoid this particular crash from bewitchment's end. (state.getPropertyKeys().contains(CHECK_DECAY)

I don't know what the standard for instanceof T implying that you must have all state properties of the superclass. In a number of vanilla functions, having the correct subclass is required despite not necessarily wanting to have all the state properties of all super types. I personally think this should be fixed on bewitchment's end, as an instanceof BlockLeaves check does not actually predicate that said block has the CHECK_DECAY property- there exists an actual check, so use that instead.

commented

I'll forward this information to them, I do now believe it should be on their end to check the existence of a property. Thank you!