Skip to content
/ Jobs Public

A comprehensive jobs system for Minecraft 1.20.1 Fabric servers

License

Notifications You must be signed in to change notification settings

Toastie0/Jobs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

10 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

JobsFabric - Minecraft Fabric Mod

A comprehensive serverside jobs system with progression, economy rewards, and customizable tasks for Minecraft 1.20.1 Fabric servers.

Minecraft Fabric Java License

๐ŸŒŸ Features

  • Multiple Jobs System: Players can have up to 3 active jobs simultaneously
  • Progressive Leveling: Custom formula-based progression system with configurable requirements
  • Economy Integration: Seamless Impactor Economy integration for monetary rewards
  • Modded Content Support: Automatically compatible with any mod - no configuration needed
  • Serverside Only: No client-side mod required - works with vanilla clients
  • Interactive GUIs: Server-side GUI menus for job management and progress tracking
  • Performance Optimized: Formula caching, dirty tracking, and automatic cleanup

๐Ÿ“‹ Available Jobs

Phase 1 (Implemented)

  • โ›๏ธ Miner: Break ores and stones to level up
  • ๐ŸŒพ Farmer: Harvest crops and plants
  • ๐Ÿ—๏ธ Builder: Place blocks to earn progress

Phase 2 (Planned)

17+ additional jobs including Fighter, Fisherman, Hunter, Tamer, and more!

๐Ÿ”ง Dependencies

Required

  • Minecraft: 1.20.1
  • Fabric Loader: 0.18.3+
  • Fabric API: 0.92.6+1.20.1
  • Java: 21+
  • Impactor Economy: 5.3.0+

Bundled (Included)

  • SgUi 1.2.2+1.20 (server-side GUIs)
  • Fabric Permissions API 0.2-SNAPSHOT

๐Ÿ“ฅ Installation

  1. Download the latest release: JobsFabric-0.1-1.20.1.jar
  2. Place in your server's mods/ folder
  3. Install Fabric API (0.92.6+1.20.1) and Impactor Economy (5.3.0+)
  4. Start your server - configs generate automatically in config/jobs/

โš™๏ธ Configuration

Configuration files are located in config/jobs/:

Main Config (config.json)

{
  "jobs": {
    "maxActiveJobs": 3,
    "leaveCooldownMinutes": 15,
    "saveProgressOnLeave": true
  },
  "storage": {
    "autoSaveIntervalSeconds": 180
  },
  "autoDetection": {
    "enabled": true,
    "defaultOreProgress": 1.0,
    "defaultCropProgress": 1.0
  }
}

Job Definitions (jobs/*.json)

Each job has its own JSON configuration with:

  • Progress Formula: Custom expressions (e.g., 10 * (%level% ^ 2))
  • Action Types: break, harvest, place
  • Special Progress: Material-specific multipliers (optional)
  • Rewards: Economy rewards linked to rewards.json
  • GUI Configuration: Custom icons and descriptions

Example:

{
  "id": "miner",
  "name": "ยง6ยงlMiner",
  "requiredProgressFormula": "2 * (%level% ^ 2)",
  "actionType": "break",
  "defaultRewards": ["1"],
  "specialProgress": {
    "diamond_ore": 5.0,
    "coal_ore": 1.0
  }
}

Rewards System (rewards.json)

Define economy rewards with formulas:

{
  "1": [
    {
      "type": "command",
      "name": "$%value%",
      "variables": {
        "value": "(3 * (5 * (%level% ^ 2)))"
      },
      "commands": ["deposit %value%"]
    }
  ]
}

๐ŸŽฎ Usage

Player Commands

  • /jobs - Open the jobs menu GUI to join/leave jobs and view progress

Admin Commands

  • /jobsadmin reload - Reload configuration files
  • /jobsadmin save - Force save all player data
  • /jobsadmin test - Test economy integration
  • /jobsadmin reset <player> <job> - Reset specific job progress
  • /jobsadmin resetall <player> - Reset all jobs for a player
  • /jobsadmin info - View loaded jobs and config info

๐Ÿš€ Performance

  • Formula Caching: 50-80% reduction in calculations
  • Dirty Tracking: Only saves modified player data
  • Async Economy: Non-blocking transactions
  • Auto-Cleanup: Memory management with time-based expiry

๐Ÿงฉ Modded Content Support

Automatically works with ANY Fabric mod - no configuration needed:

  • Miner: Detects any block with _ore in the name
  • Farmer: Detects any block extending CropBlock
  • Builder: Accepts all placeable blocks

Server owners can optionally customize rewards for specific modded blocks in job JSON files.

๐Ÿ—๏ธ Development

Building from Source

# Clone the repository
git clone https://github.com/Toastie0/Jobs.git
cd Jobs

# Build with Gradle
./gradlew build

# Output: build/libs/JobsFabric-0.1-1.20.1.jar

Project Structure

src/main/java/net/advancedjobs/
โ”œโ”€โ”€ AdvancedJobsMod.java          # Main mod entry point
โ”œโ”€โ”€ config/
โ”‚   โ””โ”€โ”€ ConfigManager.java         # Configuration loader
โ”œโ”€โ”€ controller/
โ”‚   โ””โ”€โ”€ JobController.java         # Core job logic
โ”œโ”€โ”€ economy/
โ”‚   โ””โ”€โ”€ ImpactorEconomyHandler.java
โ”œโ”€โ”€ gui/
โ”‚   โ”œโ”€โ”€ JobListMenu.java           # Main jobs GUI
โ”‚   โ””โ”€โ”€ JobProgressMenu.java       # Job details GUI
โ”œโ”€โ”€ handlers/
โ”‚   โ”œโ”€โ”€ BlockBreakHandler.java     # Miner job
โ”‚   โ”œโ”€โ”€ CropHarvestHandler.java    # Farmer job
โ”‚   โ””โ”€โ”€ BlockPlaceHandler.java     # Builder job
โ”œโ”€โ”€ objects/
โ”‚   โ”œโ”€โ”€ Job.java                   # Job data model
โ”‚   โ”œโ”€โ”€ User.java                  # Player data model
โ”‚   โ””โ”€โ”€ UserJobInfo.java           # Job progress data
โ””โ”€โ”€ storage/
    โ””โ”€โ”€ JsonStorageManager.java    # JSON persistence

Tech Stack

  • Language: Java 21
  • Build Tool: Gradle 8.8
  • Mod Loader: Fabric
  • GUI Library: SgUi (server-side)
  • Economy: Impactor API
  • Storage: JSON with dirty tracking

๐Ÿ“Š Roadmap

Phase 1: Core System โœ… COMPLETE

  • Job framework with progression
  • Economy integration (Impactor)
  • Three jobs (Miner, Farmer, Builder)
  • Interactive GUIs
  • Admin commands
  • Performance optimizations
  • Modded content support

Phase 2: Expansion ๐Ÿ“‹

  • 17+ additional jobs (Fighter, Fisherman, Hunter, Tamer, etc.)
  • Job-specific achievements
  • Leaderboards
  • Boosters & multipliers

Phase 3: Advanced Features ๐Ÿ”ฎ

  • Permission integration
  • Item rewards
  • Job quests/milestones
  • Statistics dashboard

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.

๐Ÿ“„ License

This project is licensed under the CC0 1.0 Universal (Public Domain) License - see the LICENSE file for details.

This means you can use, modify, and distribute this mod freely without any restrictions or attribution requirements.

๐Ÿ‘ค Author

Toastie

๐Ÿ™ Acknowledgments

  • Fabric Team: For the excellent modding framework
  • Impactor: For the economy API
  • SgUi: For server-side GUI capabilities
  • Minecraft Modding Community: For resources and support

๐Ÿ“ž Support

For issues, questions, or suggestions:


Note: This mod is serverside only. Players with vanilla Minecraft clients can join and use all features without installing anything.

About

A comprehensive jobs system for Minecraft 1.20.1 Fabric servers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages