Make HeartType
an extensible enum and add a hook for HeartType.forPlayer
#961
Labels
HeartType
an extensible enum and add a hook for HeartType.forPlayer
#961
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 toHeartType.forPlayer
or by making customHeartType
(s) provide aPredicate<Player>
for when they activate.The text was updated successfully, but these errors were encountered: