feat: Implement TinyTorch command system and configuration integration
Some checks failed
build / build (push) Failing after 0s
Some checks failed
build / build (push) Failing after 0s
- Added TinyTorchCommands class to handle command registration and execution for configuration management. - Implemented commands for reloading, showing, and setting various configuration options such as torch light level, held light level, flicker speed, and dynamic lighting features. - Introduced TinyTorchModMenuIntegration class for integration with Mod Menu, allowing users to configure settings through a user-friendly interface. - Created language files for multiple languages (de_de, en_us, es_mx, fr_fr, ja_jp, pt_br, ru_ru, zh_cn) to support internationalization of mod descriptions and configuration options.
This commit is contained in:
118
README.md
118
README.md
@@ -1,23 +1,23 @@
|
||||
# 🔥 TinyTorch
|
||||
# TinyTorch
|
||||
|
||||
A Minecraft Fabric mod that makes lighting more realistic and atmospheric by reducing torch brightness and adding optional flickering effects.
|
||||
|
||||
## Features
|
||||
|
||||
### ✨ Core Features
|
||||
### Core Features
|
||||
|
||||
- **Reduced Light Radius**: Normal torch brightness reduced from light level 14 to configurable level (default: 8)
|
||||
- **Works for all torch types**: Both standing and wall torches affected
|
||||
- **Configurable**: All settings customizable via `tinytorch.json`
|
||||
|
||||
### 🎭 Optional Effects
|
||||
### Optional Effects
|
||||
|
||||
- **Flicker Effect**: Light level oscillates randomly ±1 every few ticks to simulate flickering flame
|
||||
- **Particle Effects**: Small smoke and spark particles appear occasionally around torches
|
||||
- **Held Light**: Torches emit weak light (level 4-5) when held in main/offhand
|
||||
- **Smart Updates**: Held light only updates when player moves for performance
|
||||
|
||||
### ⚡ Advanced Features
|
||||
### Advanced Features
|
||||
|
||||
- **Light Falloff Curve**: Sharper brightness drop-off after a few blocks (dark corners stay dark)
|
||||
- **Material-Based Lighting**:
|
||||
@@ -27,7 +27,49 @@ A Minecraft Fabric mod that makes lighting more realistic and atmospheric by red
|
||||
|
||||
## Configuration
|
||||
|
||||
The mod creates a `tinytorch.json` config file in your config directory:
|
||||
### In-Game Configuration
|
||||
|
||||
TinyTorch supports multiple ways to configure settings in-game:
|
||||
|
||||
#### ModMenu Integration (Recommended)
|
||||
1. Install [ModMenu](https://modrinth.com/mod/modmenu)
|
||||
2. Go to Mods menu → TinyTorch → Config
|
||||
3. Adjust settings with sliders and toggles
|
||||
4. Changes save automatically
|
||||
|
||||
#### In-Game Commands
|
||||
|
||||
For server operators, use commands to configure settings:
|
||||
|
||||
```bash
|
||||
# Show current configuration
|
||||
/tinytorch config show
|
||||
|
||||
# Reload configuration from file
|
||||
/tinytorch config reload
|
||||
|
||||
# Set torch light level (0-15)
|
||||
/tinytorch config set torch_light_level 8
|
||||
|
||||
# Set held torch light level (0-15)
|
||||
/tinytorch config set held_light_level 5
|
||||
|
||||
# Enable/disable flicker effects
|
||||
/tinytorch config set enable_flicker true
|
||||
|
||||
# Set flicker speed (1-20, higher = slower)
|
||||
/tinytorch config set flicker_speed 5
|
||||
|
||||
# Enable/disable held torch lighting
|
||||
/tinytorch config set held_light true
|
||||
|
||||
# Enable/disable sharp light falloff
|
||||
/tinytorch config set use_falloff_curve true
|
||||
```
|
||||
|
||||
#### Manual Configuration File
|
||||
|
||||
The mod creates a `tinytorch.json` file in your config folder:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -46,7 +88,7 @@ The mod creates a `tinytorch.json` config file in your config directory:
|
||||
- `held_light_level` (0-15): Light level when holding a torch (default: 5)
|
||||
- `enable_flicker` (true/false): Enable flickering flame effect (default: true)
|
||||
- `flicker_speed` (1+): Ticks between flicker changes, higher = slower (default: 5)
|
||||
- `use_falloff_curve` (true/false): Use custom sharp light falloff (default: true)
|
||||
- `use_falloff_curve` (true/false): Use custom sharp light falloff (default: true)
|
||||
- `held_light` (true/false): Enable dynamic lighting when holding torches (default: true)
|
||||
|
||||
## Gameplay Impact
|
||||
@@ -57,44 +99,30 @@ The mod creates a `tinytorch.json` config file in your config directory:
|
||||
- **Torches glow gently** in-hand when walking at night
|
||||
- **Strategic lighting** becomes more important for visibility
|
||||
|
||||
## In-Game Configuration
|
||||
|
||||
TinyTorch provides **three convenient ways** to adjust settings:
|
||||
|
||||
### 1. **ModMenu GUI** (Recommended)
|
||||
- Install [ModMenu](https://modrinth.com/mod/modmenu)
|
||||
- Access via Mods → TinyTorch → Config button
|
||||
- User-friendly sliders and toggles
|
||||
- Changes save automatically
|
||||
|
||||
### 2. **In-Game Commands** (Server Admins)
|
||||
- `/tinytorch config show` - View current settings
|
||||
- `/tinytorch config set torch_light_level 6` - Change values
|
||||
- `/tinytorch config reload` - Reload from file
|
||||
- Requires OP permissions
|
||||
|
||||
### 3. **Config File** (Advanced Users)
|
||||
- Edit `.minecraft/config/tinytorch.json`
|
||||
- Use `/tinytorch config reload` to apply changes
|
||||
|
||||
## Installation
|
||||
|
||||
1. Install [Fabric Loader](https://fabricmc.net/use/)
|
||||
2. Install [Fabric API](https://modrinth.com/mod/fabric-api)
|
||||
3. Download TinyTorch jar
|
||||
4. Place in your `mods` folder
|
||||
|
||||
## Compatibility
|
||||
|
||||
- ✅ **Fabric API**: Required
|
||||
- ✅ **OptiFine**: Compatible
|
||||
- ✅ **Sodium**: Compatible
|
||||
- ✅ **Shaders**: Works with vanilla lighting pipeline
|
||||
- ✅ **Multiplayer**: Server-side mod, clients benefit from effects
|
||||
|
||||
## Technical Details
|
||||
|
||||
- **Minecraft Version**: 1.21.1
|
||||
- **Fabric Loader**: 0.17.3+
|
||||
- **Java**: 21+
|
||||
- **License**: CC0-1.0
|
||||
|
||||
## Building
|
||||
|
||||
```bash
|
||||
./gradlew build
|
||||
```
|
||||
|
||||
Built jar will be in `build/libs/`
|
||||
|
||||
## Contributing
|
||||
|
||||
Contributions welcome! Please ensure:
|
||||
- Code follows existing style
|
||||
- Features are configurable
|
||||
- Performance impact is minimal
|
||||
- Works on both client and server
|
||||
|
||||
---
|
||||
|
||||
*Made with ❤️ for atmospheric Minecraft lighting*
|
||||
1. Download and install [Fabric Loader](https://fabricmc.net/use/)
|
||||
2. Download [Fabric API](https://modrinth.com/mod/fabric-api)
|
||||
3. **(Optional but recommended)** Download [ModMenu](https://modrinth.com/mod/modmenu) for in-game config
|
||||
4. Download TinyTorch and place in your `mods` folder
|
||||
5. Launch the game and enjoy atmospheric lighting!
|
||||
|
||||
Reference in New Issue
Block a user