Skip to content

Add CraftTweaker Integration for MMDLib's Crushing Recipes - #100

Merged
dshadowwolf merged 3 commits into
master-2.0-1.21.1-neofrom
crafttweaker-crushing-integration
Nov 8, 2026
Merged

dshadowwolf merged 3 commits into
master-2.0-1.21.1-neofrom
crafttweaker-crushing-integration

Conversation

@dshadowwolf

Copy link
Copy Markdown
Collaborator

Expose the shared mmdlib:crushing recipe type through CraftTweaker's normal recipe loader so pack authors can configure recipes used by the crackhammer and other mods' crushing machines without writing recipe JSON by hand. Keep this integration in compat/CraftTweaker/crusher, separate from startup material, block, and item definitions.

Changelog:

  • Add a typed CraftTweaker manager for shared mmdlib:crushing recipes under a separate crusher integration package. Reuse standard recipe actions, removals, queries and reload handling; test script-added recipes through the crackhammer.

Provide addRecipe(name, output, input) and a native query-result type. Retain inherited JSON additions, queries, and removal operations. Reject empty inputs and outputs, multiplied inputs, and unsupported crafting transformers instead of silently discarding their semantics. Preserve output counts and components through the existing recipe implementation.

Add executable scripts and server checks for item/tag inputs, queries, removals, replacement, JSON fallback, invalid arguments, and actual crackhammer consumption. Extend isolated client smoke checks to reload recipes and confirm additions and removals persist without duplicate IDs. Keep CraftTweaker optional and document the separate companion demo recipe pool without changing its behavior.

Validation:

  • ./gradlew --offline check build passed: 190 unit tests, 89 MMDLib GameTests, 52 companion GameTests, packaging and static assets.
  • Real client with CraftTweaker passed recipe reload verification; a separate client launch without CraftTweaker passed.
  • Release JAR inspection confirmed integration classes are present and smoke classes/scripts are excluded.
  • Staged whitespace checks passed.

dshadowwolf and others added 3 commits November 7, 2026 18:13
Expose the shared mmdlib:crushing recipe type through CraftTweaker's normal
recipe loader so pack authors can configure recipes used by the crackhammer
and other mods' crushing machines without writing recipe JSON by hand.
Keep this integration in compat/CraftTweaker/crusher, separate from startup
material, block, and item definitions.

Changelog:
- Add a typed CraftTweaker manager for shared mmdlib:crushing recipes under a
  separate crusher integration package. Reuse standard recipe actions, removals,
  queries and reload handling; test script-added recipes through the crackhammer.

Provide addRecipe(name, output, input) and a native query-result type. Retain
inherited JSON additions, queries, and removal operations. Reject empty inputs
and outputs, multiplied inputs, and unsupported crafting transformers instead
of silently discarding their semantics. Preserve output counts and components
through the existing recipe implementation.

Add executable scripts and server checks for item/tag inputs, queries, removals,
replacement, JSON fallback, invalid arguments, and actual crackhammer consumption.
Extend isolated client smoke checks to reload recipes and confirm additions and
removals persist without duplicate IDs. Keep CraftTweaker optional and document
the separate companion demo recipe pool without changing its behavior.

Validation:
- ./gradlew --offline check build passed: 190 unit tests, 89 MMDLib GameTests,
  52 companion GameTests, packaging and static assets.
- Real client with CraftTweaker passed recipe reload verification; a separate
  client launch without CraftTweaker passed.
- Release JAR inspection confirmed integration classes are present and smoke
  classes/scripts are excluded.
- Staged whitespace checks passed.
redstoneGate counted NAND handler calls globally while checking that an
unread side's change does not run the handler. Game tests run at the same
time in one world, and ContentSmoke places every block item, the test
gate included; each of those gates runs its handler once when placed. If
that happened during the check, the test failed (CI run 42428485841,
while the pull_request run of the same commit passed).

Count calls per gate position, and check only the test's own gate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dshadowwolf
dshadowwolf merged commit 3457ae7 into master-2.0-1.21.1-neo Nov 8, 2026
5 checks passed
@dshadowwolf
dshadowwolf deleted the crafttweaker-crushing-integration branch November 8, 2026 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant