Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix slime spawner exploit #5089

Merged
merged 2 commits into from
Sep 28, 2024
Merged

Conversation

Ineusia
Copy link
Contributor

@Ineusia Ineusia commented Sep 20, 2024

Currently, slime/magma cube meta gets cleaned at death which fires before the Transform event. This means the smaller slimes/magma cubes from a spawner slime will not have tags carry over, allowing players to farm combat skills from spawned mobs.

This PR moves cleaning for Slimes/Magma Cubes to after the transform event, which we know means the slime is dead anyways, so it's fine to clean them there.

@@ -57,6 +58,7 @@ public class EntityListener implements Listener {
* check if a {@link Player} has a {@link Trident} enchanted with "Piercing".
*/
private final NamespacedKey piercingEnchantment = NamespacedKey.minecraft("piercing");
private final List<EntityType> transformableEntities = Arrays.asList(EntityType.SLIME, EntityType.MAGMA_CUBE);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be static as well, I'll make the change after I merge.

@nossr50 nossr50 merged commit d5c4beb into mcMMO-Dev:master Sep 28, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants