-
Notifications
You must be signed in to change notification settings - Fork 133
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
The @minecraft/vanilla-data module does not work #903
Comments
vanilla-data is not an actual module. Remove it from the manifest. You have to download it using NPM and bundle it with your behavior pack. Your scripts which depends on it will need to target the correct path. It must be located within the scripts folder of your behavior pack. |
This is an excellent response but could be even better it it explained how one bundles the |
I bundle Some like to use something such as webpack or similar. Personal preference, however I do not use any such tools so I can't give guidance on it. I handle the bundling on my own accord. https://github.com/Visual1mpact/Paradox_AntiCheat/blob/rewrite/package.json |
In my opinion, vanilla-data should be bundled with the game directly, so creators can use it without bundling it would help players a lot and lower the bar of entry for beginner programmers and creators. |
[Enter feedback here]
I am trying to throw the minecraft/vanilla-data module into the json manifest dependency, format version 2, when starting the game, it gives an error that an unknown module is dependent. Although npm i @minecraft/vanilla-data worked and I have the necessary module. Why is this happening and how do I use this module to work with vanilla items?
Here is the whole code of the manifest:
{
"format_version": 2,
"header": {
"name": "Dynamic Trees BP",
"description": "Made by New Perspectives company",
"min_engine_version": [1,21,0],
"uuid": "6c4a594d-d1f7-4577-8d17-23c19327a9e4",
"version": [1,0,0]
},
"modules": [
{
"description": "Made by New Perspectives company",
"type": "data",
"uuid": "96a695d6-5deb-44ae-8cb2-7ebb832abea2",
"version": [1,0,0]
},
{
"description": "This is script module",
"type": "script",
"language": "Javascript",
"uuid": "da00b5f6-4ca1-4457-900f-60f600314bd6",
"entry": "scripts/main.js",
"version": [1,0,0]
}
],
"dependencies": [
{
"uuid": "2f711ca7-69ed-4859-823f-572710c3b10f",
"version": [1,0,0]
},
{
"module_name": "@minecraft/server",
"version": "1.11.0"
},
{
"module_name": "@minecraft/server-ui",
"version": "1.2.0-beta"
},
{
"module_name": "@minecraft/server-gametest",
"version": "1.0.0-beta"
},
{
"module_name": "@minecraft/vanilla-data",
"version": "1.21.3"
}
]
}
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: