9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-22 00:19:33 +00:00

Start 1.20

This commit is contained in:
violetc
2023-06-10 12:47:52 +08:00
parent 48d4542cc3
commit 6cbeac7802
50 changed files with 304 additions and 371 deletions

View File

@@ -6,10 +6,10 @@ Subject: [PATCH] Move ThreadUnsafeRandom Initialization
This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish)
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 816b531b9d2acfc5c3d6414cc5ad49d178f65f7f..dc1ba6e8e8c170681389c360fb5d33caa10bd734 100644
index 05e7c0986f1959ec16a6f81cf905744ac3df2f6a..b6ad64f0bed9459aa2ecb4f80b71653691a8359f 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -793,7 +793,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -934,7 +934,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
// Paper start - optimise random block ticking
private final BlockPos.MutableBlockPos chunkTickMutablePosition = new BlockPos.MutableBlockPos();
@@ -19,10 +19,10 @@ index 816b531b9d2acfc5c3d6414cc5ad49d178f65f7f..dc1ba6e8e8c170681389c360fb5d33ca
public void tickChunk(LevelChunk chunk, int randomTickSpeed) {
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 8cadc9655b8876ede4ec4d2b09198445b56fde29..844ebd772c1c0b9856069356e451084a1b771324 100644
index a0693f18c04eb11cf010700499b0302475bb7cd1..11d362ce8043966a7fce6c64849b7c080133fcbd 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -275,6 +275,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -274,6 +274,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public abstract ResourceKey<LevelStem> getTypeKey();
@@ -31,7 +31,7 @@ index 8cadc9655b8876ede4ec4d2b09198445b56fde29..844ebd772c1c0b9856069356e451084a
protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - Async-Anti-Xray - Pass executor
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper
@@ -365,6 +367,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -364,6 +366,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
this.chunkPacketBlockController = this.paperConfig().anticheat.antiXray.enabled ? new com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray(this, executor) : com.destroystokyo.paper.antixray.ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray
}