aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0836-Fix-a-couple-of-upstream-bed-issues.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0836-Fix-a-couple-of-upstream-bed-issues.patch')
-rw-r--r--patches/server/0836-Fix-a-couple-of-upstream-bed-issues.patch8
1 files changed, 4 insertions, 4 deletions
diff --git a/patches/server/0836-Fix-a-couple-of-upstream-bed-issues.patch b/patches/server/0836-Fix-a-couple-of-upstream-bed-issues.patch
index b2cad9c8d3..c39d5850ee 100644
--- a/patches/server/0836-Fix-a-couple-of-upstream-bed-issues.patch
+++ b/patches/server/0836-Fix-a-couple-of-upstream-bed-issues.patch
@@ -10,18 +10,18 @@ but then replaced it with a bed, you could respawn
at the bed in that world.
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 872bec4c366c86177334452315cc4a8097dae3c0..e9f8949267208b93f0c56c36ada38274ed4280f5 100644
+index c353643a9c9b400d351ef49e1b7d4f516ed0b0eb..f726c3839ab93cc81fee26bfeb821bead3533b5e 100644
--- a/src/main/java/net/minecraft/world/level/block/BedBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BedBlock.java
-@@ -108,6 +108,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock
- world.explode((Entity) null, world.damageSources().badRespawnPointExplosion(vec3d, explodedBlockState), (ExplosionDamageCalculator) null, vec3d, 5.0F, true, Level.ExplosionInteraction.BLOCK); // Paper - add exploded state
+@@ -107,6 +107,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock
+ world.explode((Entity) null, world.damageSources().badRespawnPointExplosion(vec3d), (ExplosionDamageCalculator) null, vec3d, 5.0F, true, Level.ExplosionInteraction.BLOCK);
return InteractionResult.SUCCESS;
} else if ((Boolean) state.getValue(BedBlock.OCCUPIED)) {
+ if (!BedBlock.canSetSpawn(world)) return this.explodeBed(state, world, pos); // Paper - check explode first
if (!this.kickVillagerOutOfBed(world, pos)) {
player.displayClientMessage(Component.translatable("block.minecraft.bed.occupied"), true);
}
-@@ -165,8 +166,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock
+@@ -163,8 +164,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock
// CraftBukkit end
public static boolean canSetSpawn(Level world) {