ea0ec8c5a0
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: e9ce88b9 SPIGOT-6562: Add more specific sculk sensor event CraftBukkit Changes: d7ef1e91 SPIGOT-6558: Attempt to improve SkullMeta e7a63287 SPIGOT-6562: Add more specific sculk sensor event
32 Zeilen
1.9 KiB
Diff
32 Zeilen
1.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Trigary <trigary0@gmail.com>
|
|
Date: Sat, 27 Mar 2021 11:13:30 +0100
|
|
Subject: [PATCH] fix cancelling block falling causing client desync
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
|
index 2fad050547242028d4ff2deb613e074190f51341..3989ed1bd5c666aa7759ebc2c57a0d5f70d85838 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
|
@@ -119,8 +119,18 @@ public class FallingBlockEntity extends Entity {
|
|
|
|
if (this.time++ == 0) {
|
|
blockposition = this.blockPosition();
|
|
- if (this.level.getBlockState(blockposition).is(block) && !CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, Blocks.AIR.defaultBlockState()).isCancelled()) {
|
|
- this.level.removeBlock(blockposition, false);
|
|
+ // Paper start - fix cancelling block falling causing client desync
|
|
+ if (this.level.getBlockState(blockposition).is(block)) {
|
|
+ if (CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, Blocks.AIR.defaultBlockState()).isCancelled()) {
|
|
+ if (this.level.getBlockState(blockposition).is(block)) { //if listener didn't update the block
|
|
+ ((ServerLevel) level).getChunkSource().blockChanged(blockposition);
|
|
+ }
|
|
+ this.discard();
|
|
+ return;
|
|
+ } else {
|
|
+ this.level.setAir(blockposition, false);
|
|
+ }
|
|
+ // Paper end - fix cancelling block falling causing client desync
|
|
} else if (!this.level.isClientSide) {
|
|
this.discard();
|
|
return;
|