Class BlockExplosionDefense
java.lang.Object
com.hbm_m.util.explosions.nuclear.BlockExplosionDefense
СИСТЕМА ЗАЩИТЫ БЛОКОВ С КОЭФФИЦИЕНТОМ ПРОБИТИЯ v3.0
Логичные коэффициенты по материалам:
Бетон: 250
Бетонные кирпичи: 350
Метеорит: 500
Кафель, мозаика: 180-220
Специальный бетон (усиленный): 400-600
Тултип с золотым цветом взрывоустойчивости
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classSmall helper result used by crater generation code.static final class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalculateExplosionDamage(net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, net.minecraft.core.BlockPos center, float radius, net.minecraft.util.RandomSource random) Compatibility method for crater-generation logic.static floatgetBlastResistance(net.minecraft.world.level.block.state.BlockState state) Получить взрывоустойчивость блокаstatic floatgetBlockDefenseValue(net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) ГЛАВНЫЙ МЕТОД: Получить коэффициент защиты блока Основано на взрывоустойчивости и типе материалаstatic intgetDefenseLevelFromResistance(float blastRes) Получить уровень защиты по диапазонам (для обратной совместимости)
-
Constructor Details
-
BlockExplosionDefense
public BlockExplosionDefense()
-
-
Method Details
-
calculateExplosionDamage
public static BlockExplosionDefense.ExplosionDefenseResult calculateExplosionDamage(net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, net.minecraft.core.BlockPos center, float radius, net.minecraft.util.RandomSource random) Compatibility method for crater-generation logic.Computes a simple "blast power vs defense" heuristic and returns whether the block should break.
-
getBlockDefenseValue
public static float getBlockDefenseValue(net.minecraft.server.level.ServerLevel level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) ГЛАВНЫЙ МЕТОД: Получить коэффициент защиты блока Основано на взрывоустойчивости и типе материала -
getBlastResistance
public static float getBlastResistance(net.minecraft.world.level.block.state.BlockState state) Получить взрывоустойчивость блока -
getDefenseLevelFromResistance
public static int getDefenseLevelFromResistance(float blastRes) Получить уровень защиты по диапазонам (для обратной совместимости)
-