Skip to content
Merged
  •  
  •  
  •  
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Changelog

## Unreleased — CraftTweaker integration

Changes on `crafttweaker-integration` since `master-2.0-1.21.1-neo`.

- Add optional CraftTweaker support for defining materials, standalone blocks and
items, and reusable block and item modules in ZenScript.
- Add the `#loader mmdlib` startup loader. Definitions run before registry events
and use MMDLib's existing validation and registration path. Changes require a
restart; ordinary CraftTweaker scripts remain the place for recipes.
- Generate blockstates, models, English names, loot tables, and tags for script
content. Supply material texture templates tinted by material color, and load
`scripts/mmdlibdata` as an override pack for custom resources.
- Expose `MaterialExtensions.registerDefinitionSource` for code-built definitions.
Definition sources can register modules before material files are decoded.
- Add the material runtime `tinted` setting so precolored textures can opt out of
material tinting.
- Keep CraftTweaker optional, with its integration isolated under
`compat/CraftTweaker` and initialized only when CraftTweaker is installed.
- Document the scripting API, generated resources, startup ordering, and current
limitations in [CraftTweaker definitions](docs/crafttweaker.md) and
[definition loading](docs/definition-loading.md).

+- Expose material repair/harvest settings, block runtime overrides, and named tool
+ stat methods to CraftTweaker. Add a typed helper for existing generic-tool factory
+ data, with script integration tests and an API/runtime capability inventory.
+ Per-tool durability scaling remains limited by vanilla TieredItem resetting the
+ computed durability to the material tier's uses; material durability works.
- Add typed item/block/tag/module ID references and independent module snapshots
for CraftTweaker. Snapshot copies rebind locally owned handlers; module tags are
now available to subsequent builders during the same script run.
- Add fluent item/block builder conveniences, generated English name overrides,
and default/self/empty/referenced loot controls. Existing external resource
overrides retain priority; shape-aware default loot remains supported.
- Add reproducible isolated client-smoke runs with CraftTweaker present and absent,
generated-content rendering captures, and a verification report for the parity work.
21 changes: 20 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ java {

repositories {
mavenCentral()
// JEI (optional integration; compile-time API only)
// JEI and CraftTweaker (optional integrations)
maven { url = 'https://maven.blamejared.com' }
maven {
url = 'https://maven.theillusivec4.top/'
Expand All @@ -39,6 +39,15 @@ repositories {
configurations {
localRuntime
runtimeClasspath.extendsFrom localRuntime
// CraftTweaker for dev runs, in its own configuration so the machine (companion) and GUI smoke
// runs can leave it out: they don't test it, and it slows their clients' world loading.
craftTweakerDevRuntime
localRuntime.extendsFrom craftTweakerDevRuntime
// CraftTweaker's processor path brings slf4j-api 1.8 betas, whose ServiceLoader lookup finds
// Gradle's own provider from another classloader and fails; 1.7.x binds statically instead.
annotationProcessor {
resolutionStrategy.force 'org.slf4j:slf4j-api:1.7.36'
}
}

dependencies {
Expand All @@ -51,6 +60,15 @@ dependencies {
if (!providers.gradleProperty('withoutJei').isPresent()) {
localRuntime "mezz.jei:jei-1.21.1-neoforge:${jei_version}"
}
// Optional CraftTweaker integration: compiled against, never bundled or required.
compileOnly "com.blamejared.crafttweaker:CraftTweaker-neoforge-1.21.1:${crafttweaker_version}"
// Validates @ZenRegister/@ZenCodeType usage at compile time; needs CraftTweaker on its path too.
annotationProcessor "com.blamejared.crafttweaker:Crafttweaker_Annotation_Processors:${crafttweaker_ap_version}"
annotationProcessor "com.blamejared.crafttweaker:CraftTweaker-neoforge-1.21.1:${crafttweaker_version}"
// Dev runs include CraftTweaker; pass -PwithoutCraftTweaker to launch without it.
if (!providers.gradleProperty('withoutCraftTweaker').isPresent()) {
craftTweakerDevRuntime "com.blamejared.crafttweaker:CraftTweaker-neoforge-1.21.1:${crafttweaker_version}"
}
}

neoForge {
Expand Down Expand Up @@ -109,6 +127,7 @@ tasks.named('processResources', ProcessResources) {
neoforge_version_range: neoforge_version_range,
loader_version_range: loader_version_range,
jei_version_range: jei_version_range,
crafttweaker_version_range: crafttweaker_version_range,
curios_version_range: curios_version_range,
mod_id: mod_id,
mod_name: mod_name,
Expand Down
Loading
Loading