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

[SUGGESTION] Object From expression supports potion tags #725

Open
ChicknTurtle opened this issue Jan 15, 2025 · 6 comments
Open

[SUGGESTION] Object From expression supports potion tags #725

ChicknTurtle opened this issue Jan 15, 2025 · 6 comments
Labels
completed 👍 The issue has been fixed and will appear in the next update. enhancement 👷🏼‍♂️ New feature or request

Comments

@ChicknTurtle
Copy link

Suggestion

It would be nice if the NamespacedKey - Object From expression supported 'potion tags' as in "minecraft:strong_strength". Full list of them in the table below here https://minecraft.wiki/w/Potion#Item_data

Additional Information

Currently I can't find a way to validate these potions tags before adding them to nbt besides manually listing all of them. Also I don't think Skript has a type for these, which is probably why it hasn't been added already.

@ChicknTurtle ChicknTurtle added the needs triage This bug report/suggestion needs the team to look over label Jan 15, 2025
@ChicknTurtle
Copy link
Author

Oh, and probably also jukebox songs https://minecraft.wiki/w/Data_component_format/jukebox_playable
Just need a way to validate these after loaded from a yaml file, before adding them to nbt to avoid console errors

@ShaneBeee ShaneBeee added enhancement 👷🏼‍♂️ New feature or request and removed needs triage This bug report/suggestion needs the team to look over labels Jan 15, 2025
@Fusezion
Copy link
Collaborator

Fusezion commented Jan 15, 2025

I'm not against something like this, there is valid use for these however I'm unsure how easy this would be added with current implementation, current system relies on classinfos being registered which we could easily do as both types have a registry. So if we're fine with adding the registries this should be pretty easy only concern is potion type conflictions with skript

@ShaneBeee
Copy link
Owner

Im working on it right now ;)
(the potion types, im going to add a class info, from there you'll be able to just get all of them)
the class info will be useless for now, but one day ill find a use for it

@Fusezion
Copy link
Collaborator

one day ill find a use for it

We'll have a use for it speaking skript still has no replacement for their aliases literal so something like potion (item|representation) of %potiontype% or whatever you wanna call it

@ShaneBeee
Copy link
Owner

ShaneBeee commented Jan 15, 2025

yippee!
Screenshot 2025-01-14 at 11 26 59 PM

ShaneBeee added a commit that referenced this issue Jan 15, 2025
@ShaneBeee
Copy link
Owner

Ok, so I added the PotionType classinfo (future update), but it has a small conflict with Skript.
the pattern for the PotionEffectType classinfo:
user("potion( ?effect)? ?types?")
makes "effect" optional, therefor send all potion effects actually sends potion effect types.

I opened a PR in Skript to hopefully resolve that issue.

ShaneBeee added a commit that referenced this issue Jan 15, 2025
- instrument component
- jukebox playable component, ref #725
- added instrument/jukebox song classinfos
@ShaneBeee ShaneBeee added the completed 👍 The issue has been fixed and will appear in the next update. label Jan 15, 2025
ShaneBeee added a commit that referenced this issue Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed 👍 The issue has been fixed and will appear in the next update. enhancement 👷🏼‍♂️ New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants