Skip to content

Aliases - add support for aliases by MC keys#7492

Merged
sovdeeth merged 11 commits into
SkriptLang:dev/featurefrom
ShaneBeee:shane/aliases-by-key
Mar 19, 2025
Merged

Aliases - add support for aliases by MC keys#7492
sovdeeth merged 11 commits into
SkriptLang:dev/featurefrom
ShaneBeee:shane/aliases-by-key

Conversation

@ShaneBeee
Copy link
Copy Markdown
Contributor

@ShaneBeee ShaneBeee commented Jan 20, 2025

Description

This PR aims to add support for using Minecraft keys to get ItemTypes.
I have attempted this before and always somehow created a bug. By gosh I think I finally got it.

Many MANY people have been asking for this over the years (myself included).
A lot of users are used to Minecraft keys due to commands, datapacks, etc, and this may help them in some cases.

With the addition of the RegistryClassInfo I added that supports Minecraft names, it seems fitting to allow it for item aliases as well.

I added a regression test to make sure this doesn't break anything, including normal and script based aliases.


Target Minecraft Versions: any
Requirements: none
Related Issues: #5166

@Efnilite Efnilite added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label Jan 21, 2025
Copy link
Copy Markdown
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.

looks good

@cheeezburga cheeezburga added the feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version. label Jan 25, 2025
@sovdeeth sovdeeth requested a review from a team as a code owner March 19, 2025 20:30
@sovdeeth sovdeeth requested review from Pesekjak and Romitou March 19, 2025 20:30
@sovdeeth sovdeeth merged commit aaac9d8 into SkriptLang:dev/feature Mar 19, 2025
@ShaneBeee ShaneBeee deleted the shane/aliases-by-key branch March 19, 2025 23:53
erenkarakal pushed a commit to erenkarakal/Skript that referenced this pull request Nov 26, 2025
* Aliases - add support for aliases by MC keys

* Aliases - put that "t"
I only changed it so I could visually see where it as going

* test - replace with correct PR number

* test - use an older block
Forgot the copper trapdoor was new

* Aliases - decided against spaces
- also test to make sure no conflicts with blockdata

* test - use event-location

* test - more safety tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Feature request, an issue about something that could be improved, or a PR improving something. feature-ready A PR/issue that has been approved, tested and can be merged/closed in the next feature version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants