SPIGOT-6720: Fix bed explosion checks
This commit is contained in:
parent
09b99daf30
commit
5be41fb80f
@ -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…
x
Reference in New Issue
Block a user