chore: update dependency com.github.SkriptLang:Skript to v2.14.0-pre1 #63
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.13.2→2.14.0-pre1Release Notes
SkriptLang/Skript (com.github.SkriptLang:Skript)
v2.14.0-pre1: Pre-Release 2.14.0-pre1Compare Source
Skript 2.14.0-pre1
We are kicking off the new year with the first pre-release for Skript 2.14.0. This release includes dozens of major contributions to enhance Skript's existing features, along with a handful of exciting new features. Major changes means some breaking changes though, so we hope you all forgive us for doing some early spring cleaning (especially with visual effects). Please remember to look through the Breaking Changes section to see if anything impacts you!
In accordance with supporting the last 18 months of Minecraft updates, Skript 2.14.0 supports Minecraft 1.21.0 to 1.21.11. Newer versions may also work but were not tested at time of release. Paper is required.
Below, you can familiarize yourself with the changes. Additionally, by clicking here, you can view the list of new syntax on our documentation site. As always, report any issues to our issues page!
Per our release model, we plan to release 2.14.0 on January 15th. We may release additional pre-releases before then should the need arise.
Happy Skripting!
Major Changes
Potions Rework
Potion syntax has seen a major rework in order to modernize the syntax and make working with potions a breeze.
Obtaining Potion Effects
Just as before, potion effects can be obtained through syntax like:
However, it is now also possible to obtain specific potion effects:
Potion Creation
Potion creation has been united into a single expression that may optionally be used as a section:
The current effect has been replaced with one for applying potion effects.
Potion Modification
The six primary properties of potion effects are supported:
type,duration,amplifier,ambient,particles, andicon.All of these properties may be modified in the builder (see above).
It is also now possible to modify existing potion effects:
Even better, it is now possible to modify potion effects that are actively applied to entities and items:
Hidden Effects
Full support for hidden effects has been implemented too. Hidden effects allow a player to have multiple effects of the same type. For example, if a player has speed 1 for 30 seconds, and is then affected by speed 2 for 15 seconds, after those 15 seconds, the player will have 15 seconds of speed 1 remaining.
Support for obtaining these effects has been implemented:
Just as with active effects, hidden effects support being changed too! Note that modifying a hidden effect may result in it taking precedence over the active effect.
Comparisons
Support for more lenient comparisons has been implemented too:
The 'comparison' condition (as in,
x is y), can be used for exact comparisons.These comparisons are also used for removals:
Complete Visual Effect Rework
Skript's visual effect system has been in dire need of repair, with limited to no documentation and multiple errors and outdated syntaxes. We've tackled this with a full rework of visual effects, meaning likely all code using visual effects will suffer breaking changes, but it was sadly necessary to get to a better state.
Visual effects are now split into 3 different types: particle effects, game effects, and entity effects. Entity effects are generally animations that can be played on specific entities, like the
ravager attack animationeffect. Game effects compose a variety of built-in game sounds and/or particle effects, like the combined sound+particles of the composter, or the footstep sound for a specific block. Particle effects are the standard particles you all know and love from/particle. We've overhauled the system to provide easier access to data-driven particles likedust; you can nowdraw red dust particle at player!We've also added some syntax to help users better understand and use the admittedly labyrinthine particle api in the form of scale, distribution, and velocity support, rather than simply offset (though you can still set offset manually!).
Drawing a particle should look more like this, now:
Please note that users of SkBee and skript-particles and any other addon dealing with particles will likely need to wait for these addons to be updated to use Skript's particle system instead.
Named Function Arguments
Arguments for functions can now be specified by the name of the argument. This improves clarity with regard to the passed arguments for functions with many parameters.
Mixing named and unnamed function arguments is allowed, as long as the order of the function parameters is followed, as specified in the function definition.
For-Each Loop
For loops are now available by default for all users and no longer require opting into the
for loopsexperiment. As a reminder, for loops are a kind of loop syntax that stores the loop index and value in variables for convenience.This can be used to avoid confusion when nesting multiple loops inside each other.
All existing loop features are also available in this section.
Interaction Entities
Syntax has been added for working with interaction entities. There is support for responsiveness and dimensions, along with obtaining the last date an interaction was clicked and the last player to interact.
The syntax is available on our documentation site.
Recursive Expression
Expressions may now return values recursively using
recursive %objects%, or combined with thekeyed %objects%expression to return its keys recursively as well. This allows Skript to pass entire structures (i.e. lists) around different contexts, like passing a list to a function while retaining indices and sublists, freely.Note: To avoid cumbersome wording, passing a keyed expression to a function will implicitly pass it recursively as well. For example:
For more information, you can review the pull request.
(API) Registration API Stabilization
The modern addon and syntax registration APIs introduced in 2.10 have moved out of their experimental status. As a result, the APIs being replaced have been deprecated and marked for removal. Due to the significant nature of some of these APIs, they will continue to function. They will not be removed without explicit warnings long in advance.
Detailed API documentation is being finalized and will be available for the full 2.14 release. For now, the pull request overview can be reviewed for further information about the new APIs: #6246
(API) Type Properties Beta Release
In 2.13 we added a new opt-in system for dealing with common properties that are often sources of conflict with addons, like
name of x, orlength of y.We are now enabling this by default in 2.14 to test it more thoroughly. You will notice a new
use type propertiesoption in yourconfig.sk, which can be set to false if you encounter issues with type properties. We do not anticipate issues, but if you encounter them, there's an easy way out! Please make an issue report on GitHub if you do encounter problems, though.For addon developers, it should be relatively safe to develop with the type properties API now, and we are in the process of preparing detailed documentation for our site.
⚠ Breaking Changes
text opacityexpression for text displays has been modified to make it much more intuitive and easier to use. Previously, opacity was as follows:This has been changed to
The expression can still be set to values between -1 and -128, which correspond to 255 to 128 respectively, but the returned value will be positive and add/subtract will not allow opacity to leave the 0-255 range.
Changelog
Additions
player's location offset by vector(0, 1, 5) using local axes, where x becomes left/right, y is up/down, and z is forward/back.hex code of %colors%andcolor from hex code %strings%.toBase(value: number, base: number)andfromBase(value: string, base: number).Changes
loop-index.if chance of 50% fails.Bug Fixes
API Changes
JSONGenerator.@Examplesannotation to the new@Exampleannotations.appendIf()utility method toSyntaxStringBuilder.w/x/y/z of %object%via the type property WXYZ, if type properties are enabled. Reorganizes the type property handlers to avoid one massive class.ParticleEffectclass that extends Paper'sParticleBuilderclass. Addons should use this class when dealing with particles.Modifierfor default functions,Modifier.RANGED. This can be used to limit parameters to a fixed range of values, complete with parse errors if the user uses values out of the range and automatic documentation.RuntimeErrorCatcherwould not properly remove consumers from the manager.Click here to view the full list of commits made since 2.13.2
Notices
Experimental Features
Experimental features can be used to enable syntax and other behavior on a per-script basis. Some of these features are new proposals that we are testing while others may have unsafe or complex elements that regular users may not need.
While we have tested the available experiments to the best of our ability, they are they are still in development. As a result, they are subject to change and may contain bugs. Experiments should be used at your own discretion.
Additionally, example scripts demonstrating usage of the available experiments can be found here.
Click to reveal the experiments available in this release
Queue
Enable by adding
using queuesto your script.A collection that removes elements whenever they are requested.
This is useful for processing tasks or keeping track of things that need to happen only once.
Queues can be looped over like a regular list.
Script Reflection
Enable by adding
using script reflectionto your script.This feature includes:
Local Variable Type Hints
Enable by adding
using type hintsto your script.Local variable type hints enable Skript to understand what kind of values your local variables will hold at parse time. Consider the following example:
Previously, the code above would parse without issue. However, Skript now understands that when it is used,
{_a}could only be a number (and not a text). Thus, the code above would now error with a message about mismatched types.Please note that this feature is currently only supported by simple local variables. A simple local variable is one whose name does not contain any expressions:
{_var} # can use type hints {_var::%player's name%} # can't use type hintsRuntime Error Catching
Enable by adding
using error catchingto your script.A new
catch [run[ ]time] error[s]section allows you to catch and suppress runtime errors within it and access them later with[the] last caught [run[ ]time] errors.catch runtime errors: ... set worldborder center of {_border} to {_my unsafe location} ... if last caught runtime errors contains "Your location can't have a NaN value as one of its components": set worldborder center of {_border} to location(0, 0, 0)Damage Sources
Enable by adding
using damage sourcesto your script.Damage sources are a more advanced and detailed version of damage causes. Damage sources include information such as the type of damage, the location where the damage originated from, the entity that directly caused the damage, and more.
Below is an example of what damaging using custom damage sources looks like:
For more details about the syntax, visit damage source on our documentation website.
Equippable Components
Enable by adding
using equippable componentsto your script.Equippable components allows retrieving and changing the data of an item in the usage as equipment/armor.
Below is an example of creating a blank equippable component, modifying it, and applying it to an item:
Changes can be made directly on to the existing equippable component of an item whether using the item itself or the retrieved equippable component
For more details about the syntax, visit equippable component on our documentation website.
Help Us Test
We have an official Discord community for beta testing Skript's new features and releases.
Thank You
Special thanks to the contributors whose work was included in this version:
As always, if you encounter any issues or have some minor suggestions, please report them at https://github.com/SkriptLang/Skript/issues.
If you have any bigger ideas or input for the future of Skript, you can share those too at https://github.com/SkriptLang/Skript/discussions.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.