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
}

@Override
public void setSize(double newSize, long time) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This method and the other one should probably be deprecated (with a new method) now since the duration is in ticks and 20 ticks is not always equivalent to 1s especially with the tick command. That's the whole reason the bukkit scheduler doesn't have the TimeUnit equivalent.

Copy link
Member Author

Choose a reason for hiding this comment

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

How can replace this?
i cannot make another method like this not? unless mark the deprecation to use the method with timeunit and include a see to the Tick TimeUnit

@lynxplay lynxplay added the dev/next Changes related to the snapshot / next branch label Nov 1, 2025
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: Awaiting review

Development

Successfully merging this pull request may close these issues.

3 participants