Skip to content

Conversation

@brachy84
Copy link
Member

@brachy84 brachy84 commented Nov 26, 2023

Adds packmodes which can be changed on the fly.
In a script the current pack mode can be obtained with getPackmode() (global method). isPackmode(String) is also useful.

A script file should use the pack mode preprocessor // PACKMODE: packmode_name

All possible packmode names should be configured in the runConfig.json.

You can add a translated name and description via lang files for the world creation GUI.

A packmode is bound to a world. When a player joins the packmode will be changed to that of the world. If the world is a server or a LAN world the pack mode can not be changed on the fly. The packmode of players will be changed only on client side in those cases.

Packmode can be changed with /gs packmode [packmode name] and is stored in a config file.

Examples can be found in the examples folder.

Packmode Mod compat

If that mod is loaded nothing special happens. By default they have both their own packmode. You can enabled integration in the run config. This will also disable the ability to reload packmodes on the fly. If integration is enabled, every get/set call is redirected to the packmode mod.

Todo:

  • Show packmode of a world in the select world gui. This will be difficult since you currently need the world instance.
  • Packmode mod integration. I intend to make a toggle option in the run config for the packmode mod. This will disable reloadability of packmodes.

@brachy84 brachy84 merged commit 1d9a5aa into master Nov 27, 2023
@brachy84 brachy84 deleted the packmode branch November 27, 2023 06:43
@brachy84 brachy84 added the mod compat Relating to compatability with a mod or features of a mod label Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod compat Relating to compatability with a mod or features of a mod

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants