Yet Another World Protector

Yet Another World Protector

247k Downloads

feat: Dimensional Region modifiers

Z0rdak opened this issue · 0 comments

commented

Description

Introduce modifiers that allow region flags to be applied based on specific height ranges (Y-level) and biomes. This provides more granular control over region behavior, enabling use cases like restricting actions on the Nether roof or applying different rules in distinct biomes.

  • Consider flags of biomes and ranges and general flags of the dimensional regions

Expected Behavior

  • Y-Range Modifier: Flags can be set to only apply within specified height ranges.
  • Biome Modifier: Flags can be configured to apply only within certain biomes.
  • ...

Suggested Implementation

Biome Modifier: Use a map structure to associate biomes with a list of applicable flags.
Example: {Biome.NETHER_WASTES -> [flag1, flag2], Biome.WARPED_FOREST -> [flag3]}
Y-Range Modifier: Store a list of Y-level ranges where flags apply.
Example: [(0–64), (120–256)] for applying flags at specific height intervals.

Steps to Implement

  • Extend region definitions to support optional Y-range and biome-based modifiers.
  • Modify flag application logic to check against these conditions.
  • Ensure proper serialization and compatibility with existing region data.
  • Test various scenarios to confirm correct behavior in different dimensions and biome conditions.

Notes

  • Consider flags of biomes and ranges and general flags of the dimensional regions