Skip to content

🛠️ Configuração do Ambiente e Guia de Compilação com Gradle

📌 Aviso Legal do Código-Fonte do Repositório: A documentação nesta Wiki reflete o estado atual do código-fonte no repositório, que pode incluir commits recentes não lançados ou recursos em desenvolvimento antes dos lançamentos públicos no CurseForge e Modrinth.


🏗️ Pré-requisitos do Ambiente

Para compilar o True Sleep a partir do código-fonte, utilize as seguintes ferramentas:

  1. Java Development Kit (JDK): JDK 25 ou superior (ex.: Eclipse Temurin 25 ou GraalVM 25).
  2. Git: Versão 2.40+.
  3. IDE: IntelliJ IDEA 2026.1+ ou VS Code com Java Extension Pack.

📥 Clonando o Repositório

bash
git clone https://github.com/Rifaditya/Vanilla-Outsider-True-Sleep.git
cd Vanilla-Outsider-True-Sleep

🔨 Instruções de Compilação com Gradle

O True Sleep utiliza o Fabric Loom com Gradle 9.3+ e compilações sem daemon (--no-daemon).

1. Compilar e Empacotar o JAR

bash
./gradlew build --no-daemon

Os arquivos JAR compilados do mod e das fontes serão gerados em build/libs/:

  • vanilla-outsider-true-sleep-1.3.22+26.2.jar
  • vanilla-outsider-true-sleep-1.3.22+26.2-sources.jar

2. Executar Testes Unitários Headless

bash
./gradlew test --no-daemon

3. Iniciar Cliente de Desenvolvimento

bash
./gradlew runClient --no-daemon

4. Iniciar Servidor Dedicado de Desenvolvimento

bash
./gradlew runServer --no-daemon

📐 Mapa da Estrutura do Projeto

Vanilla-Outsider-True-Sleep/
├── build.gradle                 # Loom build script (Java 25 release)
├── gradle.properties            # Target Minecraft & mod versions
├── src/main/java/net/vanillaoutsider/truesleep/
│   ├── TrueSleep.java           # Entrypoint & ModVersionGuard init
│   ├── TrueSleepTags.java       # Datapack tag constants
│   ├── command/
│   │   └── TrueSleepCommand.java# Brigadier /truesleep command tree
│   ├── config/
│   │   ├── TrueSleepRules.java  # Namespaced GameRule definitions
│   │   ├── TrueSleepConfig.java # GSON JSON config persistence
│   │   ├── ClothConfigScreenHelper.java # Cloth Config GUI builder
│   │   └── ModMenuIntegration.java      # ModMenu API integration
│   ├── logic/
│   │   ├── TimeWarpManager.java        # Hyperspace acceleration engine
│   │   ├── BiologicalStasisHelper.java # Farm aging math & potion aging
│   │   ├── SleepHungerHelper.java      # Sleep hunger exhaustion math
│   │   └── QuietClockManager.java      # World clock interfaces
│   ├── mixin/
│   │   ├── BedRuleMixin.java           # Bed threshold override
│   │   ├── EntityMixin.java            # Drown immunity pulmonary stasis
│   │   ├── LevelMixin.java             # Machine & hopper tick multiplier
│   │   ├── LivingEntityMixin.java      # Active potion effect aging
│   │   ├── MobEffectInstanceMixin.java # Cascade duration decrement
│   │   ├── MobMixin.java               # Mob freeze & aging bridge
│   │   ├── ServerLevelMixin.java       # Sleep suppression & warp hook
│   │   └── VibrationSystemListenerMixin.java # Warden vibration mute
│   └── mixin/client/
│       ├── HudMixin.java               # Sleep black fade cancellation
│       └── SkyRendererMixin.java       # Angular celestial sky lerp
└── src/main/resources/
    ├── fabric.mod.json          # Mod metadata & dependencies
    ├── truesleep.mixins.json    # Common mixin configuration
    ├── truesleep.client.mixins.json # Client mixin configuration
    └── data/truesleep/tags/     # Machine & worker mob tags

Official documentation & web portal for Dasik Igaijinn mods.