mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-13 11:18:23 +01:00
SPIGOT-6720: Fix bed explosion checks
By: Doc <nachito94@msn.com>
This commit is contained in:
parent
c8ef43f1b5
commit
08e5ad2b2f
2 changed files with 3 additions and 2 deletions
|
@ -568,7 +568,8 @@
|
|||
+ // CraftBukkit start - moved bed result checks from below into separate method
|
||||
+ private Either<EntityHuman.EnumBedResult, Unit> getBedResult(BlockPosition blockposition, EnumDirection enumdirection) {
|
||||
if (!this.isSleeping() && this.isAlive()) {
|
||||
if (!this.level.getDimensionManager().isNatural()) {
|
||||
- if (!this.level.getDimensionManager().isNatural()) {
|
||||
+ if (!this.level.getDimensionManager().isNatural() || !this.level.getDimensionManager().isBedWorks()) {
|
||||
return Either.left(EntityHuman.EnumBedResult.NOT_POSSIBLE_HERE);
|
||||
@@ -877,7 +1148,36 @@
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
+ // CraftBukkit end
|
||||
entityhuman.sleep(blockposition).ifLeft((entityhuman_enumbedresult) -> {
|
||||
+ // CraftBukkit start - handling bed explosion from below here
|
||||
+ if (entityhuman_enumbedresult == EntityHuman.EnumBedResult.NOT_POSSIBLE_HERE) {
|
||||
+ if (!world.getDimensionManager().isBedWorks()) {
|
||||
+ this.explodeBed(finaliblockdata, world, finalblockposition);
|
||||
+ } else
|
||||
+ // CraftBukkit end
|
||||
|
|
Loading…
Add table
Reference in a new issue