GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - 0xNull12/SimpleDifficulty: A fork of SimpleDifficulty's bug fixes and optimizations

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

421 Commits
421 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
gradle/wrapper
gradle/wrapper
 
 
src/main
src/main
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
CONTRIBUTORS.txt
CONTRIBUTORS.txt
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
build.gradle
build.gradle
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
modupdatechecker.json
modupdatechecker.json
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

SimpleDifficulty for Underdog

An improved SimpleDifficulty fork

Installation • Features • API • Compatibility


Overview

SimpleDifficulty brings a temperature and thirst system to Minecraft 1.12.2, based on the basic mechanics of survival mods like Tough As Nails. This maintained fork focuses on:

  • Bug fixes and stability improvements
  • Expanded mod compatibility for large modpacks
  • Technical optimizations for smooth gameplay
  • Code modernization and cleanup

Features

Core Mechanics

  • Thirst System: Requires players to manage hydration levels to avoid negative status effects.
  • Temperature Dynamics: Environmental biomes, blocks, and armor affect the player's temperature.
    • Hypothermia & Hyperthermia: Now reduce max health and apply negative potion effects instead of dealing direct damage. (Note: Spice of Life's health modifier is ignored in the calculation).
  • Water Variants:
    • Regular Water: Standard hydration source.
    • Saltwater: Increases dehydration rates if consumed.
    • Purified / Spring Water: Safe, clean hydration with optimal saturation values. Vanilla water is now treated as spring water. (Note: The water itself must be generated using another mod. Cave Generator is recommended).

Refined Water & Item Systems

  • Canteen Overhaul: Corrected durability logic and thirst replenishment scaling. Purified water consumption accurately updates items and sources.
  • Bottle Interactions: Empty bottles dynamically detect specific environmental fluid types (Salt, Normal, or Spring water) rather than defaulting exclusively to vanilla water blocks.
  • Consistent Smelting: Corrected cooking logic to prevent special fluid containers (like spring water bottles) from downgrading back to standard variants during processing.
  • Recipe Sanitization: Removed redundant or broken shapeless recipes for canteens and filters to prevent crafting conflicts.
  • Visual Adjustments: Fluid color rendering adapts organically based on biome locations, featuring customized depth fog settings.
    • Enhanced Fog: Improved water fog visuals. The fog color is brighter now and changes depending on the biome.
    • Customization: Added a new config option to make waters darker or brighter.
  • Ice Mechanics: Added regular and salt water ice! 🧊 Generates natural ice structures in applicable environments. Includes a world generator for it, and implements melting, freezing, and Serene Seasons support. Fully compatible with freeze/melt block states.

Technical Optimizations

Designed specifically to reduce server overhead and client-side stuttering in large modpacks.

Memory Management

Leak Resolution

  • Identified and closed memory leaks related to positional world tracking
  • Fixed capability data not being properly released on player disconnect
  • Optimized event handler registration to prevent duplicate listeners

Data Footprint

  • Streamlined internal telemetry storage in the core temperature subsystem
  • Reduced global memory usage by ~40% compared to original fork
  • Implemented lazy loading for non-critical data structures

Processing Efficiency

Execution Gates

  • Implemented early-exit logic across major processing loops
  • Reduced unnecessary tick evaluations when tracking systems are inactive
  • Added caching for frequently accessed calculations

Subsystem Tuning

  • Optimized environmental water-block scanning algorithms
  • Improved canteen consumption action performance
  • Streamlined tick-by-tick thirst calculations
  • Added salt/freshwater mixing logic with an optimized fill algorithm that doesn't affect performance.
  • Removed particle effects from fluids and slightly improved performance for fluid rendering.

Garbage Collection

  • Lowered object instantiation rates during standard gameplay loops
  • Implemented object pooling for frequently created/destroyed objects
  • Reduced overhead on Java Garbage Collector by ~60%

Mod Integrations

Fully Supported Mods

The following mods have dedicated integration code and full compatibility:

Click to expand full list (25 mods)
  • Animania
  • Armor Underwear
  • Baubles
  • Biomes O' Plenty (Added compatibility for aquatic plants)
  • Dynamic Trees (Added compatibility for fluid blocks)
  • DynamicSurroundings
  • EnhancedVisuals
  • First Aid
  • Harvest Festival Legacy
  • Inspirations
  • Lycanites Mobs
  • Ore Excavation
  • Pam's HarvestCraft
  • Potion Core
  • Pyrotech
  • Realistic Torches
  • Rustic
  • Serene Seasons
  • Streams
  • SurvivalTools
  • Simple Camp Fire
  • Traveler's Backpacks
  • Tinkers' Construct
  • The Betweenlands
  • Weather2 Remastered
  • HBM's Nuclear Tech Mod: Community Edition

Additional Compatibility

These mods work without dedicated integration but have been tested:

  • Cave Generator (Recommended for generating spring water)
  • Fluidlogged API
  • Greenery (Added compatibility for aquatic plants)

Want compatibility with a specific mod? Open an issue and I'll try to make it work!


Installation

Requirements

  • Minecraft: 1.12.2
  • Forge: 14.23.5.2847 or higher
  • Java: 8 or higher

Steps

  1. Download the latest release from GitHub Releases or CurseForge
  2. Locate your Minecraft mods folder:
    • Windows: %appdata%\.minecraft\mods
    • Linux: ~/.minecraft/mods
  3. Copy the SimpleDifficulty-0.%.%.jar file into the mods folder
  4. Launch Minecraft with the Forge profile

API Usage

SimpleDifficulty provides a complete API for other mods to integrate with the thirst and temperature systems.

Basic Example

import com.charles445.simpledifficulty.api.*;
import net.minecraft.entity.player.EntityPlayer;

// Get player's thirst data
IThirstCapability thirst = SDCapabilities.getThirstData(player);

// Check current thirst level (0.0 to 20.0)
float currentThirst = thirst.getThirst();
float currentSaturation = thirst.getSaturation();

// Make the player drink
ThirstUtil.takeDrink(player, 6.0f, 0.7f, 0.1f);
// Parameters: thirstAmount, saturationModifier, dirtyChance

// Find nearest water source
ThirstEnumBlockPos waterSource = ThirstUtil.traceWater(player);
if (waterSource != null) {
    BlockPos pos = waterSource.getPos();
    // Do something with the water location
}

Advanced Usage

// Set temperature directly
ITemperatureCapability temp = SDCapabilities.getTemperatureData(player);
temp.setTemperatureLevel(TemperatureEnum.HOT);

// Add custom temperature modifier
temp.addModifier(new TemperatureModifier("my_mod:custom_heat", 2.0f));

// Listen to thirst events
@SubscribeEvent
public void onThirstChange(ThirstChangeEvent event) {
    EntityPlayer player = event.getPlayer();
    float oldThirst = event.getOldValue();
    float newThirst = event.getNewValue();
    // React to thirst changes
}

For complete API documentation, see the api in the source code.

Building From Source

Prerequisites

  • Java Development Kit (JDK) 25
  • Git

Build Steps

# Clone the repository
git clone https://github.com/juraj-hrivnak/SimpleDifficulty.git
cd SimpleDifficulty

# Build the mod
./gradlew build

# For Windows users
gradlew.bat build

Output

The compiled JAR files will be located in:

build/libs/SimpleDifficulty-0.%.%.jar
build/libs/SimpleDifficulty-0.%.%-api.jar
build/libs/SimpleDifficulty-0.%.%-dev.jar
  • Regular JAR: For use in Minecraft
  • Dev and API JAR: For development and debugging

Development Environment

To set up a development environment:

# IntelliJ IDEA
./gradlew genIntellijRuns

# Eclipse
./gradlew eclipse

License & Credits

License

This project is distributed under the MIT License

Authors & Contributors

  • Charles445: Created the original version
  • juraj-hrivnak: Created the Underdog fork
  • Onyx_i7: Optimizer & Contributor

Support

  • Bug Reports: GitHub Issues
  • Feature Requests: GitHub Issues

About

A fork of SimpleDifficulty's bug fixes and optimizations

www.curseforge.com/minecraft/mc-mods/simpledifficulty-for-underdog

Topics

bugfixdifficultyforgegamingjavalegacymaintenanceminecraftminecraft-forgeminecraft-modoptimizationperformancesurvival

Resources

Readme
License
Activity

Stars

35 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.