Configurable damage settings for magma blocks

This commit is contained in:
Ben Kerllenevich
2025-01-12 15:06:56 -08:00
committed by granny
parent 26189d0fde
commit f4e3250945
3 changed files with 16 additions and 35 deletions

View File

@@ -0,0 +1,11 @@
--- a/net/minecraft/world/level/block/MagmaBlock.java
+++ b/net/minecraft/world/level/block/MagmaBlock.java
@@ -28,7 +_,7 @@
@Override
public void stepOn(Level level, BlockPos pos, BlockState state, Entity entity) {
- if (!entity.isSteppingCarefully() && entity instanceof LivingEntity) {
+ if ((!entity.isSteppingCarefully() || level.purpurConfig.magmaBlockDamageWhenSneaking) && entity instanceof LivingEntity) { // Purpur - Configurable damage settings for magma blocks
entity.hurt(level.damageSources().hotFloor().directBlock(level, pos), 1.0F); // CraftBukkit
}