mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 19:37:35 +01:00
a2ad49b22f
Note to other developers: This commit may require you to wipe your workspace as a result of the changes to BD. --- work/BuildData Submodule work/BuildData f527a8ff..d56672db: > Mappings Update --- work/Bukkit Submodule work/Bukkit 0c1d258bb..db06c80d7: > Add list of entities to EntityTransformEvent > SPIGOT-4347: Add API to allow storing arbitrary values on ItemStacks ---work/CraftBukkit Submodule work/CraftBukkit 6a398ac44..068dab5be: > Enable optional source JAR shading via profile shadeSourcesJar > Use ImmutableList rather than AbstractList for CraftMetaBook > Fix setRecipes(List) not setting Knowledge Book recipes. > Mappings Update > Add list of entities to EntityTransformEvent & move die calls > SPIGOT-4347: Add API to allow storing arbitrary values on ItemStacks > Add Vanilla help to default permissions --- work/Spigot Submodule work/Spigot a1f2566f6..e769fe4d9: > Mappings Update > Rebuild patches
34 lines
1.3 KiB
Diff
34 lines
1.3 KiB
Diff
From a3996515e796f8e2daade8a978a59355a94f6629 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 b85a217fe..07bc23e28 100644
|
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
|
@@ -552,7 +552,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.19.2
|
|
|