Skip to content

Commit

Permalink
well, a lot of patches from other cores
Browse files Browse the repository at this point in the history
  • Loading branch information
AltronMaxX committed Jan 4, 2024
1 parent 88c9a1d commit aa3b673
Show file tree
Hide file tree
Showing 37 changed files with 3,781 additions and 75 deletions.
10 changes: 5 additions & 5 deletions patches/server/0001-Rebranding.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ Subject: [PATCH] Rebranding


diff --git a/build.gradle.kts b/build.gradle.kts
index 03abea227c555decd559dd58b33913127f3549a4..d40372def97bd95a3de97cd9ea798586fab3634e 100644
index 38352926640d97449256d50ebdec619ce9e695a0..41d1bd344266ff4cf09b20169a5214fad8ce97da 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -28,7 +28,7 @@ repositories {
@@ -14,7 +14,7 @@ val alsoShade: Configuration by configurations.creating

dependencies {
extraRuntime(platform("net.kyori:adventure-bom:4.15.0-SNAPSHOT"))
// Folia start
- implementation(project(":folia-api"))
+ implementation(project(":foldenor-api"))
implementation("io.papermc.paper:paper-mojangapi:${project.version}") {
exclude("io.papermc.paper", "paper-api")
}
@@ -88,7 +88,7 @@ tasks.jar {
@@ -74,7 +74,7 @@ tasks.jar {
attributes(
"Main-Class" to "org.bukkit.craftbukkit.Main",
"Implementation-Title" to "CraftBukkit",
Expand Down Expand Up @@ -107,7 +107,7 @@ index 9ea861c1531c5f9d8a87e45512336eba3bddf06a..a5b75bfefadb58cd90559b6268a7e36b

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 bea388ced64da6192166f6f8461abdc0921ed7b0..e67a8fedc4a05685df1305eb0520f8a60af23294 100644
index 7d1be59d03fa4e46295bc91943fea16bd9c7c802..250942deaf337f5ea5838e02244c0e81ec16d33c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -264,7 +264,7 @@ import javax.annotation.Nullable; // Paper
Expand Down
12 changes: 6 additions & 6 deletions patches/server/0002-Feature-secure-seed.patch
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ index 1643186bcb2caf5d29fd551afd35830726dbb80a..df4c167f5bf07917012e5a586190725a
return GsonHelper.parse(!s1.isEmpty() ? s1 : "{}");
}, new JsonObject()), (String) this.get("level-type", (s1) -> {
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index d248c0492a34c11fb96c9dd6f0a3d180ee846c51..8d1df54524846409f92af3ab0f6e8c9186db136f 100644
index 88db5ada13329a5fe0d0fb652d2c8a8d561649e8..8082c189fc414b741bff9ca9b259b448e8adf0d2 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -46,6 +46,8 @@ import net.minecraft.world.level.levelgen.RandomState;
Expand All @@ -426,7 +426,7 @@ index d248c0492a34c11fb96c9dd6f0a3d180ee846c51..8d1df54524846409f92af3ab0f6e8c91

public class ServerChunkCache extends ChunkSource {

@@ -723,6 +725,7 @@ public class ServerChunkCache extends ChunkSource {
@@ -692,6 +694,7 @@ public class ServerChunkCache extends ChunkSource {
}

public ChunkGenerator getGenerator() {
Expand All @@ -435,7 +435,7 @@ index d248c0492a34c11fb96c9dd6f0a3d180ee846c51..8d1df54524846409f92af3ab0f6e8c91
}

diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 8cf413e42d560d90dfcbcb1d61ed410e992a8f4c..401bca7dd2aa59b067f23cc74043866f2d0ac68b 100644
index fdb5237935a13322d8e7332b199308513b9f8e9b..569f4d514b3249a3f025ff7ea7bc120586eaec58 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -179,6 +179,7 @@ import org.bukkit.event.world.GenericGameEvent;
Expand All @@ -446,7 +446,7 @@ index 8cf413e42d560d90dfcbcb1d61ed410e992a8f4c..401bca7dd2aa59b067f23cc74043866f

public class ServerLevel extends Level implements WorldGenLevel {

@@ -808,6 +809,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -813,6 +814,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
chunkgenerator = new org.bukkit.craftbukkit.generator.CustomChunkGenerator(this, chunkgenerator, gen);
}
// CraftBukkit end
Expand Down Expand Up @@ -506,7 +506,7 @@ index f7e5e016a7028a9196e689e950805b0d5b31fe38..7167cbd0ad37742fbe104508860c13e5
@Nullable
public abstract BlockState setBlockState(BlockPos pos, BlockState state, boolean moved);
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
index 1a4da589142c515e713d879095b105de4b913bd3..82e7c39e4e31a18d8d0cb9ec73988f13e343aee8 100644
index 9c868490f4f032871d9815bfe969d1530bc001ad..eb78a920f33df14146bd46753f1e01c6f39fe8e4 100644
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
@@ -76,6 +76,7 @@ import net.minecraft.world.level.levelgen.structure.placement.RandomSpreadStruct
Expand Down Expand Up @@ -831,7 +831,7 @@ index b6716f2b0037d12fb9956d7d1d0fab9b86cf4433..dd4b221c768dd17d48b27aa912081633

@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e67a8fedc4a05685df1305eb0520f8a60af23294..14816c699efd70b3e85bdcf6f32647f9db864c1b 100644
index 250942deaf337f5ea5838e02244c0e81ec16d33c..8917d0a0eb1f1298c0669465e5a15422876e62b8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -43,6 +43,9 @@ import java.util.logging.Logger;
Expand Down
6 changes: 3 additions & 3 deletions patches/server/0005-Add-config.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Add-config


diff --git a/build.gradle.kts b/build.gradle.kts
index d40372def97bd95a3de97cd9ea798586fab3634e..9fc2ad504d81e87ed7c004532927fcc5ebe60370 100644
index 41d1bd344266ff4cf09b20169a5214fad8ce97da..8f53706da0765ef2f4007b61cbb16b06b1b83ca0 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -226,9 +226,9 @@ val runtimeClasspathForRunDev = sourceSets.main.flatMap { src ->
@@ -212,9 +212,9 @@ val runtimeClasspathForRunDev = sourceSets.main.flatMap { src ->
elements.filterNot { file -> file.asFile.endsWith("minecraft.jar") }
}
}
Expand Down Expand Up @@ -236,7 +236,7 @@ index 12af517a7dd8c0bb2bc55ab3eb0e68a074011bb5..9846b7b28e06055a5dbfce6fceb466d1
io.papermc.paper.brigadier.PaperBrigadierProviderImpl.INSTANCE.getClass(); // init PaperBrigadierProvider
// Paper end
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 14816c699efd70b3e85bdcf6f32647f9db864c1b..c80b99d93786b9887607f377836629c3d88b1c07 100644
index 8917d0a0eb1f1298c0669465e5a15422876e62b8..eff1389ff4193addf0d519a7d696a4234c2df083 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -44,6 +44,7 @@ import java.util.stream.Collectors;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Use-thread-unsafe-random-for-mob-spawning


diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 401bca7dd2aa59b067f23cc74043866f2d0ac68b..857b7d321c0f76d502b402e710ea29e5814a608a 100644
index 569f4d514b3249a3f025ff7ea7bc120586eaec58..48cf475c5a5462039c72fe2c1c594cd0d3b9fa96 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1115,7 +1115,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1120,7 +1120,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
// Paper start - optimise random block ticking
private final ThreadLocal<BlockPos.MutableBlockPos> chunkTickMutablePosition = ThreadLocal.withInitial(() -> new BlockPos.MutableBlockPos()); // Folia - region threading
Expand All @@ -19,10 +19,10 @@ index 401bca7dd2aa59b067f23cc74043866f2d0ac68b..857b7d321c0f76d502b402e710ea29e5

public void tickChunk(LevelChunk chunk, int randomTickSpeed) {
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
index 5597312731216debdb7e7accc585e04719f32996..d4d8900d97d28925447ff07b67f8a24184bafa4b 100644
index 5caca2a34849189ea42d2699f6d8672e0d7251cb..554844feaf8cb0e43461e1c142bb766c6116fce9 100644
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
@@ -430,12 +430,12 @@ public final class NaturalSpawner {
@@ -429,12 +429,12 @@ public final class NaturalSpawner {
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Teleport-async-if-we-cannot-move-entity-off-main


diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 65ae803da6fa395c9ad031460fc76077da62aeec..07fc374f8b5c6c87219b50c24adf08862d48e7e3 100644
index 34724fd847a99349f13a6690d1abe27647bc80ca..e4031fc9b009fa1d4b0ac9936006d5abb98ae6c0 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1127,7 +1127,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -1126,7 +1126,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
}

Expand All @@ -26,7 +26,7 @@ index 65ae803da6fa395c9ad031460fc76077da62aeec..07fc374f8b5c6c87219b50c24adf0886
}

this.level().getProfiler().pop();
@@ -3981,13 +3990,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -3976,13 +3985,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
// check for same region
if (destination == this.level()) {
Vec3 currPos = this.position();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ index 35674f92a67f93382103c2766df4b678ba5c862f..59031762a31c80fc8f8773883c82a452
return lastPassengers.stream().filter((entity) -> {
return !passengers.contains(entity);
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 07fc374f8b5c6c87219b50c24adf08862d48e7e3..863800f5d4bee5ad322cf8100068f8d91a206428 100644
index e4031fc9b009fa1d4b0ac9936006d5abb98ae6c0..ce8c5354b0ebaeab77630d2caa61006274fe967d 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -24,6 +24,8 @@ import java.util.function.BiConsumer;
Expand All @@ -58,7 +58,7 @@ index 07fc374f8b5c6c87219b50c24adf08862d48e7e3..863800f5d4bee5ad322cf8100068f8d9
import net.minecraft.BlockUtil;
import net.minecraft.CrashReport;
import net.minecraft.CrashReportCategory;
@@ -4154,9 +4156,22 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -4149,9 +4151,22 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S

// the portal obsidian is placed at targetPos.y - 2, so if we want to place the entity
// on the obsidian, we need to spawn at targetPos.y - 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Force-kick-when-safety-kicking-failed


diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index fca4f9a50e57a2b40c7bca92d975b72da1075fa3..82b05e8c82c695bfd0f8011a2c3eb367adb6d284 100644
index a288ed0640bfe852677294398474510ab578577a..04d77bc43dd4c7089b09d3f4b8acef801ded11c1 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableSet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ index 0000000000000000000000000000000000000000..ad854d09999ce2bee9e48976eb79ef02
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index c80b99d93786b9887607f377836629c3d88b1c07..7ea7ac04b824cc8d76618fe69a0aa3446b5a797b 100644
index eff1389ff4193addf0d519a7d696a4234c2df083..d8b250e1c09cf8c3b5180ddb653ed9107cab929f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1117,6 +1117,7 @@ public final class CraftServer implements Server {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Redirect-getTPS-function-to-tegion-tps-or-return-20-tps


diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 7ea7ac04b824cc8d76618fe69a0aa3446b5a797b..4be9de7390640ab8648916199506fc4750b0c471 100644
index d8b250e1c09cf8c3b5180ddb653ed9107cab929f..518ade861db3ae1702898d1364dcfa363b191185 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -14,6 +14,9 @@ import com.mojang.brigadier.tree.CommandNode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ index 7b31c4ea6d01f936271bdadc3626201dcf32a683..b4dfd7a72c26bfde586c3cf854e7dfe6
loc.getX(), loc.getY(), loc.getZ()
);
diff --git a/src/main/java/net/minecraft/server/commands/TeleportCommand.java b/src/main/java/net/minecraft/server/commands/TeleportCommand.java
index 15c4fa89e1f1dbc80055f6f92904d1cc05a24dba..d81472a5f9aaa9dc7a6bd2eb5a968b153eba5a66 100644
index 2450885ef59ad32fbfadfe03f95f9ba24b8a6886..2b56c1ccdd2bbb86332002c769fb461c31855a60 100644
--- a/src/main/java/net/minecraft/server/commands/TeleportCommand.java
+++ b/src/main/java/net/minecraft/server/commands/TeleportCommand.java
@@ -32,6 +32,7 @@ import net.minecraft.world.entity.RelativeMovement;
Expand Down
Loading

0 comments on commit aa3b673

Please sign in to comment.