mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 00:47:42 +01:00
Fix #421: Bed explosion options not working
This commit is contained in:
@@ -5,7 +5,7 @@ Subject: [PATCH] Implement bed explosion options
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/BedBlock.java b/src/main/java/net/minecraft/world/level/block/BedBlock.java
|
||||
index 163a7861f987c3832aac51cc6df950c768546731..cfe4cdbd28ff11ea2781d47fe6d8c2de7912a3f6 100644
|
||||
index 163a7861f987c3832aac51cc6df950c768546731..bf5765b6af9c7807d50f7daaacb5d52477ebf291 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/BedBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/BedBlock.java
|
||||
@@ -97,7 +97,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock
|
||||
@@ -17,6 +17,15 @@ index 163a7861f987c3832aac51cc6df950c768546731..cfe4cdbd28ff11ea2781d47fe6d8c2de
|
||||
return InteractionResult.SUCCESS;
|
||||
} else if ((Boolean) state.getValue(BedBlock.OCCUPIED)) {
|
||||
if (!this.kickVillagerOutOfBed(world, pos)) {
|
||||
@@ -146,7 +146,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock
|
||||
world.removeBlock(blockposition1, false);
|
||||
}
|
||||
|
||||
- world.explode((Entity) null, DamageSource.badRespawnPointExplosion(), (ExplosionDamageCalculator) null, (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, 5.0F, true, Explosion.BlockInteraction.DESTROY);
|
||||
+ if (world.purpurConfig.bedExplode) world.explode((Entity) null, DamageSource.badRespawnPointExplosion(), null, (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, (float) world.purpurConfig.bedExplosionPower, world.purpurConfig.bedExplosionFire, world.purpurConfig.bedExplosionEffect); // Purpur
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 506e7198de3a339545bebb508d96ca95f5fc8fc1..c3ec6d09e952f55e1e098f59d9764bc6cbe7c444 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
|
||||
Reference in New Issue
Block a user