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

Support Minecraft tags in Aliases/Structure. #7498

Open
1 task done
ShaneBeee opened this issue Jan 21, 2025 · 9 comments
Open
1 task done

Support Minecraft tags in Aliases/Structure. #7498

ShaneBeee opened this issue Jan 21, 2025 · 9 comments
Labels
enhancement Feature request, an issue about something that could be improved, or a PR improving something. up for debate When the decision is yet to be debated on the issue in question

Comments

@ShaneBeee
Copy link
Contributor

Suggestion

I wanted to suggest the addition of using Minecraft tags in aliases.
I'm not 100% sure how this would work, but maybe something along the lines of:

aliases:
	[any] sword[s] = #minecraft:swords
	[any] tool[s] = #minecraft:axes, #minecraft:pickaxes, #minecraft:shovels, #minecraft:hoes
	[any] terracotta[s]: #paper:terracotta

on break of any terracotta:
    give player every sword

Why?

With the removal of the majority of aliases (YAY), and the addition of tags, I think this could really help Skripters when having to deal with groups of items/blocks.

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this suggestion.
@sovdeeth
Copy link
Member

I have some concerns with trying to parse these successfully without interpreting them as comments (since comments are determined long before any knowledge of structures or context exists)
My other concern is that we'd be putting more effort into a system we intend to replace in the near future.
I think instead a better approach would be to provide an any item tagged [as] "xyz" literal that returns an itemtype

@sovdeeth sovdeeth added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label Jan 21, 2025
@ShaneBeee
Copy link
Contributor Author

I have some concerns with trying to parse these successfully without interpreting them as comments (since comments are determined long before any knowledge of structures or context exists)

Since # is allowed in Strings now (without doubling them up), I'm thinking it can't be that hard? (Honestly no clue how that was done, just spit ballin)

My other concern is that we'd be putting more effort into a system we intend to replace in the near future.

Ah yeah, that is very fair!

@sovdeeth
Copy link
Member

The string thing was done with a state machine that kept track of whether the current state was code (default, or toggled with % when in strings/vars), a string (toggled by reaching a " mark), or a variable (toggled with {} from the code state). That kind of logic would be very tricky to apply here, since you'd basically have to hard-code the concept of the alias structure into the node parser, which i think is a bad idea.

@sovdeeth sovdeeth added the up for debate When the decision is yet to be debated on the issue in question label Jan 21, 2025
@ShaneBeee
Copy link
Contributor Author

Ahhh gotcha.
Well dang.

@Pikachu920
Copy link
Member

haven't really thought enough about it to have any idea whether it should be added, but couldn't we check for the x:y format? i don't think any of our aliases use a colon

@sovdeeth
Copy link
Member

haven't really thought enough about it to have any idea whether it should be added, but couldn't we check for the x:y format? i don't think any of our aliases use a colon

aliases allow minecraft:oak_log, as an item reference, so we'd need something at least to clarify that it's a tag.

@ShaneBeee
Copy link
Contributor Author

MAYBE gross, but:
item_tag:minecraft:some_tag
block_tag:minecraft:some_tag

@Pikachu920
Copy link
Member

haven't really thought enough about it to have any idea whether it should be added, but couldn't we check for the x:y format? i don't think any of our aliases use a colon

aliases allow minecraft:oak_log, as an item reference, so we'd need something at least to clarify that it's a tag.

maybe I misunderstand the feature, but what if we check item reference then minecraft tag? I don't think they would ever conflict

@sovdeeth
Copy link
Member

haven't really thought enough about it to have any idea whether it should be added, but couldn't we check for the x:y format? i don't think any of our aliases use a colon

aliases allow minecraft:oak_log, as an item reference, so we'd need something at least to clarify that it's a tag.

maybe I misunderstand the feature, but what if we check item reference then minecraft tag? I don't think they would ever conflict

Perhaps, but there's also nothing stopping them from conflicting either. I suppose if it's simple to add that's a fine addition since it's not something we really care about much

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. up for debate When the decision is yet to be debated on the issue in question
Projects
None yet
Development

No branches or pull requests

3 participants