Skip to content

2.8.0-26.1.2

Latest

Choose a tag to compare

@Ayfri Ayfri released this 21 Jul 15:58
Immutable release. Only release title and notes can be modified.
10543f8

Big one this release: Kore was JVM-only until now. kore, oop, helpers and bindings are all Kotlin Multiplatform (JVM + JS, browser and Node.js), at the same coordinates. Full writeup here: Multiplatform Support.

kotlin {
	jvm()
	js { browser(); nodejs() }
}

// works on every target
val zipBytes: ByteArray = pack.generateZipBytes()

// JVM/Node only, real filesystem
val datapack = exploreDatapackZip(zipBytes, "uploaded_pack.zip")

That's powered by new pure-Kotlin ZipReader/ZipWriter + PlatformIO (OPFS in the browser), a hand-rolled codegen model replacing KotlinPoet in bindings, and KSP-generated serializers replacing reflection everywhere. Two dependencies gone as a result: org.joml (re-ported by hand, see below) and kotlin-reflect.

A few smaller additions too:

// folderName: decouple output folder from namespace
datapack {
	folderName("generated")
}

// run: if/for directly in the block
execute {
	run {
		if (condition) say("hi")
	}
}

// selectors: parse back from text
val selector = Selector.fromString("@e[limit=1,tag=!foo]")

Plus a minimal in-house org.joml port (Matrix4f, Matrix3f, AxisAngle4f, Quaternionf, Vector3f, JomlMath) for display transforms, one less dependency, and fabricLoadConditions/ResourceCondition for condition-based Fabric resources.
Less libraries: faster and simplified Kore usage.

Documentation

  • docs(contributing): Update architecture guide with GeneratedSealedSerializer usage and KSP-based serializer factory details. b5cf883

New Features

  • feat(arguments): Add toStringWithDecimal for consistent decimal point formatting, update positional, rotational, and vector conversions. 03158e9
  • feat(bindings): Add DatapackUpload API for exploring and importing datapack ZIPs in-memory, implement cross-platform tests. 7dc0800
  • feat(bindings): Enhance parseReference to support dotted GitHub repo names, update tests to verify functionality. a3f00b4
  • feat(datapack): Introduce folderName to decouple output folder names from namespaces, add tests for folder, jar, and zip modes, and update documentation for creating datapacks. 8497d8b #246
  • feat(execute): Change run's block to Function.() -> Unit, allowing if/for control flow. abc4a5c #243
  • feat(fabric): Add ResourceCondition with fabricLoadConditions, implement condition-based JSON generation. 10543f8
  • feat(generation): Add DatapackFolderRegistry generator producing a datapack-folder-to-Argument-type map from existing generator definitions. 75bf9a9 #246
  • feat(generation): Add pure-Kotlin ZipReader, Inflate for cross-platform ZIP handling, unify unzip logic with commonUnzipToTempDir. 2cad91a
  • feat(generation): Introduce platform-agnostic I/O abstractions with PlatformIO, implement OPFS browser support, add ZipWriter for pure-Kotlin ZIP generation, and unify file operations across JVM, JS, and browser. 05e7b6a
  • feat(helpers): Add minimal port of org.joml classes including Matrix4f, Matrix3f, AxisAngle4f, Quaternionf, Vector3f, and JomlMath for display transformation math. 0265cd6
  • feat(selector-arguments): Add fromString to parse selector arguments, implement deserialization logic, enhance test cases, and support advanced selector parsing. 6feb45f

Bug Fixes

  • fix(datapack): Set pack_format to integer only and fix default value. b613e04 #245
  • fix(helpers): Rewrite fromAxisAngle to use trigonometric calculations with sin and cos, replacing Quaternionf instantiation, and adjust imports in Quaternion. c25bcdf

Full changelog: https://github.com/Ayfri/Kore/compare/v2.7.0-26.1.2..v2.8.0-26.1.2