# george8188625/create-diesel-generators architecture

> Architecture diagram of the GitHub repository george8188625/create-diesel-generators, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-05-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/george8188625/create-diesel-generators
- Repository: https://github.com/george8188625/create-diesel-generators

## Overview

1. **Project shape**
This is a Minecraft Forge mod, `create-diesel-generators`, built as an extension to the Create mod. The architecture is split between Java source in `src/main/java`, hand-authored runtime resources in `src/main/resources`, and generated assets/data in `src/generated/resources`.

2. **Mod entry and bootstrap**
`CreateDieselGenerators` is the main mod entry point. Startup is organized through a small set of central bootstrap classes: `CDGRegistries`, `CDGBlocks`, `CDGItems`, `CDGFluids`, `CDGBlockEntityTypes`, `CDGMenuTypes`, `CDGRecipes`, `CDGSoundEvents`, `CDGTags`, `CDGCreativeTab`, and related registries. These act as the wiring layer between the mod lifecycle and the content packages.

3. **Core content domains**
The codebase is organized by gameplay feature under `content/`. Major domains are:
- oil extraction: pumpjack, oil chunks, oil barrel
- fuel processing: distillation, fermentation, biodiesel/ethanol/gasoline
- power generation: diesel engines in normal, modular, huge variants
- utility blocks/tools: burner, canister, lighter, hammer, wire cutters, oil scanner, chemical sprayer, entity filter
- construction blocks: asphalt, chip wood, sheet metal, concrete-encased pipes, andesite girder
Each domain typically owns its block, block entity, renderer, item, recipe, and behavior classes.

4. **Block/entity/renderer pattern**
Most interactive blocks follow the same three-layer model: a block class for world interaction, a block entity for stateful logic/storage, and a renderer for visuals. Examples include `DieselEngineBlock`/`DieselEngineBlockEntity`/`DieselEngineRenderer`, `DistillationTankBlock`/`DistillationTankBlockEntity`/`DistillationTankRenderer`, and `PumpjackBearingBlock`/`PumpjackBearingBlockEntity`/`PumpjackCrankRenderer`. This is the main runtime boundary between gameplay logic and presentation.

5. **Machine and fluid processing pipeline**
The primary gameplay flow is oil and fuel processing:
- oil is discovered/extracted via oil chunk data and pumpjack machinery
- crude oil is stored/transferred through barrels and tanks
- distillation and fermentation convert inputs into fuels and intermediates
- final fuels are exposed through Forge fluid tags and `fuel_type` definitions
This means the mod’s data flow is mostly item/fluid transformation through block entities and custom recipes, not a general-purpose automation framework.

6. **Create integration as the main dependency boundary**
The mod leans heavily on Create concepts: contraption movement, kinetic shafts, ponder scenes, custom recipes, and mechanical crafting. Classes like `DieselEngineMovementBehaviour`, `PumpjackHeadMovementBehaviour`, and `PumpjackBearingBMovementBehaviour` show that some blocks can move as contraptions or participate in Create’s moving machinery model. There are also Create-specific behaviors such as `CTBehavior` classes and custom partial models/sprite shifts.

7. **Recipe and data-driven gameplay**
A large portion of behavior is data-driven under `src/main/resources/data/createdieselgenerators`. This includes crafting, mixing, distillation, fermentation, crushing, cutting, hammering, wire cutting, mechanical crafting, and compat recipes. The generated resources in `src/generated/resources` mirror blockstates, loot tables, models, and tags, indicating the mod relies on datagen rather than hand-maintaining all JSON assets.

8. **Compatibility subsystem**
Compat is isolated under `compat/` and behaves like a set of optional adapters:
- `jei` provides recipe categories and animated UI entries for JEI
- `computercraft` exposes peripherals/behaviors for programmable control
- `kubejs` exposes script hooks like fuel types, molds, lighter skins, and chunk oil amounts
- `EveryCompatCompat` bridges with EveryCompat
This layer is intentionally separate from core gameplay so the mod can degrade gracefully when integrations are absent.

9. **Client/UI-specific code**
Client-facing logic is split into renderers, model helpers, and screen/menu classes. Examples include `EntityFilterScreen`, `EntityFilterMenu`, multiple item/block renderers, `CDGPartialModels`, and `CDGSpriteShifts`. The repo also contains many custom model JSONs for animated machinery, suggesting the visual system is heavily asset-driven with code mainly selecting states and animation variants.

10. **Ponder documentation content**
`ponder/` contains scripted showcase scenes used by Create’s in-game tutorial system. These are backed by `.nbt` scene assets in resources. This is a separate “documentation/runtime demo” subsystem: it does not drive gameplay logic, but it explains machine setup and flow in-game.

11. **World state and generation**
The mod persists oil chunk information in `world/OilChunksSavedData.java` and supplies worldgen tags for oil-biome selection and oil deposits. There is also a structure file for oil chunks. This indicates a small persistent world-state layer supporting oil resource discovery rather than broad terrain generation.

12. **Networking and command/event hooks**
`packets/` contains mod networking for client-server synchronization, such as entity filter screen updates. `commands/` adds admin/debug commands. `events/` holds Forge lifecycle hooks that connect registration, config, and runtime behaviors. These are the glue layers for syncing state and reacting to game events.

13. **Mixins as targeted engine patches**
`mixins/` and `mixin_interfaces/` are used for surgical modification of Minecraft/Create behavior where extension points are not enough. The presence of accessors, invokers, and mixins for contraptions, loot tables, creepers, render models, and shaft behavior shows the mod modifies base mechanics at the framework boundary rather than reimplementing them.

14. **Assets and generated outputs**
The repository contains extensive textures, models, blockstates, language files, sounds, and tags. The generated tree under `src/generated/resources` is effectively the output of the mod’s datagen pipeline, while `src/main/resources` contains the curated runtime assets and pack metadata. This separation is important for diagramming: Java code defines behavior, resources define content, and generated assets fill in the bulk of the registration surface.

15. **Overall architectural shape**
At a high level, this is a content-heavy mod built around a small set of industrial systems: oil extraction, refining, fuel consumption, and Create-style mechanical integration. The architecture is modular by feature, with each feature owning its own block/entity/recipe/rendering stack, while compatibility, networking, ponder, and datagen are isolated cross-cutting subsystems.

Main entry points: [`src/main/java/com/jesz/createdieselgenerators/content`](https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/java/com/jesz/createdieselgenerators/content) (Content packs), [`src/main/java/com/jesz/createdieselgenerators`](https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/java/com/jesz/createdieselgenerators) (Hooks), [`src/main/resources`](https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/resources) (Main assets), [`src/main/java/com/jesz/createdieselgenerators/compat`](https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/java/com/jesz/createdieselgenerators/compat) (Compat layer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_java["Java code"]
  node_mod_entry["Main mod<br/>entry/bootstrap"]
  node_registries["Registries<br/>content wiring<br/>[CDGRegistries.java]"]
  node_core_content["Content packs<br/>gameplay subsystems"]
  node_pumpjack["Pumpjack<br/>oil extraction"]
  node_distillation["Distillation<br/>fuel processing"]
  node_fermenting["Fermenting<br/>fuel processing"]
  node_engines["Diesel engines<br/>power generation"]
  node_fluid_storage["Fluid storage<br/>storage/transfer"]
  node_tools["Tools<br/>utility items"]
  node_construction["Construction<br/>building blocks"]
  node_compat["Compat layer<br/>optional adapters"]
  node_ponder["Ponder<br/>tutorial scenes"]
  node_runtime_hooks["Hooks<br/>runtime glue"]
  node_world_state["World data<br/>persistent state"]
  node_datagen["Datagen<br/>generated content<br/>[CDGDatagen.java]"]
end

subgraph group_resources["Resources"]
  node_main_resources["Main assets<br/>runtime resources"]
  node_generated_resources["Generated assets<br/>datagen output"]
end

node_mod_entry -->|"bootstraps"| node_registries
node_registries -->|"registers"| node_core_content
node_core_content -->|"includes"| node_pumpjack
node_core_content -->|"includes"| node_distillation
node_core_content -->|"includes"| node_fermenting
node_core_content -->|"includes"| node_engines
node_core_content -->|"includes"| node_fluid_storage
node_core_content -->|"includes"| node_tools
node_core_content -->|"includes"| node_construction
node_core_content -->|"documents"| node_ponder
node_core_content -->|"adapts"| node_compat
node_core_content -->|"persists"| node_world_state
node_core_content -->|"depends on"| node_runtime_hooks
node_core_content -->|"drives"| node_datagen
node_datagen -->|"writes"| node_generated_resources
node_main_resources -->|"describes"| node_core_content
node_main_resources -->|"stores scenes"| node_ponder
node_compat -->|"ships assets"| node_main_resources
node_runtime_hooks -->|"supports"| node_pumpjack
node_runtime_hooks -->|"supports"| node_engines
node_runtime_hooks -->|"gates"| node_compat

click node_mod_entry "https://github.com/george8188625/create-diesel-generators/blob/1.20.1/src/main/java/com/jesz/createdieselgenerators/CreateDieselGenerators.java"
click node_registries "https://github.com/george8188625/create-diesel-generators/blob/1.20.1/src/main/java/com/jesz/createdieselgenerators/CDGRegistries.java"
click node_core_content "https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/java/com/jesz/createdieselgenerators/content"
click node_pumpjack "https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/java/com/jesz/createdieselgenerators/content/pumpjack"
click node_distillation "https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/java/com/jesz/createdieselgenerators/content/distillation"
click node_fermenting "https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/java/com/jesz/createdieselgenerators/content/bulk_fermenter"
click node_engines "https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/java/com/jesz/createdieselgenerators/content/diesel_engine"
click node_fluid_storage "https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/java/com/jesz/createdieselgenerators/content/oil_barrel"
click node_tools "https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/java/com/jesz/createdieselgenerators/content/tools"
click node_construction "https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/java/com/jesz/createdieselgenerators/content"
click node_compat "https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/java/com/jesz/createdieselgenerators/compat"
click node_ponder "https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/java/com/jesz/createdieselgenerators/ponder"
click node_runtime_hooks "https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/java/com/jesz/createdieselgenerators"
click node_world_state "https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/java/com/jesz/createdieselgenerators/world"
click node_datagen "https://github.com/george8188625/create-diesel-generators/blob/1.20.1/src/main/java/com/jesz/createdieselgenerators/datagen/CDGDatagen.java"
click node_main_resources "https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/resources"
click node_generated_resources "https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/generated/resources"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mod_entry,node_registries,node_core_content,node_pumpjack,node_distillation,node_fermenting,node_engines,node_fluid_storage,node_tools,node_construction,node_compat,node_ponder,node_runtime_hooks,node_world_state,node_datagen toneBlue
class node_main_resources,node_generated_resources toneAmber
```

## Components

### Java code

Main mod code, runtime systems, content, integrations, and hooks.

- [Main mod](https://github.com/george8188625/create-diesel-generators/blob/1.20.1/src/main/java/com/jesz/createdieselgenerators/CreateDieselGenerators.java): entry/bootstrap · Forge mod entrypoint and lifecycle bootstrap. · `src/main/java/com/jesz/createdieselgenerators/CreateDieselGenerators.java`
- [Registries](https://github.com/george8188625/create-diesel-generators/blob/1.20.1/src/main/java/com/jesz/createdieselgenerators/CDGRegistries.java): content wiring · Central registration layer for blocks, items, fluids, entities, menus, recipes, sounds, tags, and creative tab. · `src/main/java/com/jesz/createdieselgenerators/CDGRegistries.java`
- [Content packs](https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/java/com/jesz/createdieselgenerators/content): gameplay subsystems · Feature-owned blocks, items, block entities, renderers, and behaviors for machines, tools, and construction blocks. · `src/main/java/com/jesz/createdieselgenerators/content`
- [Pumpjack](https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/java/com/jesz/createdieselgenerators/content/pumpjack): oil extraction · Oil discovery and extraction machinery, including bearing, crank, head, hole, and world oil amount display. · `src/main/java/com/jesz/createdieselgenerators/content/pumpjack`
- [Distillation](https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/java/com/jesz/createdieselgenerators/content/distillation): fuel processing · Crude-oil refining tower, controller, recipes, and visual/model support. · `src/main/java/com/jesz/createdieselgenerators/content/distillation`
- [Fermenting](https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/java/com/jesz/createdieselgenerators/content/bulk_fermenter): fuel processing · Basin and bulk fermentation machines plus recipes and Create transfer behaviors. · `src/main/java/com/jesz/createdieselgenerators/content/bulk_fermenter`
- [Diesel engines](https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/java/com/jesz/createdieselgenerators/content/diesel_engine): power generation · Normal, modular, and huge engine variants plus upgrades, sounds, and movement behavior. · `src/main/java/com/jesz/createdieselgenerators/content/diesel_engine`
- [Fluid storage](https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/java/com/jesz/createdieselgenerators/content/oil_barrel): storage/transfer · Oil barrel, canister, concrete-encased pipes, and fluid-coupling blocks for moving liquids. · `src/main/java/com/jesz/createdieselgenerators/content/oil_barrel`
- [Tools](https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/java/com/jesz/createdieselgenerators/content/tools): utility items · Fueled and specialized items such as lighter, hammer, wire cutters, oil scanner, and chemical sprayer. · `src/main/java/com/jesz/createdieselgenerators/content/tools`
- [Construction](https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/java/com/jesz/createdieselgenerators/content): building blocks · Asphalt, chip wood, sheet metal, and girder building materials that extend the industrial palette. · `src/main/java/com/jesz/createdieselgenerators/content`
- [Compat layer](https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/java/com/jesz/createdieselgenerators/compat): optional adapters · Integration modules for JEI, ComputerCraft, KubeJS, and EveryCompat. · `src/main/java/com/jesz/createdieselgenerators/compat`
- [Ponder](https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/java/com/jesz/createdieselgenerators/ponder): tutorial scenes · Create tutorial scenes and showcase scripts for the main machines and flows. · `src/main/java/com/jesz/createdieselgenerators/ponder`
- [Hooks](https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/java/com/jesz/createdieselgenerators): runtime glue · Commands, Forge events, networking, and targeted mixins that bridge mod systems with game/runtime behavior. · `src/main/java/com/jesz/createdieselgenerators`
- [World data](https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/java/com/jesz/createdieselgenerators/world): persistent state · Saved oil chunk data and resource-selection world state for oil deposits. · `src/main/java/com/jesz/createdieselgenerators/world`
- [Datagen](https://github.com/george8188625/create-diesel-generators/blob/1.20.1/src/main/java/com/jesz/createdieselgenerators/datagen/CDGDatagen.java): generated content · Data generation entrypoint for models, blockstates, loot, recipes, and tags. · `src/main/java/com/jesz/createdieselgenerators/datagen/CDGDatagen.java`

### Resources

Hand-authored and generated assets, recipes, tags, and documentation content.

- [Main assets](https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/main/resources): runtime resources · Curated runtime JSON, textures, sounds, tutorials, and data-driven recipes/tags. · `src/main/resources`
- [Generated assets](https://github.com/george8188625/create-diesel-generators/tree/1.20.1/src/generated/resources): datagen output · Generated blockstates, models, loot tables, language files, and tags. · `src/generated/resources`

## Connections

- Main mod → Registries: bootstraps · Main mod initialization delegates to the registration layer.
- Registries → Content packs: registers · Central registries expose the content subsystems to Forge/Create.
- Content packs → Pumpjack: includes · Oil extraction feature package.
- Content packs → Distillation: includes · Refining feature package.
- Content packs → Fermenting: includes · Fermentation feature package.
- Content packs → Diesel engines: includes · Engine power-generation package.
- Content packs → Fluid storage: includes · Liquid handling and storage package.
- Content packs → Tools: includes · Utility item package.
- Content packs → Construction: includes · Architectural/building-material package.
- Content packs → Ponder: documents · In-game tutorial scenes explain core machines.
- Content packs → Compat layer: adapts · Optional integrations extend core gameplay and UI.
- Content packs → World data: persists · Oil discovery and deposit state is stored in world data.
- Content packs → Hooks: depends on · Content relies on mixins, packets, commands, and events for glue.
- Content packs → Datagen: drives · Content definitions feed the datagen pipeline.
- Datagen → Generated assets: writes · Datagen produces the generated resource tree.
- Main assets → Content packs: describes · Runtime JSON assets define recipes, tags, models, sounds, and tutorial scenes.
- Main assets → Ponder: stores scenes · Ponder runtime demos are backed by resource NBT scenes.
- Compat layer → Main assets: ships assets · Compatibility-specific resource overrides and textures are packaged in main resources.
- Hooks → Pumpjack: supports · Contraption movement, packet sync, and behavior patches support machine runtime.
- Hooks → Diesel engines: supports · Movement behaviors and engine-specific hooks support running machinery.
- Hooks → Compat layer: gates · Optional adapters are activated through runtime hooks and platform checks.
