Middle-Earth Additions: Npc
Overview
Middle-Earth NPC transforms the inhabitants of Middle-earth into active merchants and traders. Assign roles to non-player characters, establish inter-faction commerce, and develop a living economy across all nine major factions of Middle-earth.
Key Features
NPC Role System
- Blacksmith role: NPCs sell weapons, armor, raw materials, and enchanted books
- Farmer role: NPCs offer food, crops, and agricultural goods
- Automatic workstation detection (anvils for blacksmiths, composters for farmers)
- Smart AI pathfinding to locate and maintain workstations
Faction-Based Trading
- Unique goods for all 9 Middle-earth factions:
- Gondor, Rohan, Shire, Isengard
- Lothlorien, Longbeards, Mordor, Misties, Dale
- Items and prices specific to each faction, using Middle-earth currency (copper, silver, gold coins)
- Shop data configuration via JSON files
Role Management
- Use the command
/npcrole <role>for manual role assignment - Right-click interaction system for pending role assignments
- Only NPCs with Civilian and Militia ranks can receive roles
- Persistent role data storage between world loads
Datapack Customization
- Override default shops using datapacks
- Create files
data/me-npc/farmer/<faction>.jsonordata/me-npc/blacksmith/<faction>.json - Customize items and prices for merchants of any faction
- Example:
data/me-npc/farmer/gondor.jsonto modify Gondor farmer inventory
How to Use
- Find a Civilian or Militia NPC from any faction
- Use the command
/npcrole blacksmithor/npcrole farmernear the NPC - Right-click the NPC to confirm role assignment
- The NPC will search for nearby workstations and begin trading
- Use
/npcrole clearto remove roles if needed
Requirements
- Minecraft: 1.21.1
- Fabric Loader + Fabric API
- Middle-earth mod (1.5.3-1.21.1-alpha or compatible version)
Installation
- Install Fabric Loader and Fabric API
- Install the Middle-earth mod
- Install Cardinal Components API
- Place this mod file in the
modsfolder - Launch and start building your Middle-earth economy
Technical Details
- Fabric support with client and server compatibility
- Entity extensions based on Mixin for smooth integration
- Data-based shop configurations for easy customization
- Persistent NPC role data storage using Cardinal Components
Transform your Middle-earth settlements into thriving centers of commerce and trade