mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 07:48:53 +01:00
ea855e2b46
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Developers!: You will need to clean up your work/Minecraft/1.13.2 folder for this Also, restore a patch that was dropped in the last upstream Bukkit Changes: 279eeab3 Fix command description not being set 96e2bb18 Remove debug print from SyntheticEventTest CraftBukkit Changes:d3ed1516
Fix dangerously threaded beacons217a293d
Don't relocate joptsimple to allow --help to work.1be05a21
Prepare for imminent Java 12 releasea49270b2
Mappings Update5259d80c
SPIGOT-4669: Fix PlayerTeleportEvent coordinates for relative teleports Spigot Changes: e6eb36f2 Rebuild patches
33 lines
1.3 KiB
Diff
33 lines
1.3 KiB
Diff
From 8a5e07c9519d35e5ac82330c9d68f08b40f569c3 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Fri, 28 Sep 2018 22:27:33 -0400
|
|
Subject: [PATCH] Don't recheck type after setting a block
|
|
|
|
The server does a "Did my update succeed" check after setting
|
|
a blocks data to a chunk.
|
|
|
|
However, writes can not fail outside of a hard error or a
|
|
a race condition from multiple threads writing, which is
|
|
not something that should ever occur on the server.
|
|
|
|
So this check is pointless, as if it did occur, the server would
|
|
be having data corruption issues anyways.
|
|
|
|
This provides a small boost to all setType calls.
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
|
index fdf062b8b..d848a97bd 100644
|
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
|
@@ -558,7 +558,7 @@ public class Chunk implements IChunkAccess {
|
|
this.world.n(blockposition);
|
|
}
|
|
|
|
- if (chunksection.getType(i, j & 15, k).getBlock() != block) {
|
|
+ if (false && chunksection.getType(i, j & 15, k).getBlock() != block) { // Paper - don't need to recheck this - this would only fail due to non main thread writes which are not supported
|
|
return null;
|
|
} else {
|
|
if (flag1) {
|
|
--
|
|
2.21.0
|
|
|