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

Running these scripts on a dedicated bedrock server on linux #8

Open
jareddr opened this issue Oct 30, 2022 · 11 comments
Open

Running these scripts on a dedicated bedrock server on linux #8

jareddr opened this issue Oct 30, 2022 · 11 comments

Comments

@jareddr
Copy link

jareddr commented Oct 30, 2022

Hi,

First, thank you so much for the great resources! I'm very excited to try to build some custom minecraft experiences for my kiddo and his friends.

This isn't an issue with the repo, but I'm new to minecraft development and I'm not sure where to go to ask this type of question.

I'm trying to get the ts-starter project running but I've run into a couple problems.

First, I've modified my gulp file to tell it that I'm running a dedicated server and have set up my paths such that when I run gulp build I can see the staterbp ending up built and copied to the correct spot.

From there I cannot figure out how to get the behavior pack to get picked up by the game. I've tried having it copied to both development_behavior_packs and also behavior_packs but I'm not seeing it in either case. I connect to my dedicated server and do not see the 'Hello starter!' printed out.

I also modified the code to reset the tickIndex counter to 0 every time it gets to 100, wondering if the printout was happening before I was able to load into my server, but alas, this didn't help either.

I've tried restarting the server and reconnecting with no luck.

Are there some settings I need to configure on my server to enable the loading of development_behavior_packs?

Thanks so much!

Jared

@nullkiller
Copy link

nullkiller commented Oct 30, 2022

I also tried it on Windows with no luck as well. Did exactly the same. I think this is server problem. Here is my server output
NO LOG FILE! - setting up server logging... [2022-10-30 09:09:37:730 INFO] Starting Server [2022-10-30 09:09:37:733 INFO] Version 1.19.40.02 [2022-10-30 09:09:37:735 INFO] Session ID 696ca6f2-bf6f-4e86-befc-7f301344a797 [2022-10-30 09:09:37:759 INFO] Level Name: NK [2022-10-30 09:09:37:764 INFO] Game mode: 0 Survival [2022-10-30 09:09:37:767 INFO] Difficulty: 2 NORMAL [2022-10-30 09:09:37:072 INFO] Content logging enabled. Writing log to: ContentLog__Sunday__2022_October_30__09_09_37 [2022-10-30 09:09:37:180 INFO] Experiment(s) active: ddi_, biom, ucft, gtst, mola [2022-10-30 09:09:37:185 INFO] opening worlds/NK/db [2022-10-30 09:09:53:137 INFO] IPv4 supported, port: 19132 [2022-10-30 09:09:53:140 INFO] IPv6 supported, port: 19133 [2022-10-30 09:09:55:387 INFO] Server started. [2022-10-30 09:09:55:455 INFO] ================ TELEMETRY MESSAGE =================== [2022-10-30 09:09:55:460 INFO] Server Telemetry is currently not enabled. [2022-10-30 09:09:55:463 INFO] Enabling this telemetry helps us improve the game. [2022-10-30 09:09:55:467 INFO] [2022-10-30 09:09:55:469 INFO] To enable this feature, add the line 'emit-server-telemetry=true' [2022-10-30 09:09:55:473 INFO] to the server.properties file in the handheld/src-server directory [2022-10-30 09:09:55:478 INFO] ====================================================== [2022-10-30 09:09:55:740 INFO] Please note that LAN discovery will not function for this server. [2022-10-30 09:09:55:745 INFO] Server IP must be specified in Servers tab in game.

I am not able to find any extra logs.

Command script debugger listen 19114 also does not work
Unknown command: script. Please check that the command exists and that you have permission to use it.

@nullkiller
Copy link

Also tried to put this behavior into Android build and no reaction as well. I do not have Windows edition of minecraft bedrock unfortunately so can not follow the sample exactly and have to use BDS.

@nullkiller
Copy link

Btw I found that the world name in gulpfile for BDS is hardcoded to 'Bedrock level'. And this is not moved to any variable in configurable section. So I do not think it causes our issue, just noticed this.

@Goodstuff4UonYT
Copy link

@nullkiller @jareddr I have the exact same problem with linux. Did you find a solution?

@nullkiller
Copy link

I found an interesting project on top of mincraft BDS. https://github.com/LazuliKao/BDSLiteLoader
Was enough for me

@Kysan
Copy link

Kysan commented Mar 14, 2023

same problem for me

@KagChi
Copy link

KagChi commented Mar 23, 2023

Does this only working on beta? didnt working for me on stable.

@weagle08
Copy link

weagle08 commented Jun 23, 2023

How I run scripts on bedrock server hosted on Ubuntu Server 22.04:

  1. cd to your worlds/[my-world]
  2. create a behavior_packs directory
  3. copy your custom script behavior pack into this behavior_packs directory ex: worlds/[my-world]/behavior_packs/[my-custom-behavior-directory]
  4. create a file at the top level of your world called world_behavior_packs.json ex: worlds/[my-world]/world_behavior_packs.json
  5. add the UUID of your custom behavior pack to this json... will looks something like:
[
    {
        "pack_id": "[your-beahvior-uuid]",
        "version": [0,0,1]
    }
]
  1. restart your server, you should see your custom scripts run, any errors will print to the console

NOTE: it seems your scripts have to be in a scripts directory no matter where your manifest.json says they are

@BaksiLi
Copy link

BaksiLi commented Oct 16, 2023

I get [Scripting] Plugin [XXX - 1.0.0] - requesting dependency on module [@minecraft/server] but it is not configured to use it.

So confused.

@nox7
Copy link

nox7 commented Feb 17, 2024

I get [Scripting] Plugin [XXX - 1.0.0] - requesting dependency on module [@minecraft/server] but it is not configured to use it.

So confused.

This happens when your Bedrock server is missing the directory "SERVER_ROOT/config/default" and the "permissions.json" file (missing or it has the wrong modules allowed in it).

Re-download the Bedrock server from the Minecraft website to get the default file to allow your BP to have those modules enabled and "configured" to remove that message.

(Couldn't find this anywhere, so I am posting it here to help anyone else Googling)

@MeanChicken
Copy link

MeanChicken commented Jul 18, 2024

I solved this by correcting the UUID folder name inside the configs folder.
When you add a behavior pack, you also need to add a permission.json file.
A folder with the name as the behavior pack UUID found within the manifest.json should be added to the configs folder

Example folder hierarchy:

  • Minecraft Bedrock Server Root Folder
    • config
      • default
      • 18faee6c-c31c-42f7-9809-0e8c4cd24276 (EXAMPLE UUID)
        • permission.json (Add the missing permissions)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants