Package com.hbm_m.util
Class BlockExplosionDefense
java.lang.Object
com.hbm_m.util.BlockExplosionDefense
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.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptioncalculateExplosionDamage(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.
-
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- Levelpos- Block being evaluatedcenter- Explosion/crater center (for distance falloff)radius- Horizontal radius used by crater generatorrandom- RandomSource
-