mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
Updated Upstream (Paper & Tuinity)
Upstream has released updates that appear to apply and compile correctly Paper Changes: 02fbcbc Add reobf mappings patch for LevelChunk#level (CraftBukkit changes type) (#6079) 2641b91 Also deobfuscate secondary stacktraces in crash reports (#6078) cc063e1 Fix incorrect variable usage in per-player mob spawning patch (#6077) Tuinity Changes: 4867bfb Use correct y value for snow/ice formation 361be02 Update paper
This commit is contained in:
@@ -10806,7 +10806,7 @@ index 9fe60d058ea1702930981dbd06093dc594e6bf8e..2dd5909a08a8d4bc250b36d297ef9f3f
|
||||
}
|
||||
}).exceptionally((throwable) -> {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 7f7bc04a30a0422b2d589adb488082c0aa5326dc..1430411a6f7ef3730d87c022774d7d623f2f415f 100644
|
||||
index 6ed95a0cff3e9c874f14bc90283f750e15765c67..c44faf838c0bc7da480afe0f5ccedcaf8d0fea91 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -103,6 +103,7 @@ import org.apache.logging.log4j.LogManager;
|
||||
@@ -12218,7 +12218,7 @@ index 44aa0c4ec6f0e4df2541c74fa7de852dae59bda5..a00627e0fa38632449042f59c053b4da
|
||||
if (flag2) {
|
||||
packet1 = new ClientboundMoveEntityPacket.Pos(this.entity.getId(), (short) ((int) k), (short) ((int) l), (short) ((int) i1), this.entity.isOnGround());
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 8154ca39ec7e2e8559cd125d73a59b8d2b00714c..07b0eae123e310809dc28506ebe2e0878dcaa224 100644
|
||||
index 8154ca39ec7e2e8559cd125d73a59b8d2b00714c..a83b4e9b6b5bd6a57d4bc2f1cdc78ffb7e7d2fdd 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -115,6 +115,7 @@ import net.minecraft.world.level.block.EntityBlock;
|
||||
@@ -12513,7 +12513,7 @@ index 8154ca39ec7e2e8559cd125d73a59b8d2b00714c..07b0eae123e310809dc28506ebe2e087
|
||||
if (this.isRainingAt(blockposition)) {
|
||||
DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition);
|
||||
boolean flag1 = this.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && this.random.nextDouble() < (double) difficultydamagescaler.getEffectiveDifficulty() * paperConfig.skeleHorseSpawnChance && !this.getBlockState(blockposition.below()).is(Blocks.LIGHTNING_ROD); // Paper
|
||||
@@ -729,64 +915,76 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
|
||||
@@ -729,64 +915,78 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
|
||||
}
|
||||
|
||||
gameprofilerfiller.popPush("iceandsnow");
|
||||
@@ -12523,7 +12523,7 @@ index 8154ca39ec7e2e8559cd125d73a59b8d2b00714c..07b0eae123e310809dc28506ebe2e087
|
||||
+ if (!this.paperConfig.disableIceAndSnow && this.randomTickRandom.nextInt(16) == 0) { // Paper - Disable ice and snow // Paper - optimise random ticking
|
||||
+ // Paper start - optimise chunk ticking
|
||||
+ this.getRandomBlockPosition(j, 0, k, 15, blockposition);
|
||||
+ int normalY = chunk.getHeight(Heightmap.Types.MOTION_BLOCKING, blockposition.getX() & 15, blockposition.getZ() & 15);
|
||||
+ int normalY = chunk.getHeight(Heightmap.Types.MOTION_BLOCKING, blockposition.getX() & 15, blockposition.getZ() & 15) + 1;
|
||||
+ int downY = normalY - 1;
|
||||
+ blockposition.setY(normalY);
|
||||
+ // Paper end
|
||||
@@ -12547,9 +12547,11 @@ index 8154ca39ec7e2e8559cd125d73a59b8d2b00714c..07b0eae123e310809dc28506ebe2e087
|
||||
- BlockState iblockdata = this.getBlockState(blockposition1);
|
||||
+ blockposition.setY(downY); // Paper
|
||||
+ BlockState iblockdata = this.getBlockState(blockposition); // Paper
|
||||
+ blockposition.setY(normalY); // Paper
|
||||
Biome.Precipitation biomebase_precipitation = this.getBiome(blockposition).getPrecipitation();
|
||||
|
||||
- if (biomebase_precipitation == Biome.Precipitation.RAIN && biomebase.isColdEnoughToSnow(blockposition1)) {
|
||||
+ blockposition.setY(downY); // Paper
|
||||
+ if (biomebase_precipitation == Biome.Precipitation.RAIN && biomebase.isColdEnoughToSnow(blockposition)) { // Paper
|
||||
biomebase_precipitation = Biome.Precipitation.SNOW;
|
||||
}
|
||||
@@ -12622,7 +12624,7 @@ index 8154ca39ec7e2e8559cd125d73a59b8d2b00714c..07b0eae123e310809dc28506ebe2e087
|
||||
timings.chunkTicksBlocks.stopTiming(); // Paper
|
||||
gameprofilerfiller.pop();
|
||||
}
|
||||
@@ -912,7 +1110,26 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
|
||||
@@ -912,7 +1112,26 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
|
||||
|
||||
}
|
||||
|
||||
@@ -12649,7 +12651,7 @@ index 8154ca39ec7e2e8559cd125d73a59b8d2b00714c..07b0eae123e310809dc28506ebe2e087
|
||||
++TimingHistory.entityTicks; // Paper - timings
|
||||
// Spigot start
|
||||
co.aikar.timings.Timing timer; // Paper
|
||||
@@ -953,7 +1170,13 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
|
||||
@@ -953,7 +1172,13 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
|
||||
}
|
||||
|
||||
// } finally { timer.stopTiming(); } // Paper - timings - move up
|
||||
@@ -12664,7 +12666,7 @@ index 8154ca39ec7e2e8559cd125d73a59b8d2b00714c..07b0eae123e310809dc28506ebe2e087
|
||||
}
|
||||
|
||||
private void tickPassenger(Entity vehicle, Entity passenger) {
|
||||
@@ -1245,9 +1468,13 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
|
||||
@@ -1245,9 +1470,13 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
|
||||
// Spigot Start
|
||||
for (BlockEntity tileentity : chunk.getBlockEntities().values()) {
|
||||
if (tileentity instanceof net.minecraft.world.Container) {
|
||||
@@ -12680,10 +12682,10 @@ index 8154ca39ec7e2e8559cd125d73a59b8d2b00714c..07b0eae123e310809dc28506ebe2e087
|
||||
}
|
||||
// Spigot End
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 935b22199ebdf84db591f8442e0506d8fcc92e02..217af30c81438836864312e125cf512b491a3ab4 100644
|
||||
index a0acaac510aa2206a5c58f2b7aafdbc2bdf7a3dd..0da2dbeba93d428a035872e05177ed3fc29acf9b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -255,7 +255,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -260,7 +260,7 @@ public class ServerPlayer extends Player {
|
||||
|
||||
public double lastEntitySpawnRadiusSquared; // Paper - optimise isOutsideRange, this field is in blocks
|
||||
public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<ServerPlayer> cachedSingleHashSet; // Paper
|
||||
@@ -12692,7 +12694,7 @@ index 935b22199ebdf84db591f8442e0506d8fcc92e02..217af30c81438836864312e125cf512b
|
||||
public org.bukkit.event.player.PlayerQuitEvent.QuitReason quitReason = null; // Paper - there are a lot of changes to do if we change all methods leading to the event
|
||||
|
||||
public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile) {
|
||||
@@ -418,7 +418,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -423,7 +423,7 @@ public class ServerPlayer extends Player {
|
||||
|
||||
if (blockposition1 != null) {
|
||||
this.moveTo(blockposition1, 0.0F, 0.0F);
|
||||
@@ -12701,7 +12703,7 @@ index 935b22199ebdf84db591f8442e0506d8fcc92e02..217af30c81438836864312e125cf512b
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -426,7 +426,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -431,7 +431,7 @@ public class ServerPlayer extends Player {
|
||||
} else {
|
||||
this.moveTo(blockposition, 0.0F, 0.0F);
|
||||
|
||||
@@ -12710,7 +12712,7 @@ index 935b22199ebdf84db591f8442e0506d8fcc92e02..217af30c81438836864312e125cf512b
|
||||
this.setPos(this.getX(), this.getY() + 1.0D, this.getZ());
|
||||
}
|
||||
}
|
||||
@@ -1557,6 +1557,18 @@ public class ServerPlayer extends Player {
|
||||
@@ -1562,6 +1562,18 @@ public class ServerPlayer extends Player {
|
||||
this.connection.send(new ClientboundContainerClosePacket(this.containerMenu.containerId));
|
||||
this.doCloseContainer();
|
||||
}
|
||||
@@ -14480,7 +14482,7 @@ index 17281575ff83bbf1e720335619a78a6d0a0e5077..38753e10b1597a2f3bd2cde208c6e30b
|
||||
|
||||
public boolean noSave() {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
index 55b937f802ee7066cb13b9a497932038b2905ff0..b2329de658df71ce03a6fe0c41c02997afdf868f 100644
|
||||
index 31fbcf6a35b902ce80c0a5a23dabb8ec3d8cbdfc..0059f0488acc22ebddc2faf4c5879f9f0c24fd14 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
@@ -262,7 +262,7 @@ public final class NaturalSpawner {
|
||||
|
||||
Reference in New Issue
Block a user