NeoForge
NeoForge copied to clipboard
Make `HeartType` an extensible enum and add a hook for `HeartType.forPlayer`
Following the GUI rendering changes in 1.20.5, HeartType
no longer references hardcoded U/V coordinates and instead references individual sprites. This means that it is possible to add new HeartType(s) by providing the sprites, which can be done by making the enum extensible.
If we allow that, we also need to permit custom logic for setting the HeartType
, which can be done either by adding an event to HeartType.forPlayer
or by making custom HeartType
(s) provide a Predicate<Player>
for when they activate.