mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-19 01:17:42 +01:00
Updated Upstream (Paper & Pufferfish)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@e4f5e1c Bump netty Pufferfish Changes: pufferfish-gg/Pufferfish@a8543a4 #33 Fix anti-xray related crash bug pufferfish-gg/Pufferfish@aefcb1a Updated Upstream (Paper)
This commit is contained in:
@@ -20,7 +20,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index eefbd0a742b5875e0e9826b87c6bd4da66b2d7f7..4f01bbc22b2e94d5415c36c8cd828e0551e929aa 100644
|
||||
index 68b8f275f9c9e77a949ca29749a05b469bcdb910..a4a146d9c3e07bdf941d81147ca31daf4689a687 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -9,8 +9,12 @@ plugins {
|
||||
@@ -38,7 +38,7 @@ index eefbd0a742b5875e0e9826b87c6bd4da66b2d7f7..4f01bbc22b2e94d5415c36c8cd828e05
|
||||
// Paper start
|
||||
implementation("org.jline:jline-terminal-jansi:3.21.0")
|
||||
implementation("net.minecrell:terminalconsoleappender:1.3.0")
|
||||
@@ -44,12 +48,28 @@ dependencies {
|
||||
@@ -44,6 +48,14 @@ dependencies {
|
||||
runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3")
|
||||
runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.7.3")
|
||||
|
||||
@@ -53,6 +53,7 @@ index eefbd0a742b5875e0e9826b87c6bd4da66b2d7f7..4f01bbc22b2e94d5415c36c8cd828e05
|
||||
testImplementation("io.github.classgraph:classgraph:4.8.47") // Paper - mob goal test
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
testImplementation("org.hamcrest:hamcrest-library:1.3")
|
||||
@@ -52,6 +64,14 @@ dependencies {
|
||||
}
|
||||
|
||||
val craftbukkitPackageVersion = "1_19_R1" // Paper
|
||||
@@ -67,7 +68,7 @@ index eefbd0a742b5875e0e9826b87c6bd4da66b2d7f7..4f01bbc22b2e94d5415c36c8cd828e05
|
||||
tasks.jar {
|
||||
archiveClassifier.set("dev")
|
||||
|
||||
@@ -62,7 +82,7 @@ tasks.jar {
|
||||
@@ -64,7 +84,7 @@ tasks.jar {
|
||||
attributes(
|
||||
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
||||
"Implementation-Title" to "CraftBukkit",
|
||||
@@ -2415,7 +2416,7 @@ index 3b144c820531122eb37d41be06c182b5f5dc0724..1eb912ad97f9663bf6bd336ad739f255
|
||||
this.wasOnGround = this.entity.isOnGround();
|
||||
this.teleportDelay = 0;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 0dc7a827aeacc7fae53b1f975f45883da7db6a0c..b0cd9d5ec1a36af1710ebffb420e29a898e27bc8 100644
|
||||
index 0dc7a827aeacc7fae53b1f975f45883da7db6a0c..8043a1aa9d785c78e220ea54a6ffa7388f2d501e 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -689,7 +689,20 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2445,7 +2446,7 @@ index 0dc7a827aeacc7fae53b1f975f45883da7db6a0c..b0cd9d5ec1a36af1710ebffb420e29a8
|
||||
// Paper start - optimise random block ticking
|
||||
private final BlockPos.MutableBlockPos chunkTickMutablePosition = new BlockPos.MutableBlockPos();
|
||||
- private final io.papermc.paper.util.math.ThreadUnsafeRandom randomTickRandom = new io.papermc.paper.util.math.ThreadUnsafeRandom();
|
||||
+ private final io.papermc.paper.util.math.ThreadUnsafeRandom randomTickRandom = new io.papermc.paper.util.math.ThreadUnsafeRandom(); public net.minecraft.util.RandomSource getThreadUnsafeRandom() { return this.randomTickRandom; } // Pufferfish - getter
|
||||
+ // private final io.papermc.paper.util.math.ThreadUnsafeRandom randomTickRandom = new io.papermc.paper.util.math.ThreadUnsafeRandom(); // Pufferfish - moved to super
|
||||
// Paper end
|
||||
|
||||
+ private int currentIceAndSnowTick = 0; protected void resetIceAndSnowTick() { this.currentIceAndSnowTick = this.randomTickRandom.nextInt(16); } // Pufferfish
|
||||
@@ -3449,13 +3450,15 @@ index 468c635d31cfa8051666bbefce8df4b448e9ed93..17e869074b8cf29a8c3280499a27e951
|
||||
final String id;
|
||||
private final GameRules.Category category;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index d59dea221ba0f1b9c14f403d3c6ea61b2c454316..683ab88e76b53331e5d9fbcb0e1ee65365008693 100644
|
||||
index d59dea221ba0f1b9c14f403d3c6ea61b2c454316..e845d4af797b8eeb75ab094e1cb1062c7ab2d8b9 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -272,6 +272,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -272,6 +272,17 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
||||
public abstract ResourceKey<LevelStem> getTypeKey();
|
||||
|
||||
+ protected final io.papermc.paper.util.math.ThreadUnsafeRandom randomTickRandom = new io.papermc.paper.util.math.ThreadUnsafeRandom(); public net.minecraft.util.RandomSource getThreadUnsafeRandom() { return this.randomTickRandom; } // Pufferfish - move thread unsafe random initialization // Pufferfish - getter
|
||||
+
|
||||
+ // Pufferfish start - ensure these get inlined
|
||||
+ private final int minBuildHeight, minSection, height, maxBuildHeight, maxSection;
|
||||
+ @Override public final int getMaxBuildHeight() { return this.maxBuildHeight; }
|
||||
@@ -3468,7 +3471,7 @@ index d59dea221ba0f1b9c14f403d3c6ea61b2c454316..683ab88e76b53331e5d9fbcb0e1ee653
|
||||
protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, 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
|
||||
@@ -294,6 +303,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -294,6 +305,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
});
|
||||
final DimensionType dimensionmanager = (DimensionType) holder.value();
|
||||
|
||||
@@ -3482,7 +3485,7 @@ index d59dea221ba0f1b9c14f403d3c6ea61b2c454316..683ab88e76b53331e5d9fbcb0e1ee653
|
||||
this.dimension = resourcekey;
|
||||
this.isClientSide = flag;
|
||||
if (dimensionmanager.coordinateScale() != 1.0D) {
|
||||
@@ -410,6 +426,91 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -410,6 +428,91 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -3574,7 +3577,7 @@ index d59dea221ba0f1b9c14f403d3c6ea61b2c454316..683ab88e76b53331e5d9fbcb0e1ee653
|
||||
public boolean isInWorldBounds(BlockPos pos) {
|
||||
return pos.isInsideBuildHeightAndWorldBoundsHorizontal(this); // Paper - use better/optimized check
|
||||
}
|
||||
@@ -897,13 +998,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -897,13 +1000,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
try {
|
||||
tickConsumer.accept(entity);
|
||||
MinecraftServer.getServer().executeMidTickTasks(); // Paper - execute chunk tasks mid tick
|
||||
@@ -3590,7 +3593,7 @@ index d59dea221ba0f1b9c14f403d3c6ea61b2c454316..683ab88e76b53331e5d9fbcb0e1ee653
|
||||
// Paper end
|
||||
}
|
||||
}
|
||||
@@ -1389,6 +1490,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -1389,6 +1492,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
}
|
||||
|
||||
public ProfilerFiller getProfiler() {
|
||||
|
||||
Reference in New Issue
Block a user