Implement client behaviour packs#1879
Open
DasEtwas wants to merge 9 commits intoCloudburstMC:masterfrom
Open
Conversation
Update Sound enum and ParticleEffect enum to 1.17.0 (CloudburstMC#1861)
* Duplicate loading logic for behaviour packs from new folder "client_behaviour_packs" * Add pack type detection using its modules' types * Add scripting = true if a behaviour pack contains .js files
Author
|
Please excuse @belohnung 's commits, they don't seem to affect my diff. |
DasEtwas
added a commit
to DasEtwas/Languages
that referenced
this pull request
Aug 4, 2021
Adds language keys used by CloudburstMC/Nukkit#1879
Member
|
Do you have an example behavior pack this can be tested with? Also maybe it could be a good idea to bump the API version. |
Author
|
Not one to post here. |
|
Behaviour packs is applies by client? I can create behaviour pack with changed stack size of, e.x. golden apple and it can be work? |
This only supports client features and doesn't affect server logic. |
|
Is this still maintained or going to be tested? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
client_behavior_packsin the data folder.resource_packsas before, and Behavior Packs belong inclient_behavior_packsmetadata.json:modules[n].typescriptingflag in the resource data info packet, the server now reads the zip's entry list and sets this flag totrueis a file ending with.jswas foundMotivation
ScriptCustomEventPacketetc. to trigger client-side JavaScript (on Win10, where scripts are supported).Testing
This PR was tested to work in the following cases (meaning players could join and download and display the packs):
(tested on android and win)
furthermore:
Problems
New language keys
Further ideas
It may make sense to check if a client supports scripting, and if not, set
scriptingto false in the resource info packet.