Skip to content

Conversation

@Doc94
Copy link
Member

@Doc94 Doc94 commented Oct 21, 2025

This PR try to manage the breaking change in the last snapshot where worldborder time for reduce now works with ticks and not seconds/milis
https://www.minecraft.net/en-us/article/minecraft-snapshot-25w43a

PD: Need test this with the virtual worldborder feature

@github-project-automation github-project-automation bot moved this to Awaiting review in Paper PR Queue Oct 21, 2025
@Doc94 Doc94 marked this pull request as ready for review October 21, 2025 20:25
@Doc94 Doc94 requested a review from a team as a code owner October 21, 2025 20:25
@Doc94
Copy link
Member Author

Doc94 commented Oct 21, 2025

A few test i make...

WorldBorder worldBorder = Bukkit.createWorldBorder();
worldBorder.setSize(50);
player.setWorldBorder(worldBorder);
WorldBorder worldBorder = player.getWorldBorder();
if (worldBorder != null) {
   worldBorder.setSize(10, TimeUnit.SECONDS, 10);
}
WorldBorder worldBorder = player.getWorld().getWorldBorder();
worldBorder.setSize(20, TimeUnit.SECONDS, 30);

the border change in the time expected. same for WorldBorderBoundsChangeEvent where the getDuration and Ticks show the value expected.
ex: /worldborder set 1000 600 make duration return 30000 and ticks 600

@Doc94 Doc94 force-pushed the fix/snapshot-worldborder branch from a9f7f65 to df6d372 Compare October 24, 2025 01:31
@lynxplay lynxplay added the dev/next Changes related to the snapshot / next branch label Nov 1, 2025
@Doc94 Doc94 force-pushed the fix/snapshot-worldborder branch 3 times, most recently from d9ff2a4 to e716f68 Compare November 6, 2025 15:30
@Lulu13022002 Lulu13022002 changed the title [SNAPSHOT] Migrate WorldBorder API to use ticks Migrate WorldBorder API to use ticks Nov 6, 2025
@Lulu13022002
Copy link
Contributor

Do you think there's a need to handle WorldBorderBoundsChangeFinishEvent#getDuration now returning ticks instead of milliseconds or not?

@Doc94
Copy link
Member Author

Doc94 commented Nov 6, 2025

Do you think there's a need to handle WorldBorderBoundsChangeFinishEvent#getDuration now returning ticks instead of milliseconds or not?

hmm not sure.. the method even not mention what duration its suposed to be....

@Doc94
Copy link
Member Author

Doc94 commented Nov 7, 2025

Just add this for reference.. if they not fix i can make another PR o add to this (what happen first..) https://mojira.dev/MC-304061
the bug is because new worlds set the warning time in 15 ticks and not 300 (because they forget update that value)

@Doc94 Doc94 force-pushed the fix/snapshot-worldborder branch from 2971ea4 to af2349c Compare November 11, 2025 23:02
@Doc94
Copy link
Member Author

Doc94 commented Nov 11, 2025

Rebased with 25w46a, https://mojira.dev/MC-304061 was fixed then not need consider that now :)

@jpenilla jpenilla merged commit 8c18ca3 into PaperMC:dev/snapshot Nov 12, 2025
4 checks passed
@github-project-automation github-project-automation bot moved this from Awaiting review to Merged in Paper PR Queue Nov 12, 2025
@Lulu13022002
Copy link
Contributor

Sadly MC-304061 is not completely fixed since they forgot to change the initial value of the field which affect the virtual border atm i believe.

@Doc94 Doc94 deleted the fix/snapshot-worldborder branch November 13, 2025 17:58
@Doc94
Copy link
Member Author

Doc94 commented Nov 13, 2025

Sadly MC-304061 is not completely fixed since they forgot to change the initial value of the field which affect the virtual border atm i believe.

Yeah i notice that too but the virtual worldborder just call the default constructor and that use the WorldBorder.Settings.DEFAULT where the warning time is 300 ticks.

i dont find in what case that 15 in the WorldBorder class can be used because in all cases that value is overriden by default or the constructor with Settings passed.

@Lulu13022002
Copy link
Contributor

Yes but in that case the settings are never applied, you can see it by just calling getWarningTimeTicks after creating your border. Also why changeSize's ticks is not clamped like in the event?

@Doc94
Copy link
Member Author

Doc94 commented Nov 13, 2025

Okay i see now... not make sense in NMS how work.... then still need override that...

about the changeSize i think forget that when make that new one... if is new maybe can be good just check? if not then not make sense have a Precondition for check time > 0 if we clamp the value

@Doc94
Copy link
Member Author

Doc94 commented Nov 13, 2025

Created #13308 meanwhile for handle the two things....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev/next Changes related to the snapshot / next branch

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

4 participants