[SPIGOT-7965] Inconsistency in TransformReason for Hoglins Created: 26/Nov/24 Updated: 25/Dec/24 Resolved: 26/Nov/24 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | David Mühlan | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | None |
Version: | 1.21.2-R0.1-SNAPSHOT |
Guidelines Read: | Yes |
Description |
When using EntityTransformEvent to check for piglins or piglin brutes being transformed to zombified piglins, the event is called and the TransformReason is flagged "PIGLIN_ZOMBIFIED". The piglins transform because I guess the overworld is too cold for them. But the exact same thing happens to hoglins when they transform to zoglins. However, then the TransformReason is flagged "UNKNOWN" Recreation: @EventHandler public void onEntityTransform(EntityTransformEvent ev) { if(ev.getEntity().getType().equals(EntityType.HOGLIN)) { getLogger().info("Hoglin transformation reason: " + ev.getTransformReason().name()); } if(ev.getEntity().getType().equals(EntityType.PIGLIN)) { getLogger().info("Piglin transformation reason: " + ev.getTransformReason().name()); } } |