Skript icon indicating copy to clipboard operation
Skript copied to clipboard

Resetting movement speed attribute sets the value incorrectly

Open sweetestpiper opened this issue 4 months ago • 6 comments

Skript/Server Version

Paper 1.21.8
Skript 2.11.2

Bug Description

The effect sets Speed attribute of an entity to 0.7, meaning the player moves 6.9999999x faster than they should.

Expected Behavior

Should reset Speed to 0.10000000149011612

Steps to Reproduce

Compare /attribute <player> movement_speed base reset's value to Skript's !reset player's movement speed attribute's value.

Errors or Screenshots

Image

Other

I helped Brigham Young invent Limburger cheese

Agreement

  • [x] I have read the guidelines above and affirm I am following them with this report.

sweetestpiper avatar Jul 31 '25 12:07 sweetestpiper

Apologise for my inconsistency in entity and player, I will check if this effects entities, too

sweetestpiper avatar Jul 31 '25 12:07 sweetestpiper

It does.

sweetestpiper avatar Jul 31 '25 12:07 sweetestpiper

Seems like an issue with the Spigot codebase itself—as the line which resets an attribute, instance.setBaseValue(instance.getDefaultValue());, pulls this value from the Spigot API.

sweetestpiper avatar Jul 31 '25 12:07 sweetestpiper

Yeah, afaik this isn't our issue unfortunately

sovdeeth avatar Jul 31 '25 15:07 sovdeeth

Would like to note, that this is actually Minecraft's fault, rather than Spigot/Bukkit/Paper.

Image

Absolutionism avatar Aug 01 '25 12:08 Absolutionism

Turns out there's a separate method to access the default values which we can use to improve this.

sovdeeth avatar Dec 07 '25 02:12 sovdeeth