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

Add worldborders #7006

Open
wants to merge 39 commits into
base: dev/feature
Choose a base branch
from

Conversation

Phill310
Copy link
Contributor

@Phill310 Phill310 commented Aug 29, 2024

Description

Add worldborder syntax to Skript. Continuation of #5229
Player's worldborder is always virtual

Conditions:

  • updated IsWithin condition

Effects:

  • expand/shrink worldborder (maybe add grow/contract aliases)
    I don't like the way I am registering the syntax right now with the of and 's but I can't think of a different way

Events:

  • Worldborder bounds change
  • Worldborder bounds finish change
  • Worldborder center change

Expressions:

  • worldborder
  • worldborder center
  • worldborder damage amount
  • worldborder damage buffer
  • worldborder size
  • worldborder warning distance
  • worldborder warning time

Sections:

  • Create worldborder

Target Minecraft Versions: any
Requirements: Paper for worldborder events
Related Issues: #5178, #3848

Copy link
Contributor

@Fusezion Fusezion left a comment

Choose a reason for hiding this comment

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

TEST!

@Fusezion
Copy link
Contributor

A lot of chez's stuff might of been repeated he beat me ;(

@sovdeeth sovdeeth added the feature Pull request adding a new feature. label Aug 30, 2024
@Phill310 Phill310 marked this pull request as ready for review September 9, 2024 01:55
Copy link
Member

@sovdeeth sovdeeth left a comment

Choose a reason for hiding this comment

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

just needs some formatting updates, mainly around annotations!

src/main/java/ch/njol/skript/bukkitutil/BukkitUnsafe.java Outdated Show resolved Hide resolved
src/main/java/ch/njol/skript/aliases/Aliases.java Outdated Show resolved Hide resolved
import org.jetbrains.annotations.Nullable;

@Name("Warning Time of World Border")
@Description("The warning time of a world border. If the border is shrinking, the player's screen will be tinted red once the border will catch the player within this time period.")
Copy link
Member

Choose a reason for hiding this comment

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

so if the player is outside the border it will be tinted red after one second? im not sure what this expression does

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Its specifically when the worldborder is shrinking. If the player is outside the final worldborder (after the shrink), their screen will turn red x seconds before it reaches their current location

Copy link
Contributor

@TheAbsolutionism TheAbsolutionism left a comment

Choose a reason for hiding this comment

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

Just a few things

Location location = mode == ChangeMode.SET ? (Location) delta[0] : null;
for (WorldBorder worldBorder : getExpr().getArray(event)) {
switch (mode) {
case SET:
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a big deal, but maybe an enhanced switch?

Phill310 and others added 4 commits December 26, 2024 18:20
Co-authored-by: Efnilite <35348263+Efnilite@users.noreply.github.com>
Co-authored-by: SirSmurfy2 <82696841+TheAbsolutionism@users.noreply.github.com>
Copy link
Contributor

@TheAbsolutionism TheAbsolutionism left a comment

Choose a reason for hiding this comment

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

I believe that's about it, unless you add more classes

Phill310 and others added 3 commits December 28, 2024 09:34
Co-authored-by: Efnilite <35348263+Efnilite@users.noreply.github.com>
@Phill310 Phill310 requested a review from Efnilite December 28, 2024 17:41
Phill310 and others added 2 commits December 28, 2024 23:42
…der.java

Co-authored-by: SirSmurfy2 <82696841+TheAbsolutionism@users.noreply.github.com>
Copy link
Member

@sovdeeth sovdeeth left a comment

Choose a reason for hiding this comment

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

lots of failing tests + conflicts

@Phill310 Phill310 requested a review from sovdeeth January 6, 2025 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Pull request adding a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants