--- a/net/minecraft/world/level/block/BlockRespawnAnchor.java +++ b/net/minecraft/world/level/block/BlockRespawnAnchor.java @@ -89,7 +89,7 @@ EntityPlayer.RespawnConfig entityplayer_respawnconfig1 = new EntityPlayer.RespawnConfig(world.dimension(), blockposition, 0.0F, false); if (entityplayer_respawnconfig == null || !entityplayer_respawnconfig.isSamePosition(entityplayer_respawnconfig1)) { - entityplayer.setRespawnPosition(entityplayer_respawnconfig1, true); + entityplayer.setRespawnPosition(entityplayer_respawnconfig1, true, org.bukkit.event.player.PlayerSpawnChangeEvent.Cause.RESPAWN_ANCHOR); // CraftBukkit world.playSound((Entity) null, (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, SoundEffects.RESPAWN_ANCHOR_SET_SPAWN, SoundCategory.BLOCKS, 1.0F, 1.0F); return EnumInteractionResult.SUCCESS_SERVER; } @@ -128,8 +128,9 @@ } private void explode(IBlockData iblockdata, World world, final BlockPosition blockposition) { + org.bukkit.block.BlockState blockState = org.bukkit.craftbukkit.block.CraftBlock.at(world, blockposition).getState(); // CraftBukkit - capture BlockState before remove block world.removeBlock(blockposition, false); - Stream stream = EnumDirection.EnumDirectionLimit.HORIZONTAL.stream(); + Stream stream = EnumDirection.EnumDirectionLimit.HORIZONTAL.stream(); // CraftBukkit - decompile error Objects.requireNonNull(blockposition); boolean flag = stream.map(blockposition::relative).anyMatch((blockposition1) -> { @@ -144,7 +145,7 @@ }; Vec3D vec3d = blockposition.getCenter(); - world.explode((Entity) null, world.damageSources().badRespawnPointExplosion(vec3d), explosiondamagecalculator, vec3d, 5.0F, true, World.a.BLOCK); + world.explode((Entity) null, world.damageSources().badRespawnPointExplosion(vec3d, blockState), explosiondamagecalculator, vec3d, 5.0F, true, World.a.BLOCK); // CraftBukkit - add state } public static boolean canSetSpawn(World world) {