How akurakuu/create-electric-drive works
Project Type and Purpose
• This is a Minecraft mod (“Create: Electric Drive”) built on Forge (Neoforge) that extends the Create mod by adding electric motors and related components.
• The README confirms it integrates with Create’s “karakuri” system, powering it via energy from other industrial mods.
File Structure Analysis
• Top-level build files: gradlew, build.gradle, settings.gradle, gradle/ wrapper → standard Gradle/Forge mod build.
• src/main/java/com/akurakuu/create_electric_drive → Java code packaging:
• CreateElectricDrive.java (mod entry point)
• Registration helpers: AllBlocks, AllItems, AllEntities, AllCreateModeTabs
• Core logic: block/motor subpackages, abstractmotor, capability, payload
• Utility classes: ShapeUtil, TierUtil, Config
• src/main/resources/assets & data → resource definitions for block states, models, textures, recipes, loot tables, localization.
• src/main/templates → mod metadata (neoforge.mods.toml).
Insights from README
• Confirms purpose: add multiple motor types, energy integration with Create karakuri.
• Points to upstream dependencies: Create and Create Crafts & Additions (both MIT-licensed).
a. Main Components
• Minecraft Engine (client & server runtime)
• Forge Mod Loader (Neoforge framework)
• Create Core Mod (provides karakuri, mechanical network)
• Create: Electric Drive Mod
• Mod Initialization (CreateElectricDrive.java + Config)
• Registration Layer (AllBlocks, AllItems, AllEntities, AllCreateModeTabs)
• Block/BlockEntity Layer (BasicMotor, AdvancedMotor, InnovativeMotor, UltimateMotor + AbstractMotor base classes)
• Capability System (Capability.java, BlockCapability, server/client PayloadHandlers)
• Resource Pack (assets + models + textures + blockstates)
• Data Pack (recipes + loot tables + tags)
• External Tools (Aseprite, Blockbench—source assets)
b. Relationships and Data Flows
• Forge loads the mod: calls mod initializer → registers blocks/items/entities/capabilities via EventBus
• Minecraft engine uses registered blocks & entities in game world
• PayloadHandlers sync capability state between server and client
• Resource pack and data pack drive in-game visuals, crafting, and loot
c. Architectural Patterns and Principles
• Modular feature packages (block/motor, abstractmotor, capability, payload)
• Registration via central “AllX” classes (separation of concerns)
• Use of inheritance & abstract base classes (AbstractMotorBlock & AbstractMotorBlockEntity)
• Event-driven initialization (Forge EventBus)
• Client/server separation for payload handling
d. Key Technologies & Frameworks
• Java 17+, Forge (Neoforge), Gradle
• Create API (mechanical network integration)
• JSON-based resource & data definitions
• Aseprite & Blockbench for assets