Jonathan Teglas

Also make the overworld a winter wonderland

📎 1 file 6,857 chars
📄
pasted-code-1793606870779.txt
txt 65 lines
▶
Create a comprehensive, production-grade Minecraft Fabric mod targeted for Minecraft 26.3 (using the latest Fabric API standard for 26.3), heavily inspired by the "Cold Sweat" survival mod. The mod introduces a profound, highly customizable winter survival and dynamic temperature ecosystem.

Please design, architect, and outline the complete code structure, registries, mixins, network packet handlers, codec-based JSON parsers, and client-side rendering logic for the following 50 explicit features grouped by system:

### Phase 1: Core Temperature Traits & Architecture
1. "world" Trait: Computes ambient temperature based on immediate surroundings, weather, and altitude.
2. "core" Trait: Tracks internal entity core body temperature across a precise numeric range (-150 to 150).
3. "base" Trait: Manages temporary offset modifiers applied via consumables or special environmental effects.
4. "body" Trait: Aggregate read-only trait summing core and base traits to determine overall thermal status.
5. "rate" Trait: Computes instantaneous rate of heating or cooling per tick.
6. "freezing_point" Trait: Dynamic threshold defining when freezing penalties activate.
7. "burning_point" Trait: Dynamic threshold defining when overheating penalties activate.
8. "cold_resistance" & "heat_resistance" Traits: Percentage-based damage mitigation parameters for extreme temperatures.

### Phase 2: Environmental & World Temperature Engine
9. Biome Temperature Mapping: Inherits vanilla biome thermal properties and scales them dynamically.
10. Altitude Temperature Drop: Height-based calculations that progressively lower temperatures in elevated peaks and high skies.
11. Weather & Overcast Modifier: Blizzards, heavy snowfall, and overcast skies dynamically lower global temperature values.
12. Time of Day Variation: Surface biomes experience realistic nighttime temperature drops and daytime warming.
13. Block Radiation Source System: JSON-driven block tag system for heat-emitting blocks (fires, lava, blaze burners, custom heat sources).
14. Cold-Absorbing Block System: Ice, packed ice, blue ice, and snow blocks acting as local heat sinks that lower local temperatures.
15. Fluid and Tank Heat Radiation: Fluid-containing pipes and tanks emitting temperature profiles based on their liquid contents.
16. Smokestack Mechanics: Connectable smokestack blocks that extend hearth warmth reach vertically upward.
17. Custom Ice Freezing/Thawing Logic: Ice blocks freeze or melt naturally considering localized temperatures, random tick speeds, and seasonal data.
18. Underground Thermal Profile: Deep subterranean layers featuring stable baseline ambient temperatures and depth-based warmth scaling.

### Phase 3: Player Body Heat & Negative Status Effects
19. Server-Side Tick Calculation Loop: Safe periodic processing of player temperature updates to prevent performance degradation.
20. Client-Side HUD Thermometer Widget: Real-time visual indicator widget near the hotbar displaying body temperature trends and state.
21. Frigidness Status Effect: Imposes sluggish movement speed, mining fatigue, and reduced action rates during extreme cold.
22. Overheating Status Effect: Induces dizziness, nausea, and a custom screen-warping shader ("blobs shader") during extreme heat.
23. Freezing Health Loss: Gradual heart depletion when core temperature breaches extreme minimum thresholds.
24. Heat Damage: Direct damage over time when overheating points are breached without mitigation.
25. Natural Regeneration Suppression: Disabling natural health regeneration during severe thermal stress.
26. Wetness State Interaction: Water contact accelerating cold loss; implementing mechanics to extinguish fire and dry off wet clothing.
27. Temperature Acclimation System: Gradual player adaptation allowing survival in climates offset by configurable margins over time.
28. Inventory Item Temperature ("Carried Items"): Items in inventory or Curios slots affecting body temperature or granting passive resistance stats.

### Phase 4: Insulation & Sewing Workstation Mechanics
29. Sewing Table Block Entity & GUI: Dedicated crafting workstation for modifying armor thermal properties.
30. Material Sewing Integration: Combining standard armor pieces (Leather, Iron, Diamond, Netherite) with insulation items.
31. Insulation Tiers: Wool, Fur, Down, Hoglin Hide, and Chameleon Scale scaling thermal dampening values.
32. Thermal Dampening Factors (`cold_dampening` / `heat_dampening`): Parameters slowing down temperature drain/gain rates.
33. Adaptive Insulation Armor (Chameleon Scale): Special armor sets that dynamically shift insulation values based on the ambient environment.
34. Armor Slot Calculation Hook: Mixin injecting insulation modifiers into player equipment evaluation logic.
35. Curios / Equipment Slot Compatibility: Extending insulation bonuses to ring, amulet, cape, or belt equipment slots.
36. Insulator Tab Datapack Support: JSON-driven registry allowing custom items and modded materials to serve as insulation modifiers.

### Phase 5: Survival Utility Blocks & Items (Hearth, Boiler, Icebox, Waterskins)
37. Handheld Thermometer Item: Displays exact local ambient and body temperatures in tooltips or UI text.
38. Waterskin Item Mechanics: Portable container holding fluids that can be thermally altered for on-the-go regulation.
39. Boiler Workstation: Heats up waterskins or items using fuel to create warm thermal packs.
40. Icebox Workstation: Cools down waterskins or items using ice blocks to create cold thermal packs.
41. The Hearth Multi-block / Tile Entity: A high-output thermal radiator designed to warm closed spaces or cabins.
42. Hearth Fuel Customization: Different fuels (coal, blaze rods, cold items) altering output heating or frigidness rates.
43. Item Drying System: JSON-defined recipe registry for drying wet garments or items near heat sources.
44. Consumable Temperature Foods: Specialized foods (such as soul sprouts) that temporarily alter the `base` temperature trait.
45. Piglin Bartering Integration: Piglins accepting thermometers or thermal items during bartering exchanges.

### Phase 6: Integration, Datapacks, Configuration & Fabric 26.3 Networking
46. Fabric 26.3 Toolchain & Entrypoints: Clean entrypoint initialization using modern Fabric API standards.
47. Custom Network Packet Syncing (`ClientPlayNetworking`): Secure server-to-client data transfer for real-time temperature synchronization.
48. Robust Configuration System (TOML): Extensive file-based toggles for balancing, unit selection (°C, °F, Minecraft units), and temperature bounds.
49. JSON Datapack Parsers & Codecs: Modern vanilla-style Codecs for loading custom temperature regions, block tags, and item insulation specs.
50. Mod Interoperability Hooks: Built-in hooks for Serene Seasons, Create, and Biomes O' Plenty biome compatibility.
Kodari AI
KodariNov 2 at 8:15 am 3
FrostboundSurvival
A comprehensive Minecraft Fabric 26.3 winter survival mod introducing a dynamic temperature ecosystem. Features a multi-trait thermal system tracking world, core, base, body, and rate temperatures with configurable freezing and burning points. Implements environmental temperature engines including biome mapping, altitude drops, weather modifiers, block radiation sources, and underground thermal profiles. Adds player thermal stress mechanics with frigidness and overheating effects, wetness interactions, and acclimation systems. Includes a sewing workstation for armor insulation tiers, survival utilities like hearths, boilers, iceboxes, waterskins, and thermometers. Provides JSON datapack support, TOML configuration, Fabric networking, and mod interoperability hooks.
  1. Build a Fabric 26.3 mod foundation with configurable temperature traits and server-side player updates.

  2. Sync temperatures to clients and add an owo-ui HUD overlay.

  3. Winterize overworld biomes and weather so the whole surface feels snowy.

Created Winterbound, a Fabric 26.3 mod that turns default overworld biomes cold and snowy, maintains rainy winter weather, and tracks player temperature on the server. It includes altitude, time, weather, and wetness adjustments; acclimation; configurable extreme-temperature damage; a TOML config; and a synced temperature HUD.

This is the core temperature and winter-world foundation, not the full 50-feature specification. Sewing, hearth and other utility blocks, insulation equipment, status effects, recipes, datapack parsers, and mod integrations are not included yet. No items or blocks were added, so there are no new survival recipes or drops.

Jonathan Teglas

Integrate the full features and make the world feel custom with custom structures and biomes

Kodari AI
KodariNov 2 at 8:33 am 3
  1. Expand the existing temperature foundation toward the requested survival systems.

  2. Add custom overworld biomes and structures so exploration feels distinct.

Added temperature-aware heat and cold sources, underground warming, leather and netherite thermal resistance, and freezing/overheating debuffs. The Overworld now includes two custom climate-selected biomes—Frostpine Forest and Glacier Highlands—and newly generated chunks can contain Frost Shrines or Snowwatch Towers.

This is not yet the full 50-feature specification. Sewing and insulation systems, utility blocks and items, richer datapack-driven configuration, and several integrations are still outstanding. The new biomes and landmarks generate naturally; no craftable items were added.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
15 709
src/client/java/com/kodari/winterbound/client/WinterboundClient.java
package com.kodari.winterbound.client;

import com.kodari.winterbound.TemperaturePayload;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
import net.fabricmc.fabric.api.client.rendering.v1.hud.HudElementRegistry;
import net.minecraft.client.Minecraft;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.Identifier;

import java.util.Locale;

public final class WinterboundClient implements ClientModInitializer {
    private static final Identifier HUD_ID = Identifier.fromNamespaceAndPath("winterbound", "temperature_hud");
    private static volatile double bodyTemperature;
    private static volatile double worldTemperature;
    private static volatile double rate;
    private static volatile boolean hasTemperature;

    @Override
    public void onInitializeClient() {
        ClientPlayNetworking.registerGlobalReceiver(TemperaturePayload.TYPE, (payload, context) -> {
            bodyTemperature = payload.bodyTemperature();
            worldTemperature = payload.worldTemperature();
            rate = payload.rate();
            hasTemperature = true;
        });

        HudElementRegistry.addLast(HUD_ID, (graphics, deltaTracker) -> {
            Minecraft minecraft = Minecraft.getInstance();
            if (minecraft.player == null || !hasTemperature) {
                return;
            }

            String trend = rate > 0.05 ? "↑" : rate < -0.05 ? "↓" : "→";
            String text = String.format(Locale.ROOT, "Body %.1f  World %.1f  %s", bodyTemperature, worldTemperature, trend);
            int color = bodyTemperature < -40.0 ? 0xFF9AD9FF : bodyTemperature > 40.0 ? 0xFFFFB077 : 0xFFFFFFFF;
            graphics.text(minecraft.font, Component.literal(text), 8, graphics.guiHeight() - 42, color);
        });
    }
}