spuz_piston

Crates.iospuz_piston
lib.rsspuz_piston
version0.1.1
sourcesrc
created_at2024-04-28 18:29:31.610989
updated_at2024-05-27 20:33:06.572986
descriptionMinecraft json documents described in Rust
homepage
repositoryhttps://github.com/coppebars/spuz.git
max_upload_size
id1223447
size164,329
Danil Karpenko (LIMPIX31)

documentation

README

spuz_piston by coppebars

Json specification of the minecraft json things, such as version manifests, version lists, jre components

Supported documents

  • Version manifest (example)

    Contains information about the game files and how else to run the game

  • Version list (example)

    Information about versions over time

  • Asset Index (example)

    Game assets files metadata

  • Java Runtimes (example)

    Java runtime components that minecraft runs on

  • Java Runtime Manifest (example)

    All files you can download to get jre for target component

Terminology

  • Manifest - json file required by the game
  • Java Component - Different versions of Minecraft require different versions of Java, this is expressed by specifying the component in the version manifest. It doesn't make sense outside of the context of Minecraft. This is an internal value that maps to the required version of jre. Usually the name of the component is: java-runtime-gamma or java-runtime-delta
  • Rule - This is a simple condition that configures the version manifest (to launch or download files) for a particular OS version to not download unnecessary files and apply OS-specific optimizations.

How to launch from any manifest

You can use spuz_piston along with spuz_spawner and spuz_wrench to configure and run the game process

Example

// Read manifest from filesystem
let manifest_str = fs::read_to_string("./1.20.6.json")?;
let manifest = Manifest::from_str(&manifest_str)?;
Commit count: 20

cargo fmt