mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Configurable damage settings for magma blocks
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -993,6 +993,11 @@ public class PurpurWorldConfig {
|
||||
pistonBlockPushLimit = getInt("blocks.piston.block-push-limit", pistonBlockPushLimit);
|
||||
}
|
||||
|
||||
public boolean magmaBlockDamageWhenSneaking = false;
|
||||
private void magmaBlockSettings() {
|
||||
magmaBlockDamageWhenSneaking = getBoolean("blocks.magma-block.damage-when-sneaking", magmaBlockDamageWhenSneaking);
|
||||
}
|
||||
|
||||
public boolean powderSnowBypassMobGriefing = false;
|
||||
private void powderSnowSettings() {
|
||||
powderSnowBypassMobGriefing = getBoolean("blocks.powder_snow.bypass-mob-griefing", powderSnowBypassMobGriefing);
|
||||
|
||||
Reference in New Issue
Block a user