-
New Feature
-
Resolution: Fixed
-
Minor
-
None
-
None
-
None
-
All versions 1.16.1+ (I'm not listing all the versions)
-
Yes
The StriderTemperatureChangeEvent is tedious/ineffective to use for the purposes of keeping a strider in the non-shivering state, requiring it to be set with a short delay every time the event fires. If you try to do it during the event, it just doesn't work, as the state finishes changing when the event concludes. If you try to do it after a 0 tick delay (so right when the current thread finishes) it... turns into a funky strobe boi.
// Literally does nothing @EventHandler public void onStriderTemperatureChangeEvent(StriderTemperatureChangeEvent event) { Bukkit.getLogger().info("temp changed"); Strider strider = event.getEntity(); if (event.isShivering()) { strider.setShivering(false); } }
// Strobe boi @EventHandler public void onStriderTemperatureChangeEvent(StriderTemperatureChangeEvent event) { Bukkit.getLogger().info("temp changed"); Strider strider = event.getEntity(); if (event.isShivering()) { Bukkit.getScheduler().runTaskLater(plugin, () -> strider.setShivering(false), 0L); } }
Could the event just be cancellable, to simplify the process of locking a strider in a particular state?