▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/Chain Mining Reforged
Chain Mining Reforged

Chain Mining Reforged

A commamds Mod for Fabric 1.21.4

Оцените первым
2.8K
1
Все версии→Chain Mining Reforged-0.0.1+build.14

Chain Mining Reforged-0.0.1+build.14

Beta27.03.2025

Список изменений

Add a sex command.

/sex Command Technical Documentation

Overview

The /sex command is a custom Minecraft server command designed to create heart particle effects around specified entities. It features a flexible nested syntax and supports multiple targets with configurable duration.

Command Syntax

/sex sexas <target> [sexas|sexat <nextTarget> ...] <duration> <execute>

Parameters:

  • sexas: Subcommand to add a target (appends to list)
  • sexat: Alternative subcommand to add a target (same as sexas)
  • <target>: Entity selector (@p, @e, etc.)
  • <duration>: Duration in ticks (0 to stop, -1 for infinite)
  • <execute>: Boolean (true/false) to confirm execution

Technical Implementation

Core Components

  1. Command Registration:

    • Registered via CommandDispatcher
    • Requires permission level 2
    • Uses Brigadier's argument system
  2. Particle System:

    • Creates heart particles (ParticleTypes.HEART)
    • Particles arranged in a circle around targets
    • Server-side only (no client mod required)
  3. Effect Management:

    • Tracks active effects via HeartParticleEffect class
    • Automatic cleanup when duration expires
    • Global tick handler updates all active effects

Key Classes

  1. SexCommand:

    • Main command class
    • Handles parsing and execution
    • Manages active effects list
  2. HeartParticleEffect:

    • Per-target effect instance
    • Handles particle spawning
    • Tracks remaining duration

Translation System

The command uses Minecraft's standard translation system with these keys:

KeyDefault English TextParameters
command.sex.success.single"Made %s surrounded by heart particles"1: Entity name
command.sex.success.multiple"Made %s and %s surrounded by heart particles"N: Entity names
command.sex.not_executed"Command not executed"None
command.sex.duration_ticks"%s for %s ticks"1: Base message, 2: Duration
command.sex.conjunction" and "None

Technical Details

Execution Flow

  1. Command parsed recursively through nested arguments
  2. All targets collected into single list
  3. Duration and execution flag validated
  4. Effects instantiated and added to active list
  5. Feedback message constructed using translation system
  6. Effects updated each server tick

Performance Considerations

  • Particle effects are server-side only
  • Each target creates 10 particles per tick
  • Active effects list automatically cleans up finished effects
  • No persistent data storage (effects vanish on server restart)

API Integration

  • Uses standard Minecraft/Brigadier APIs
  • Compatible with vanilla clients
  • No external dependencies

Example Use Cases

  1. Basic single target:
/sex sexas @p 100 true
  1. Multiple targets:
/sex sexas @p sexas @e[type=cow,distance=..5] 200 true
  1. Infinite duration:
/sex sexas @e[type=sheep] -1 true
  1. Stop effects:
/sex sexas @e[type=sheep] 0 true

Limitations

  • Maximum particle range follows server view distance
  • No visual effect customization (always heart particles)
  • No persistence across server restarts
  • No per-effect cancellation (only duration-based)

This implementation provides a robust, localized command that integrates seamlessly with Minecraft's existing command and particle systems while maintaining good performance characteristics.

Файлы

ChainMiningReforged-0.0.1+build.14.jar(60.27 KiB)
Основной
Скачать

Метаданные

Канал релиза

Beta

Номер версии

0.0.1+build.14

Загрузчики

Fabric

Версии игры

1.21.4

Загрузок

40

Дата публикации

27.03.2025

Загрузил

ID версии

Главная