Skip to main content

âš™ī¸ Resource Pack Workflows

Workflows run resource pack operations in order. Configure them under resource-pack.workflows in config.yml:

resource-pack:
workflows:
default: # Workflow name
trigger: reload_pack # optional; string/string list; omit for manual execution only
steps: # required; map list
- type: generate
- type: validate
- type: zip
path: ./generated/resource_pack.zip
- type: upload
pack: default
path: ./generated/resource_pack.zip
- type: send_pack
pack: default

Update the development pack while testing, then publish the production pack when ready. Replace workflows, packs, and presets with the following; keep your existing self-host settings.

resource-pack:
workflows:
development:
trigger: reload_pack
steps:
- type: generate
description: "<yellow>Development Resource Pack</yellow>"
- type: validate
- type: zip
path: ./generated/development.zip
- type: upload
pack: development
path: ./generated/development.zip
- type: send_pack
pack: development
production:
steps:
- type: generate
description: "<green>Production Resource Pack</green>"
- type: validate
- type: optimize
- type: zip
path: ./generated/production.zip
protection: true # Requires Premium
- type: upload
pack: production
path: ./generated/production.zip
- type: send_pack
pack: production
packs:
production:
type: self
default: true
development:
type: self
default: false
presets:
production: [production]
development: [development]

Run /ce reload all to load the configuration and build the development pack, then /ce workflow production to publish the production pack. Later, /ce reload all only updates the development pack; production is published manually.

Players use production by default. Testers can switch with /pack preset development and switch back with /pack preset production. Each preset requires its ce.resourcepack.preset.<name> permission.

Add the operations below to steps. Relative paths start at plugins/CraftEngine.

generate​

Generate resource pack assets from the loaded content. Each workflow can generate once.

type: generate
description: "<gray>Resource Pack</gray>" # optional; string; default: resource-pack.description
map_compatibility: false # optional; boolean; default: false; enable for map-compatible output

export​

Export the current pack to a directory on disk for external tools such as PackSquash. Place after generate; this keeps the in-memory pack available.

type: export
path: ./generated/packsquash-input # required; string; dedicated output directory, replaced on each export

packsquash​

Run an installed PackSquash executable using a TOML file. Wait for completion before running the next step; a nonzero exit code stops the workflow.

type: packsquash
executable: ./packsquash/packsquash # optional; string; default: packsquash from PATH; use packsquash.exe on Windows
config: ./packsquash/config.toml # required; string; TOML file path
timeout: 600 # optional; positive integer; seconds before terminating PackSquash

PackSquash reads a directory on disk and produces a ZIP. Use export to write the assets from generate to that directory. Paths inside TOML also start at plugins/CraftEngine:

pack_directory = './generated/packsquash-input'
output_file_path = './squashed.zip'

# PackSquash 0.4.1 expects the legacy pack_format field; the workflow validates the pack before export.
validate_pack_metadata_file = false
automatic_minecraft_quirks_detection = false
automatic_asset_types_mask_detection = false

# Preserve unrecognized overlay, mod and newer resource files.
['**/*']
force_include = true

For packs using only min_format and max_format, all three options above must be disabled: either automatic detection can still read the metadata even when validation is disabled. See the PackSquash options.

The ZIP can be uploaded directly, or loaded with load_zip and repacked with zip to apply CraftEngine resource pack protection. Repacking recompresses the files.

Complete PackSquash workflow with protection

Save the TOML above as plugins/CraftEngine/packsquash/config.toml. This example generates and validates the pack, exports it for PackSquash, then loads the optimized ZIP to apply CraftEngine protection (requires Premium), upload, and send:

resource-pack:
workflows:
squash:
steps:
- type: generate
description: "<gray>Resource Pack</gray>"
- type: validate
- type: export
path: ./generated/packsquash-input # Matches pack_directory in the TOML; dedicated directory, replaced on export
- type: packsquash
executable: ./packsquash/packsquash # Use packsquash.exe on Windows
config: ./packsquash/config.toml
- type: load_zip
path: ./squashed.zip # Matches output_file_path in the TOML
- type: zip
path: ./generated/protected.zip
protection: true # Apply CraftEngine resource pack protection
- type: upload
pack: default # An existing pack configured under resource-pack.packs
path: ./generated/protected.zip
- type: send_pack
pack: default

Run with /ce workflow squash. The uploaded file is protected.zip; sending respects players' enabled packs.

load_zip​

Load an existing ZIP as the current resource pack, replacing any previously generated or loaded pack. Preserve its pack.mcmeta, including the description and overlays.

type: load_zip
path: ./squashed.zip # required; string; existing ZIP file path

Place after packsquash, then run zip with protection: true to apply CraftEngine resource pack protection (requires Premium). The ZIP must contain a valid pack.mcmeta at its root.

validate​

Validate the current pack using the options under resource-pack.validation. Place after generate and before zip.

type: validate

optimize​

Optimize the current pack using the options under resource-pack.optimization. Place after generate and before zip.

type: optimize

Adding validate or optimize enables that stage; no stage-level enable option is needed.

zip​

Package the current assets into a ZIP. Place after generate or load_zip; another load_zip starts a new processing stage.

type: zip
path: ./generated/resource_pack.zip # required; string; output file path
protection: false # optional; boolean; default: false; protection requires Premium

upload​

Upload a ZIP to the specified pack's host. The file can come from an earlier zip step or already exist on disk.

type: upload
pack: default # required; string; ID under resource-pack.packs
path: ./generated/resource_pack.zip # required; string; existing ZIP file path

The host must support uploads. external, self_forward, and none do not. Uploading alone does not send updates.

send_pack​

Resend selected resource packs to online players currently using the specified pack.

type: send_pack
pack: default # required; string; ID under resource-pack.packs