Class BlockExplosionDefense

java.lang.Object
com.hbm_m.util.BlockExplosionDefense

public final class BlockExplosionDefense extends Object
Minimal “explosion vs block” helper used by CraterGenerator.

In the original mod this logic was more elaborate; after merges this class went missing. For now we keep a lightweight heuristic so crater generation can compile and behave reasonably.

  • Method Details

    • calculateExplosionDamage

      public static BlockExplosionDefense.ExplosionDefenseResult calculateExplosionDamage(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.core.BlockPos center, float radius, net.minecraft.util.RandomSource random)
      Computes whether a block should be removed by a crater/explosion pass.
      Parameters:
      level - Level
      pos - Block being evaluated
      center - Explosion/crater center (for distance falloff)
      radius - Horizontal radius used by crater generator
      random - RandomSource