[1.8.9] Rethink PlantGrowthEvent fields
squeek502 opened this issue ยท 1 comments
A few options here:
- Continue using
int previousMetadata
, and have it always store the int value of the specific PropertyInteger used for growth stages. This is probably the most prone to error, as there is no standardization between Blocks - Continue using
int previousMetadata
, and have it always store the int returned fromBlock.getMetaFromState(IBlockState)
. This would basically allow for the exact same functionaltiy as 1.7.10, and would make it easy to standardize between blocks. - Change
int previousMetadata
toIBlockState previousState
and then make sure that the IBlockState instance is not mutated after the fact. I don't know enough about IBlockStates to know what would be involved in this. - A hybrid of option 2 and 3, where the return value of
Block.getMetaFromState
is given to the PlantGrowthEvent constructor, and then transformed back into IBlockState usingBlock.getStateFromMeta
before storing it in anIBlockState previousState
field.
Right now I'm leaning towards option 2 or 4 as it seems like they'd be the simplest.