All of the modifications/behaviour packs i've created which use javascript files in their "scripts" folder stopped working. The message about running clientside scripts when joining a modded world still shows up but neither clientside nor serverside scripts will be executed. All of the experimental features are active in the world's settings.
Steps to Reproduce:Steps to Reproduce:
1. Create a new behavior pack
a. Create a folder within the game's "behavior_packs" folder with the name of your pack. I called it "scripttest" in this example.
b. Create the file "manifest.json" in your behavior packs root directory.
The code I used for this example:
{
"format_version": 2,
"header": {
"description": "12345",
"name": "Script Test",
"uuid": "44dd9e6d-cfaf-4e83-a7eb-a2560dd21c53",
"version": [0, 0, 1],
"min_engine_version": [1, 14, 0]
},
"modules": [
{
"description": "Gametest Module",
"type": "javascript",
"uuid": "375de6b2-4bf0-4709-b07e-210f5948c8ea",
"version": [0, 0, 1]
}
]
}
c. Create the file "index.js" in your behavior pack's sub-directory "scripts".
The code I used for this example:
import { World, Commands } from "Minecraft"
World.events.beforeChat.subscribe(msg => {
if (msg.message == `scripttest`) {
Commands.run(`say Script test successful!`)
}
})
2. Create a new world within Minecraft
a. Activate the experimental features "Holiday Creator Features", "Additional Modding Capabilities" and "Enable GameTest Framework"
b. Add the new behavior pack to the world from the "Add-Ons" section.
3. Play the world and type "scripttest" in the chat (without quotation marks)
Observed Results: No response, the chat will be displayed is it would be without modifications
Expected Results: Get a response answer from the scripting engine saying "Script test successful!" as it works on the previous release 1.17.11
Comments 6
I still couldn't get it to work neither within version 1.17.40.6 nor in 1.18.0.22 (beta). I tried changing the import statement to "mojang-minecraft" but still no difference. I read all of the current documentation but couldn't find any further changes which should affect my scripts. (thats why I wrote the demo script posted above to keep it simple for testing)
manifest.json
{
"format_version": 2,
"header": {
"description": "12345",
"name": "Script Test",
"uuid": "44dd9e6d-cfaf-4e83-a7eb-a2560dd21c53",
"version": [0, 0, 1],
"min_engine_version": [1, 14, 0]
},
"modules": [
{
"description": "Gametest Module",
"type": "javascript",
"uuid": "375de6b2-4bf0-4709-b07e-210f5948c8ea",
"version": [0, 0, 1],
"entry": "scripts/index.js" // You need a path to script file
}
],
"dependencies": [
{
// Minecraft native module - needed to use the "mojang-minecraft" module (You are using "mojang-minecraft" module, so must be required)
"uuid": "b26a4d4c-afdf-4690-88f8-931846312678",
"version": [
0,
1,
0
]
},
{
// GameTest native module - needed to use the "mojang-gametest" module (You are not using "mojang-gametest" module, so not required in this case)
"uuid": "6f4b6893-1bb6-42fd-b458-7fa3d0c89616",
"version": [
0,
1,
0
]
}
]
}
You should read more documentations. (guide: https://docs.microsoft.com/en-us/minecraft/creator/documents/gametestbuildyourfirstgametest)
Good luck.
Hi
Does this issue still occur after updating to 1.18.2?
This ticket will automatically reopen when you reply.
Cleaning up old tickets: This ticket had been set to 'Awaiting Response', but has not received a response from the reporter (~3 months+) so is being closed as Incomplete. If you feel this is still a valid issue then please comment, or create a new ticket following the Issue Guidelines which includes steps to reproduce the problem.
For any account or purchasing related issues, please contact Minecraft Customer Support directly, as we cannot assist with those here at the bug tracker.
Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki
In version 1.17.30, the Minecraft and GameTest modules have been renamed to mojang-minecraft and mojang-gametest.
You need to change "Minecraft" to "mojang-minecraft" in the import statement.
There are other changes that have been made, and may be made in the future, so it is recommended that you check the changelogs and documentation.
Changelogs: https://feedback.minecraft.net/hc/en-us/sections/360001186971-Release-Changelogs
Documentation: https://docs.microsoft.com/en-us/minecraft/creator/scriptapi/