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

Disable extension in folders where manifest.json is found for bedrock edition #1110

Open
tryashtar opened this issue Apr 12, 2024 · 9 comments
Labels
✨ feature New feature or request /java-edition
Milestone

Comments

@tryashtar
Copy link

Just opening a bedrock mcfunction file gives a bunch of errors
image

@Kesuaheli
Copy link

Kesuaheli commented Apr 12, 2024

Yeah, because it's only made for Java Edition data packs. Most of the commands in Bedrock Edition behaviour packs have a completely different syntax.

As far as I know, it is not planned at all to support Bedrock behaviour packs. It's not even thought about to be planned in the future.

Microsoft themselves have recommended these two extensions for VSCode when making Bedrock Add-Ons:

But these two, however, collide with Java Edition data packs and give you a bunch of errors because they aren't made for Java Edition.*
If you are developing both Java Edition data packs and Bedrock Edition behaviour packs, you have to disable the other extension(s) in VSCode while not using it. If you navigate to your extensions tab and select the extension you want to disable, there's an option for uninstalling the extension entirely, an option for disabling globally and for disabling for this workspace.

*I do, too, use all three of these extensions. I found that the Bedrock ones give you errors not only in Java Edition data packs but in every other JSON file because it thinks you're trying to define something for a Bedrock Add-Ons.
I therefore have to recommend that you disable the Bedrock ones globally and only enable them when developing Bedrock Add-Ons.

@tryashtar
Copy link
Author

I know, I made an issue there too :) Blockception/VSCode-Bedrock-Development-Extension#564

@Kesuaheli
Copy link

Oh, so this issue addresses the fact that it should recognise Bedrock behaviour pack .mcfunction and not be enabled for these files?

@tryashtar
Copy link
Author

Yeah, it would be very cool if this extension checked for pack.mcmeta and that one looked for manifest.json

@misode
Copy link
Member

misode commented Apr 12, 2024

Would it not be possible to disable the extension in your workspace whenever you're working with Bedrock functions? Explicitly requiring a pack.mcmeta seems like a downgrade, because I would still want lone mcfunction files to receive language support. Maybe we could check for a manifest.json file and disable the language features yourselves?

@Kesuaheli
Copy link

I would still want lone mcfunction files to receive language support.

I fully agree with that. Otherwise it would be a pretty big downgrade.
I too thought about checking if this file is inside a bedrock environment. Thats what I meant by "it should recognise Bedrock behaviour packs". I think checking for the manifest.json on the same level as the functions/ folder would be the best approach.

A super solution whould be to check if the lines, that causes the errors, are valid with bedrock syntax. And then automatically disable highlighting. I know its a whole nother level. At this point Spyglass can almost think about supporting Bedrock Add-Ons.

@tryashtar
Copy link
Author

That's fair, I'd want lonely function files to work too, although without a pack file it's impossible to know not only which edition it's for, but which version, so that might be annoying

@MulverineX
Copy link
Member

MulverineX commented Apr 18, 2024

In IMP Doc v2 (or whatever it ends up being called) we could have a header comment that explicitly declares the function's game version. @vdvman1 @RitikShah

Default behavior here shouldn't change at all though unless its a workspace with a bedrock manifest.json. Maybe also have an editor command (ctrl+shift+p) to disable the extension within the current file.

Also, we're not ruling out Bedrock support in this extension, its just not something we're going to be spending time on for a while.

@SPGoding SPGoding added ✨ feature New feature or request /java-edition labels May 14, 2024
@misode misode changed the title It doesn't like my bedrock functions Disable extension in folders where manifest.json is found for bedrock edition May 17, 2024
@misode misode added this to the Release 4.1.0 milestone May 17, 2024
@misode misode modified the milestones: Release 4.1.0, Backlog Jul 1, 2024
@misode
Copy link
Member

misode commented Jul 1, 2024

Moved this to the backlog because this is less urgent now. You can manually specify this folder in env.exclude

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature New feature or request /java-edition
Projects
None yet
Development

No branches or pull requests

5 participants