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

Entity.getNearByEntities() has changed in functionality breaking Heroes targeting

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • None
    • Heroes

      There are several things that have changed in this commit that have broken skill targeting in the Heroes plugin. All of these changes are due to using the new method in world (that is also broken in some ways).

      1. The method returns the entity the method is called on when before it didn't (because of calling world version)
      2. The method returns players in spectator mode when before it didn't (also because the world version does the same)
      3. The method expands a bounding box around the entities location when before it expanded the entities bounding box to create the bounds.

      These changes are that what I have noticed looking at the implementations of both in the commit. The method used for getting the entities `a(Entity, AABB, Predicate<>) and how it is used is the cause.

      • The entity passed in is excluded from the check and not returned in the list
      • The predicate if set to null or overridden with something else removes the default predicate used to check for spectators.

      Things that break in regards to Heroes targeting are as follows

      • Unable to self target while standing the ground 100% of the time with inconsistent success while not on the ground or on a chest or bed (most likely because the origin entity is returned in the list)
      • Unable to target other players 70% of the time (estimate) (most likely due to it attempting to self target from the returned list)

            Unassigned Unassigned
            Soren025 Walter Geisler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: