mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 05:47:45 +01:00
1.13: Resend bed on cancelled interaction (#1245)
Minecraft 1.13 requires resending the block for both parts of the bed
This commit is contained in:
parent
7dd591d1a6
commit
df8c42d4ad
@ -13,7 +13,7 @@ Update adjacent blocks of doors, double plants, pistons and beds
|
||||
when cancelling interaction.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||
index e34198e40..620efb1ac 100644
|
||||
index e34198e4..e375e255 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerInteractManager {
|
||||
@ -42,15 +42,14 @@ index e34198e40..620efb1ac 100644
|
||||
+ BlockPosition piston = position.shift(data.get(BlockPistonExtension.FACING).opposite());
|
||||
+ this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(world, piston));
|
||||
+ } else if (block instanceof BlockBed) {
|
||||
+ if (data.get(BlockBed.PART) == BlockPropertyBedPart.FOOT) {
|
||||
+ // Restore head of bed
|
||||
+ BlockPosition head = position.shift(data.get(BlockBed.FACING));
|
||||
+ this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(world, head));
|
||||
+ // Restore other half of bed
|
||||
+ boolean foot = data.get(BlockBed.PART) == BlockPropertyBedPart.FOOT;
|
||||
+ BlockPosition otherBlock = position.shift(foot ? data.get(BlockBed.FACING) : data.get(BlockBed.FACING).opposite());
|
||||
+ this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(world, otherBlock));
|
||||
+
|
||||
+ TileEntity tileentity = this.world.getTileEntity(head);
|
||||
+ if (tileentity != null) {
|
||||
+ this.player.playerConnection.sendPacket(tileentity.getUpdatePacket());
|
||||
+ }
|
||||
+ TileEntity tileentity = this.world.getTileEntity(otherBlock);
|
||||
+ if (tileentity != null) {
|
||||
+ this.player.playerConnection.sendPacket(tileentity.getUpdatePacket());
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
|
Loading…
Reference in New Issue
Block a user