mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-06 15:12:13 -07: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:
@@ -13,7 +13,7 @@ Update adjacent blocks of doors, double plants, pistons and beds
|
|||||||
when cancelling interaction.
|
when cancelling interaction.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
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
|
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||||
@@ -0,0 +0,0 @@ public class PlayerInteractManager {
|
@@ -0,0 +0,0 @@ public class PlayerInteractManager {
|
||||||
@@ -42,18 +42,17 @@ index e34198e40..620efb1ac 100644
|
|||||||
+ BlockPosition piston = position.shift(data.get(BlockPistonExtension.FACING).opposite());
|
+ BlockPosition piston = position.shift(data.get(BlockPistonExtension.FACING).opposite());
|
||||||
+ this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(world, piston));
|
+ this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(world, piston));
|
||||||
+ } else if (block instanceof BlockBed) {
|
+ } else if (block instanceof BlockBed) {
|
||||||
+ if (data.get(BlockBed.PART) == BlockPropertyBedPart.FOOT) {
|
+ // Restore other half of bed
|
||||||
+ // Restore head of bed
|
+ boolean foot = data.get(BlockBed.PART) == BlockPropertyBedPart.FOOT;
|
||||||
+ BlockPosition head = position.shift(data.get(BlockBed.FACING));
|
+ BlockPosition otherBlock = position.shift(foot ? data.get(BlockBed.FACING) : data.get(BlockBed.FACING).opposite());
|
||||||
+ this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(world, head));
|
+ this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(world, otherBlock));
|
||||||
+
|
+
|
||||||
+ TileEntity tileentity = this.world.getTileEntity(head);
|
+ TileEntity tileentity = this.world.getTileEntity(otherBlock);
|
||||||
+ if (tileentity != null) {
|
+ if (tileentity != null) {
|
||||||
+ this.player.playerConnection.sendPacket(tileentity.getUpdatePacket());
|
+ this.player.playerConnection.sendPacket(tileentity.getUpdatePacket());
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ }
|
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
+
|
||||||
public boolean breakBlock(BlockPosition blockposition) {
|
public boolean breakBlock(BlockPosition blockposition) {
|
||||||
|
Reference in New Issue
Block a user