Skip to content

Conversation

roro1506HD
Copy link
Contributor

This commit (Initial update to EAR patch) has changed how monsters are detected (then org.spigotmc.ActivationRange, now io.papermc.paper.entity.activation.ActivationRange):

-        } else if (entity instanceof Monster || entity instanceof Slime) {
+        } else if (entity instanceof Enemy) { // Paper - correct monster check

Tracking range (org.spigotmc.TrackingRange) is also affected by this change since it has the following code under the MISC activation type:

            if (entity instanceof net.minecraft.world.entity.boss.enderdragon.EnderDragon) {
                // Exempt ender dragon
                return ((ServerLevel) entity.level()).getChunkSource().chunkMap.serverViewDistance;
            }

Now, it turns out the net.minecraft.world.entity.boss.enderdragon.EnderDragon class implements Enemy which makes it use the MONSTER activation range and not the server view distance.

This PR moves the Ender Dragon check above the activation type check so that it returns the right tracking range, but still making the Ender Dragon activation range the same as monsters.

@roro1506HD roro1506HD requested a review from a team as a code owner August 31, 2025 17:22
@github-project-automation github-project-automation bot moved this to Awaiting review in Paper PR Queue Aug 31, 2025
@roro1506HD roro1506HD marked this pull request as draft August 31, 2025 17:35
@roro1506HD
Copy link
Contributor Author

Seems not to be working as expected, doing some more tests

@roro1506HD roro1506HD marked this pull request as ready for review August 31, 2025 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Awaiting review
Development

Successfully merging this pull request may close these issues.

1 participant