Show a toast when a requested crafting job is completed - #214
Merged
rubensworks merged 10 commits intoSep 4, 2026
Conversation
The crafting plan gui gains a checkbox, enabled by default, with which the player indicates that they want to be notified once the job is completed. Once IntegratedCrafting reports the job as completed, a toast with the crafted output is shown to the initiator, if they are online. The toast itself is generalized from IntegratedTerminals-Compat, so that it can be reused for the auto-craft notifications there. Closes CyclopsMC/IntegratedCrafting#175 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QNDY2pZtkXqJrhztYCvNbh
This was referenced Sep 2, 2026
Merged
CraftingHelpers#multiplyPrototypedIngredients can not infer its type variables from a wildcard list, so go through a raw list like the other callers do. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QNDY2pZtkXqJrhztYCvNbh
Make room on the crafting plan button row by narrowing the plan view toggle to 62px, which still fits its widest label, and shifting the back and craft buttons right. Also shorten the toast subtitle, as the longer phrasing wrapped onto a second line at the standard toast width. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QNDY2pZtkXqJrhztYCvNbh
The button row's background is narrower than the plan list above it, so the back and craft buttons return to their original positions, and the notify checkbox takes the space freed by the narrower view toggle. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QNDY2pZtkXqJrhztYCvNbh
IntegratedCrafting now tracks the total amount on the job itself, so the toast no longer needs its own copy of it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QNDY2pZtkXqJrhztYCvNbh
This is the first build that exposes the crafting job completion event. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QNDY2pZtkXqJrhztYCvNbh
The background now uses the deep teal that this mod's icons already use, with a menril-coloured bevel, instead of a generic dark panel. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QNDY2pZtkXqJrhztYCvNbh
rubensworks
commented
Sep 3, 2026
…on to off The toast now draws its output through the ingredient component's terminal storage handler, so crafted fluids, energy, and ingredient components from other mods are shown just like items, with their own quantity formatting. The notify option is synchronised through the container's value notifier rather than through a dedicated packet, and is disabled by default. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QNDY2pZtkXqJrhztYCvNbh
A job that is distributed over multiple crafting interfaces completes as several jobs, so their quantities are added into the toast that groups them, rather than the toast showing only the last one that finished. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QNDY2pZtkXqJrhztYCvNbh
This build keeps the initiator of crafting jobs that are distributed over multiple crafting interfaces, so those jobs can be notified about as well. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QNDY2pZtkXqJrhztYCvNbh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes CyclopsMC/IntegratedCrafting#175.
Important
Depends on CyclopsMC/IntegratedCrafting#222, which adds the
CraftingJobFinishedEventthis listens to. CI will fail until that is merged and released, andintegratedcrafting_versionis bumped ingradle.properties. Validated locally against apublishToMavenLocalbuild of that branch.What
When a crafting job that the player requested from a terminal is completed, a toast is shown with the crafted output, comparable to what RS and AE do.
Asking to be notified
The crafting plan gui gains a checkbox next to the Craft button, enabled by default. Toggling it sends
TerminalStorageCraftingPlanSetNotifyPacket, and starting the job passes the flag on to IntegratedCrafting, which persists it on the crafting job.The checkbox is unlabeled with a tooltip, because the button row only has 38px of free space between the plan view toggle and the Back button.
Jobs that are started outside of this gui, such as the auto-crafts triggered from JEI in IntegratedTerminals-Compat, go through the existing four-argument
startCraftingJob, which now defaults to notifying. That keeps them consistent with the checkbox default.Showing the toast
CraftingJobFinishedToastListener, registered from the IntegratedCrafting mod compat, listens for completed jobs and sendsCraftingJobFinishedToastPacketto the initiator when all of the following hold: the job is a root job, it carries the notify flag, and the initiator is online. Jobs that complete while the initiator is offline are not reported later.The packet carries the crafted item, so that the client renders the item name in its own language. Outputs that are not items (fluids, energy) fall back to a server-formatted label and a crafting table icon.
Toast rendering
CraftingJobToastis generalized from the one added to IntegratedTerminals-Compat in CyclopsMC/IntegratedTerminals-Compat@44c3a1c, together with its nine-slice sprite. It now takes an arbitrary grouping token instead of a fixed enum, so both mods can reuse it: this one groups by crafted item, so repeated crafts of the same thing replace each other instead of piling up. CyclopsMC/IntegratedTerminals-Compat#17 removes the duplicate there.Config
craftingJobFinishedToast(client) is a global off switch for players who never want these toasts.Tests
GameTestCraftingJobNotifychecks that starting a job through the crafting handler propagates the initiator and the notify flag, both with the checkbox on and off. The completion event itself is covered by game tests in the IntegratedCrafting PR.🤖 Generated with Claude Code
https://claude.ai/code/session_01QNDY2pZtkXqJrhztYCvNbh