@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/BlockBed.java
|
||||
+++ b/net/minecraft/server/BlockBed.java
|
||||
@@ -42,12 +42,22 @@
|
||||
@@ -43,7 +43,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,8 +8,11 @@
|
||||
+ // CraftBukkit - moved world and biome check into EntityHuman
|
||||
+ if (true || world.worldProvider.canRespawn() && world.getBiome(blockposition) != Biomes.NETHER) {
|
||||
if ((Boolean) iblockdata.get(BlockBed.OCCUPIED)) {
|
||||
entityhuman.a((IChatBaseComponent) (new ChatMessage("block.minecraft.bed.occupied", new Object[0])), true);
|
||||
return true;
|
||||
if (!this.a(world, blockposition)) {
|
||||
entityhuman.a((IChatBaseComponent) (new ChatMessage("block.minecraft.bed.occupied", new Object[0])), true);
|
||||
@@ -51,7 +52,16 @@
|
||||
|
||||
return EnumInteractionResult.SUCCESS;
|
||||
} else {
|
||||
+ // CraftBukkit start
|
||||
+ IBlockData finaliblockdata = iblockdata;
|
||||
@@ -24,28 +27,28 @@
|
||||
if (entityhuman_enumbedresult != null) {
|
||||
entityhuman.a(entityhuman_enumbedresult.a(), true);
|
||||
}
|
||||
@@ -55,7 +65,14 @@
|
||||
@@ -59,7 +69,14 @@
|
||||
});
|
||||
return true;
|
||||
return EnumInteractionResult.SUCCESS;
|
||||
}
|
||||
+ // CraftBukkit start - moved bed explosion into separate method
|
||||
} else {
|
||||
+ return true;
|
||||
+ return EnumInteractionResult.SUCCESS;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ private boolean explodeBed(IBlockData iblockdata, World world, BlockPosition blockposition) {
|
||||
+ private EnumInteractionResult explodeBed(IBlockData iblockdata, World world, BlockPosition blockposition) {
|
||||
world.a(blockposition, false);
|
||||
BlockPosition blockposition1 = blockposition.shift(((EnumDirection) iblockdata.get(BlockBed.FACING)).opposite());
|
||||
|
||||
@@ -65,8 +82,7 @@
|
||||
@@ -69,8 +86,7 @@
|
||||
|
||||
world.createExplosion((Entity) null, DamageSource.a(), (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, 5.0F, true, Explosion.Effect.DESTROY);
|
||||
return true;
|
||||
return EnumInteractionResult.SUCCESS;
|
||||
- }
|
||||
- }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
@Override
|
||||
private boolean a(World world, BlockPosition blockposition) {
|
||||
|
||||
Reference in New Issue
Block a user