How a-team-pjnceadc/autoemc-gtnh works
AutoEMC-GTNH is a ProjectE add-on that fills in missing EMC prices for Minecraft/GTNH items. Its main workflow scans crafting, smelting, and machine recipes; recursively selects and prices production paths while preserving existing prices; then caches and registers the results with ProjectE. Players can inspect a selected item’s price and aligned recipe tree with a command. The README documents important pricing rules and optional integrations; some implementation links below rely on that documentation because their source was not excerpted.
Main entry points: EmcRunner.java Compute and publish · RecipeCollector.java Recipe collector · EmcEngine.java Recursive evaluator · GtMachines.java GT machine scan
Components 25
Startup and API
- Server lifecycle
src/main/java/com/gtnh/autoemc/MyMod.java - Pricing config
src/main/java/com/gtnh/autoemc/emc/AutoEmcConfig.java
Recipe discovery
- Recipe source API
src/main/java/com/gtnh/autoemc/api/recipe/RecipeSource.java - Recipe collector
src/main/java/com/gtnh/autoemc/emc/RecipeCollector.java - GT machine scan
src/main/java/com/gtnh/autoemc/emc/GtMachines.java - Recipe scan API
src/main/java/com/gtnh/autoemc/api/recipe/RecipeScan.java - Recipe model
src/main/java/com/gtnh/autoemc/emc/EmcRecipe.java
EMC pricing
- Item identity
src/main/java/com/gtnh/autoemc/emc/ItemKey.java - Recursive evaluator
src/main/java/com/gtnh/autoemc/emc/EmcEngine.java - Cost arithmetic
src/main/java/com/gtnh/autoemc/emc/EmcMath.java - Fluid pricing
src/main/java/com/gtnh/autoemc/emc/FluidProducer.java - Compute and publish
src/main/java/com/gtnh/autoemc/emc/EmcRunner.java - Value and chain cache
src/main/java/com/gtnh/autoemc/emc/ValueStore.java
Price registration
- ProjectE mapper
- Expansion bridge
src/main/java/com/gtnh/autoemc/compat/ProjectExpansionCompat.java - EMC registry API
src/main/java/com/gtnh/autoemc/api/registry/EmcKey.java - Registry implementation
src/main/java/com/gtnh/autoemc/registry/EmcRegistryImpl.java - Type table bridge
src/main/java/com/gtnh/autoemc/registry/TypeTableBridge.java - Mapper mixin
src/main/java/com/gtnh/autoemc/mixins/late/EmcMapperTypeMixin.java
Recipe tree viewing
- View command
src/main/java/com/gtnh/autoemc/command/CommandProjecteAutoEmc.java - Tree chain network
src/main/java/com/gtnh/autoemc/net/ChannelAutoEmc.java - Client tree opener
src/main/java/com/gtnh/autoemc/client/RecipeTreeOpener.java
Other components
- Player
- GTNH recipes
- NEI RecipeTree
Connections 24
- Server lifecycle → Compute and publish: starts pricing
src/main/java/com/gtnh/autoemc/MyMod.java - Compute and publish → Recipe collector: collects recipes
src/main/java/com/gtnh/autoemc/emc/EmcRunner.java - Recipe collector → Recipe source API: uses sources
src/main/java/com/gtnh/autoemc/emc/RecipeCollector.java - Recipe collector → GT machine scan: scans machines
src/main/java/com/gtnh/autoemc/emc/RecipeCollector.java - GT machine scan → GTNH recipes: reads recipes
README.md - Recipe collector → Recipe scan API: iterates recipes
src/main/java/com/gtnh/autoemc/emc/RecipeCollector.java - Recipe collector → Recipe model: builds producers
src/main/java/com/gtnh/autoemc/emc/RecipeCollector.java - Compute and publish → Recursive evaluator: evaluates prices
src/main/java/com/gtnh/autoemc/emc/EmcRunner.java - Recursive evaluator → Item identity: keys items
src/main/java/com/gtnh/autoemc/emc/EmcEngine.java - Recursive evaluator → Recipe model: prices candidates
src/main/java/com/gtnh/autoemc/emc/EmcEngine.java - Recursive evaluator → Cost arithmetic: calculates costs
src/main/java/com/gtnh/autoemc/emc/EmcEngine.java - Recursive evaluator → Fluid pricing: resolves fluids
src/main/java/com/gtnh/autoemc/emc/EmcEngine.java - Compute and publish → Pricing config: reads settings
src/main/java/com/gtnh/autoemc/emc/EmcRunner.java - Compute and publish → Value and chain cache: loads and saves
src/main/java/com/gtnh/autoemc/emc/EmcRunner.java - Compute and publish → ProjectE mapper: registers prices
README.md - Compute and publish → Expansion bridge: registers optionally
src/main/java/com/gtnh/autoemc/emc/EmcRunner.java - Compute and publish → EMC registry API: uses registry
- EMC registry API → Registry implementation: delegates to
src/main/java/com/gtnh/autoemc/registry/EmcRegistryImpl.java - Registry implementation → Type table bridge: mirrors values
src/main/java/com/gtnh/autoemc/registry/EmcRegistryImpl.java - Mapper mixin → Type table bridge: notifies table
src/main/java/com/gtnh/autoemc/mixins/late/EmcMapperTypeMixin.java - Player → View command: requests view
README.md - View command → Tree chain network: sends chain
src/main/java/com/gtnh/autoemc/command/CommandProjecteAutoEmc.java - Tree chain network → Client tree opener: delivers chain
- Client tree opener → NEI RecipeTree: opens aligned tree
README.md