Uploaded image for project: 'Spigot'
  1. Spigot
  2. SPIGOT-7965

Inconsistency in TransformReason for Hoglins

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • None
    • None
    • 1.21.2-R0.1-SNAPSHOT
    • Yes

      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"
      Since the transformation for piglins, piglin brutes and hoglins is the exact same thing, I assume that this is an inconsistency and not intended

      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());
          }
      }

            Unassigned Unassigned
            DavudMullun David Mühlan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: