Skip to content

Commit

Permalink
1.20.2 update
Browse files Browse the repository at this point in the history
  • Loading branch information
sofianedjerbi committed Sep 30, 2023
1 parent c2b7aec commit 2223418
Show file tree
Hide file tree
Showing 45 changed files with 223 additions and 222 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import io.papermc.paperweight.util.constants.*
plugins {
java
id("com.github.johnrengelman.shadow") version "8.1.1"
id("io.papermc.paperweight.patcher") version "1.5.4"
id("io.papermc.paperweight.patcher") version "1.5.6"
}

allprojects {
Expand Down Expand Up @@ -85,7 +85,7 @@ tasks.register("foliaRefLatest") {
)

val foliaLatestCommitJson = layout.cache.resolve("foliaLatestCommit.json");
download.get().download("https://api.github.com/repos/PaperMC/Folia/commits/master", foliaLatestCommitJson);
download.get().download("https://api.github.com/repos/PaperMC/Folia/commits/dev/1.20.2", foliaLatestCommitJson);
val foliaLatestCommit = gson.fromJson<paper.libs.com.google.gson.JsonObject>(foliaLatestCommitJson)["sha"].asString;

copy {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ group = dev.kaiijumc.kaiiju
version = 1.20.1-R0.1-SNAPSHOT
mcVersion = 1.20.1

foliaRef = edafbcef6884cffe493e62cd71f4957708fba7ff
foliaRef = cdf356915b9051a6a895e53f663f24afb05c04a2

org.gradle.caching=true
org.gradle.parallel=true
Expand Down
18 changes: 9 additions & 9 deletions patches/server/0001-Rebranding.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Rebranding


diff --git a/build.gradle.kts b/build.gradle.kts
index 9ee90bc753e65f9dd532f28ec75cc16bf16486c8..4ce50523b1d5f2110fa873f4d3cfc9839ad606c7 100644
index 521ff85fcf10fc85fe706d6fa3778e0569551829..2af41a9a1d64502046e1e714802a7b95abfd149b 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -14,7 +14,7 @@ val alsoShade: Configuration by configurations.creating
Expand Down Expand Up @@ -119,7 +119,7 @@ index c5d5648f4ca603ef2b1df723b58f9caf4dd3c722..1c7b5d91e914efbcfb50c6137c776078
.completer(new ConsoleCommandCompleter(this.server))
.option(LineReader.Option.COMPLETE_IN_WORD, true);
diff --git a/src/main/java/net/minecraft/CrashReport.java b/src/main/java/net/minecraft/CrashReport.java
index abe37c7c3c6f5ab73afd738ec78f06d7e4d2ed96..52fc6bb99f6024273c7438d01314b576da66bd1a 100644
index 1d714d3eff11ed14f218656008190017494d4830..d39859f19afc4372999782a209f3836c6397f6d2 100644
--- a/src/main/java/net/minecraft/CrashReport.java
+++ b/src/main/java/net/minecraft/CrashReport.java
@@ -125,7 +125,7 @@ public class CrashReport {
Expand All @@ -132,10 +132,10 @@ index abe37c7c3c6f5ab73afd738ec78f06d7e4d2ed96..52fc6bb99f6024273c7438d01314b576
stringbuilder.append(CrashReport.DATE_TIME_FORMATTER.format(ZonedDateTime.now()));
stringbuilder.append("\n");
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 75eb95c330d6ab7ac1e4a69da13695bbd40f894e..a6f1068884669cfedfe8df40506b011b8b411489 100644
index f9cf331202d0768a054e575c8909369920b3d59f..356f1fd44df5a9cf77655f788650415cadab53e1 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -994,7 +994,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -982,7 +982,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
shutdownThread = Thread.currentThread();
org.spigotmc.WatchdogThread.doStop(); // Paper
if (false && !isSameThread()) { // Folia - region threading
Expand All @@ -144,7 +144,7 @@ index 75eb95c330d6ab7ac1e4a69da13695bbd40f894e..a6f1068884669cfedfe8df40506b011b
while (this.getRunningThread().isAlive()) {
this.getRunningThread().stop();
try {
@@ -1811,7 +1811,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1816,7 +1816,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa

@DontObfuscate
public String getServerModName() {
Expand All @@ -154,10 +154,10 @@ index 75eb95c330d6ab7ac1e4a69da13695bbd40f894e..a6f1068884669cfedfe8df40506b011b

public SystemReport fillSystemReport(SystemReport details) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index a8bf1f542ab20eb7c40c80b5e42b55982677373d..a96f743e479a05d3240884a3c0e871caec573bbe 100644
index 249ff636a40f6493444a6ea8b8a5e017cb2c30eb..c750e9ea6576877473a3b82b7ab558e58017e172 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -265,7 +265,7 @@ import javax.annotation.Nullable; // Paper
@@ -267,7 +267,7 @@ import javax.annotation.Nullable; // Paper
import javax.annotation.Nonnull; // Paper

public final class CraftServer implements Server {
Expand All @@ -167,7 +167,7 @@ index a8bf1f542ab20eb7c40c80b5e42b55982677373d..a96f743e479a05d3240884a3c0e871ca
private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft");
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index d2ab898c0f3902f5f0f9847232dac244b4095854..7c918d99c8629da0ef4242f0b6a1778a0fd696b6 100644
index 28062755016008d0796676119fdd53d4a3947e20..b4d25d15797d37e644e85c5d2ba6211434a1ecbe 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -920,7 +920,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
Expand Down Expand Up @@ -206,7 +206,7 @@ index e9b6ca3aa25e140467ae866d572483050ea3fa0e..5df2b0fceebaaa863f4f143c8f29e808

if (stream != null) {
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index 98fba0288be9ed2cb18ffba5cf81148157dd4fcf..9c1477cfa1a8074c4b3b8a365bb03c44eaa62972 100644
index 50c72e5db369a180f425eaaa0411cb8871bc3463..c556a1368ca089aad9d7f2f422924fea140e728d 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -155,14 +155,14 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
Expand Down
18 changes: 9 additions & 9 deletions patches/server/0002-Empty-configuration.patch
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ index 0000000000000000000000000000000000000000..6fac162e0ec057af9f3336314d566355
+}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index c5dfd99a38a79fd19a2bf85fa297a28e40612b51..99b3db382a164fbe3afddb08f5317d463ceda765 100644
index a9fe3d1c0fc217bd32e884c9e75c906d8b4bf967..dcf8fd8ab06b10ecffae7332bc7e1a941b6a27a1 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -218,6 +218,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
Expand All @@ -430,7 +430,7 @@ index c5dfd99a38a79fd19a2bf85fa297a28e40612b51..99b3db382a164fbe3afddb08f5317d46
io.papermc.paper.brigadier.PaperBrigadierProviderImpl.INSTANCE.getClass(); // init PaperBrigadierProvider
// Paper end
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 916df0c8d263f90e04564c5f512fd5ed5eaaa6d5..5ffe01a20e929554b4bde0b6d453472261686f54 100644
index f9641a54b2d1f2eed2a48323cfa6cdd67dafdf00..5e8de481f951c9424c25388ab5c4be6536d09326 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -166,6 +166,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
Expand All @@ -442,7 +442,7 @@ index 916df0c8d263f90e04564c5f512fd5ed5eaaa6d5..5ffe01a20e929554b4bde0b6d4534722
public final co.aikar.timings.WorldTimingsHandler timings; // Paper
public static BlockPos lastPhysicsProblem; // Spigot
private org.spigotmc.TickLimiter entityLimiter;
@@ -293,6 +295,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -230,6 +232,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
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
Expand All @@ -451,34 +451,34 @@ index 916df0c8d263f90e04564c5f512fd5ed5eaaa6d5..5ffe01a20e929554b4bde0b6d4534722
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);

diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index a96f743e479a05d3240884a3c0e871caec573bbe..3167ef56973578bdeeee96d545b81d41629fe994 100644
index c750e9ea6576877473a3b82b7ab558e58017e172..d5599d0073f694ca33f75c21682477335c54f6bc 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1098,6 +1098,7 @@ public final class CraftServer implements Server {
@@ -1080,6 +1080,7 @@ public final class CraftServer implements Server {

org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
this.console.paperConfigurations.reloadConfigs(this.console);
+ dev.kaiijumc.kaiiju.KaiijuConfig.init((File) console.options.valueOf("kaiiju-settings")); // Kaiiju
for (ServerLevel world : this.console.getAllLevels()) {
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters, config.spawnAnimals); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean))
@@ -1113,6 +1114,7 @@ public final class CraftServer implements Server {
@@ -1095,6 +1096,7 @@ public final class CraftServer implements Server {
}
}
world.spigotConfig.init(); // Spigot
+ world.kaiijuConfig.init(); // Kaiiju
}

Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
@@ -1128,6 +1130,7 @@ public final class CraftServer implements Server {
@@ -1110,6 +1112,7 @@ public final class CraftServer implements Server {
this.reloadData();
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper
+ dev.kaiijumc.kaiiju.KaiijuConfig.registerCommands(); // Kaiiju
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");

@@ -2975,6 +2978,13 @@ public final class CraftServer implements Server {
@@ -2957,6 +2960,13 @@ public final class CraftServer implements Server {
return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
}

Expand All @@ -493,7 +493,7 @@ index a96f743e479a05d3240884a3c0e871caec573bbe..3167ef56973578bdeeee96d545b81d41
public void restart() {
org.spigotmc.RestartCommand.restart();
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 776b7fc26fe96b69be260bbd36efae147d988640..a090c16d53fcb220687a18aa37ca82663f4660c7 100644
index e7746952417a3ca4ea97103e38568db42039f717..ee9b4515cab3b9e1df73b01cb6246f283fba1eaf 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -173,6 +173,14 @@ public class Main {
Expand Down
6 changes: 3 additions & 3 deletions patches/server/0003-Region-format-configuration.patch
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ index 0000000000000000000000000000000000000000..7164d9cd03186f0657783f83de3d6435
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index a6f1068884669cfedfe8df40506b011b8b411489..7243443d4bf24ad0b32b8a76d9b8701cca8612a7 100644
index 356f1fd44df5a9cf77655f788650415cadab53e1..84242c7cdbeccda4c9a23e0376daf80ce221e504 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -892,7 +892,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -880,7 +880,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Paper start - rewrite chunk system
worldserver.save((ProgressListener) null, flush, worldserver.noSave && !force, close);
if (flush) {
Expand All @@ -94,7 +94,7 @@ index a6f1068884669cfedfe8df40506b011b8b411489..7243443d4bf24ad0b32b8a76d9b8701c
}
// Paper end - rewrite chunk system
}
@@ -916,7 +916,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -904,7 +904,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
//MinecraftServer.LOGGER.info("ThreadedAnvilChunkStorage ({}): All chunks are saved", worldserver2.getChunkSource().chunkMap.getStorageName()); // Paper - move up
}

Expand Down
Loading

0 comments on commit 2223418

Please sign in to comment.