-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[SNAPSHOT] Migrate WorldBorder API to use ticks #13223
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
base: dev/snapshot
Are you sure you want to change the base?
Conversation
|
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. |
a9f7f65 to
df6d372
Compare
paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorldBorder.java
Outdated
Show resolved
Hide resolved
paper-api/src/main/java/io/papermc/paper/event/world/border/WorldBorderBoundsChangeEvent.java
Show resolved
Hide resolved
paper-api/src/main/java/io/papermc/paper/event/world/border/WorldBorderBoundsChangeEvent.java
Outdated
Show resolved
Hide resolved
paper-server/patches/sources/net/minecraft/world/level/border/WorldBorder.java.patch
Show resolved
Hide resolved
| } | ||
|
|
||
| @Override | ||
| public void setSize(double newSize, long time) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
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