You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SkriptLang is in the process of sunsetting and removing aliases from the Skript. I'm sure many of you don't know what aliases are or how this affects you, so this post will serve as a explanation of what aliases are, why we're removing them, and what you need to do to keep your scripts running smoothly.
1. What's An Alias And Why Are They Going Away?
Alias is a term used in a few places in Skript, but the usage we're concerned with today relates to items. Every time you reference an item (diamond sword, 1 grass block), you're using an 'alias' of the item's name. These were introduced to make referencing items way easier back in the pre-flattening days (<1.13), since the alternative is using the item's id, like item 63. However, now that Minecraft uses descriptive item ids, most aliases have become superfluous and more of a drain on development time than a benefit. For a while now, we've been using auto-generated aliases to support new blocks and items in the game, but some issues still pop up pretty consistently.
For one, categories. Aliases are pretty powerful and support blockdata, custom nbt, and the ability to group other aliases into a category alias (think any boat, or any ore). However, these have to be updated manually, every single time Minecraft changes them. I'm sure you've all encountered times whether this new wood sign wasn't in any signs, or this boat, or what have you. This maintenance just isn't really feasible for us.
Secondly, aliases have got a bit out of hand. Most users will have aliases take between 8 and 14 seconds to load during startup, which is a significant amount of time. This is mainly due to the combinatorial nature of blockdata tags, especially stairs. Did you know there's about 50 thousand different aliases for stairs alone? That's about a fifth of all aliases.
And finally, we just have better options now. For a while, Skript has natively supported blockdata (oak_stairs[waterlogged=true]) and as such, we don't need all those blockdata aliases anymore. Likewise, with the recent addition of the Minecraft tag system and custom tags in 2.10, the category aliases are also superfluous now (any sword -> tag "minecraft:swords"). Both tags and blockdata will naturally stay updated with any changes Minecraft makes and give Skript users more control and stability than aliases did.
We still need aliases for some things, namely items that require components like potions, goat horns, and similar. However, our goal is to provide support for components that's as capable as tags and blockdata, allowing us to completely phase out aliases in 2.11.
2. What's Changing And What Should I Do?
In 2.9, we introduced a feature that allows users to provide their own aliases via the aliases folder and to disable the existing aliases that Skript normally loads. That was in preparation for 2.10.
Now, in 2.10, we plan on removing the majority of aliases from what Skript generates by default. This means, if you change nothing but your Skript jar file, your scripts may break. Any usage of category aliases (any log, is a sword, etc.) or blockdata aliases (waterlogged oak slab, eastward spruce stairs) will no longer work. Aliases for component-based items like potions and goat horns will remain. At this point, you have two options:
a. Keep your current scripts and add the aliases back.
We will still provide the aliases in the form of a zip file with every release. You can download this, unzip it, and put it in your aliases folder (plugins/Skript/aliases). This will be supported until 2.11 at least, probably until 2.12. Do note that we will not be providing updates to these aliases for new Minecraft content!
b. Modify your current scripts to use tags and blockdata instead.
This is slightly more involved but will be much more stable for you going forwards. We highly suggest this option. A good replacement for category aliases in comparisons is the is tagged condition:
if player's tool is a sword:
->
if player's tool is tagged as item tag "swords":
This does make events more awkward, but we're investigating better ways to fix this:
on right click with any pickaxe:
->
on right click:
player's tool is tagged as tag "pickaxes"
For those of you who made use of custom aliases, this feature is also not going away until 2.11 at the earliest. We suggest you switch to custom tags for categories, however.
aliases:
my favorite blocks = minecraft:oak_log, minecraft:stone, minecraft:podzol
->
on load:
register an item tag named "my_favorite_blocks" using oak log, stone, and podzol
Questions and Concerns
If you have additional questions, please ask them here or on our discord. Do make sure to check whether your question has already been answered, though. Any concerns or suggestions can also be brought up in the same locations.
aliasesFor mistakes or requested additions in the aliases themselves, not the code driving the aliases.
1 participant
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
SkriptLang is in the process of sunsetting and removing aliases from the Skript. I'm sure many of you don't know what aliases are or how this affects you, so this post will serve as a explanation of what aliases are, why we're removing them, and what you need to do to keep your scripts running smoothly.
1. What's An Alias And Why Are They Going Away?
Alias is a term used in a few places in Skript, but the usage we're concerned with today relates to items. Every time you reference an item (
diamond sword
,1 grass block
), you're using an 'alias' of the item's name. These were introduced to make referencing items way easier back in the pre-flattening days (<1.13), since the alternative is using the item's id, likeitem 63
. However, now that Minecraft uses descriptive item ids, most aliases have become superfluous and more of a drain on development time than a benefit. For a while now, we've been using auto-generated aliases to support new blocks and items in the game, but some issues still pop up pretty consistently.For one, categories. Aliases are pretty powerful and support blockdata, custom nbt, and the ability to group other aliases into a category alias (think
any boat
, orany ore
). However, these have to be updated manually, every single time Minecraft changes them. I'm sure you've all encountered times whether this new wood sign wasn't inany signs
, or this boat, or what have you. This maintenance just isn't really feasible for us.Secondly, aliases have got a bit out of hand. Most users will have aliases take between 8 and 14 seconds to load during startup, which is a significant amount of time. This is mainly due to the combinatorial nature of blockdata tags, especially stairs. Did you know there's about 50 thousand different aliases for stairs alone? That's about a fifth of all aliases.
And finally, we just have better options now. For a while, Skript has natively supported blockdata (
oak_stairs[waterlogged=true]
) and as such, we don't need all those blockdata aliases anymore. Likewise, with the recent addition of the Minecraft tag system and custom tags in 2.10, the category aliases are also superfluous now (any sword
->tag "minecraft:swords"
). Both tags and blockdata will naturally stay updated with any changes Minecraft makes and give Skript users more control and stability than aliases did.We still need aliases for some things, namely items that require components like potions, goat horns, and similar. However, our goal is to provide support for components that's as capable as tags and blockdata, allowing us to completely phase out aliases in 2.11.
2. What's Changing And What Should I Do?
In 2.9, we introduced a feature that allows users to provide their own aliases via the aliases folder and to disable the existing aliases that Skript normally loads. That was in preparation for 2.10.
Now, in 2.10, we plan on removing the majority of aliases from what Skript generates by default. This means, if you change nothing but your Skript jar file, your scripts may break. Any usage of category aliases (
any log
,is a sword
, etc.) or blockdata aliases (waterlogged oak slab
,eastward spruce stairs
) will no longer work. Aliases for component-based items like potions and goat horns will remain. At this point, you have two options:a. Keep your current scripts and add the aliases back.
We will still provide the aliases in the form of a zip file with every release. You can download this, unzip it, and put it in your aliases folder (
plugins/Skript/aliases
). This will be supported until 2.11 at least, probably until 2.12. Do note that we will not be providing updates to these aliases for new Minecraft content!b. Modify your current scripts to use tags and blockdata instead.
This is slightly more involved but will be much more stable for you going forwards. We highly suggest this option. A good replacement for category aliases in comparisons is the
is tagged
condition:This does make events more awkward, but we're investigating better ways to fix this:
For those of you who made use of custom aliases, this feature is also not going away until 2.11 at the earliest. We suggest you switch to custom tags for categories, however.
Questions and Concerns
If you have additional questions, please ask them here or on our discord. Do make sure to check whether your question has already been answered, though. Any concerns or suggestions can also be brought up in the same locations.
Beta Was this translation helpful? Give feedback.
All reactions