SPIGOT-4895: Bed doesn't explode in Nether and The End

This commit is contained in:
md_5 2019-05-09 08:56:32 +10:00
parent ee8818473d
commit 6ceffb0d2a

View file

@ -1,6 +1,6 @@
--- a/net/minecraft/server/BlockBed.java --- a/net/minecraft/server/BlockBed.java
+++ b/net/minecraft/server/BlockBed.java +++ b/net/minecraft/server/BlockBed.java
@@ -42,20 +42,37 @@ @@ -42,12 +42,22 @@
} }
} }
@ -16,15 +16,15 @@
+ BlockPosition finalblockposition = blockposition; + BlockPosition finalblockposition = blockposition;
+ // CraftBukkit end + // CraftBukkit end
entityhuman.sleep(blockposition).ifLeft((entityhuman_enumbedresult) -> { entityhuman.sleep(blockposition).ifLeft((entityhuman_enumbedresult) -> {
+ // CraftBukkit start - handling bed explosion from below here
+ if (entityhuman_enumbedresult == EntityHuman.EnumBedResult.NOT_POSSIBLE_HERE) {
+ this.explodeBed(finaliblockdata, world, finalblockposition);
+ } else
+ // CraftBukkit end
if (entityhuman_enumbedresult != null) { if (entityhuman_enumbedresult != null) {
entityhuman.a(entityhuman_enumbedresult.a(), true); entityhuman.a(entityhuman_enumbedresult.a(), true);
} }
+ // CraftBukkit start - handling bed explosion from below here @@ -55,7 +65,14 @@
+ else if (entityhuman_enumbedresult == EntityHuman.EnumBedResult.NOT_POSSIBLE_HERE) {
+ this.explodeBed(finaliblockdata, world, finalblockposition);
+ }
+ // CraftBukkit end
}); });
return true; return true;
} }