Skip to content

Conversation

@Giovanniricotta2002
Copy link
Member

This pull request introduces several improvements and refactorings to the handling of anti-radiation armor, status effects, particle types, and some multiblock and biome logic. The most significant changes are the improved detection of full anti-radiation armor sets, more robust cooldown management for vicinity effects, and the introduction of a custom particle type registry. Additionally, the code now changes the biome around reactor casings when placed.

Armor and Status Effect Improvements:

  • Refactored anti-radiation armor logic:
    • Added isFullSet methods to check if an entity is wearing a complete anti-radiation armor set, and isAnyPiece to check for any piece. This replaces the previous isArmored method and improves detection reliability.
    • Updated the RadiationEffect and related logic to use isFullSet for determining immunity, ensuring radiation effects are only applied if the entity is not fully protected. [1] [2]
  • Improved vicinity effect cooldown management:
    • Replaced a single cooldown counter with a per-entity cooldown map, ensuring each affected entity has its own cooldown for effect application. Also added server-side cleanup for removed entities. [1] [2]

Particle System Enhancements:

  • Introduced a centralized particle type registry:
    • Added the CNParticleTypes enum to register and manage custom particle types, such as IRRADIATED_PARTICLES, and integrated it into the mod's initialization and client event bus. [1] [2] [3]

Multiblock and Biome Logic:

  • Changed biome around reactor casings:
    • When a ReactorCasing block is placed, the biome in a 12-block radius is updated to the custom irradiated biome, enhancing world interaction and atmosphere. [1] [2]

General Refactoring and Cleanup:

  • Updated method and variable names for clarity and consistency, and removed or commented out unused code, such as legacy attribute modifier handling in AntiRadiationArmorItem. [1] [2]
  • Minor import and type simplifications for maintainability. [1] [2] [3] [4] [5]

These changes collectively improve code maintainability, gameplay mechanics, and mod extensibility.

mathi and others added 9 commits November 23, 2025 15:29
…improve cooldown management in vicinity effects
…ove chunk processing

Co-authored-by: MathisGredtYnov <113118860+MathisGredtYnov@users.noreply.github.com>
Co-authored-by: ArcEnStone <113118860+MathisGredt@users.noreply.github.com>
Co-authored-by: MathisGredtYnov <mathis.gredt@ynov.com>
…torCasing

Co-authored-by: MathisGredtYnov <113118860+MathisGredtYnov@users.noreply.github.com>
Co-authored-by: ArcEnStone <113118860+MathisGredt@users.noreply.github.com>
Co-authored-by: MathisGredtYnov <mathis.gredt@ynov.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants