mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 17:07:43 +01:00
Updated Upstream (Paper & Pufferfish)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@44ee1cd fix recipe packet limiter (#9841) PaperMC/Paper@e57af7d sync netty version with vanilla (#9842) Pufferfish Changes: pufferfish-gg/Pufferfish@0020a8b Port a patch from upstream pufferfish-gg/Pufferfish@979d3a2 Update upstream (last 1.20.1) pufferfish-gg/Pufferfish@06262c1 Initial 1.20.2 update
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,67 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <blake.galbreath@gmail.com>
|
||||
Date: Sun, 12 Jun 2022 09:18:57 -0500
|
||||
Subject: [PATCH] Fix pufferfish issues
|
||||
|
||||
|
||||
diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
index 0dd3374468e05f7a312ba5856b9cf8a4787dfa59..960c0555a001fe63de78d77d5ea47d08a520d029 100644
|
||||
--- a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
+++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
@@ -224,7 +224,7 @@ public class PufferfishConfig {
|
||||
public static int activationDistanceMod;
|
||||
|
||||
private static void dynamicActivationOfBrains() throws IOException {
|
||||
- dearEnabled = getBoolean("dab.enabled", "activation-range.enabled", true);
|
||||
+ dearEnabled = getBoolean("dab.enabled", "activation-range.enabled", false); // Purpur
|
||||
startDistance = getInt("dab.start-distance", "activation-range.start-distance", 12,
|
||||
"This value determines how far away an entity has to be",
|
||||
"from the player to start being effected by DEAR.");
|
||||
@@ -268,7 +268,7 @@ public class PufferfishConfig {
|
||||
|
||||
public static boolean throttleInactiveGoalSelectorTick;
|
||||
private static void inactiveGoalSelectorThrottle() {
|
||||
- throttleInactiveGoalSelectorTick = getBoolean("inactive-goal-selector-throttle", "inactive-goal-selector-disable", true,
|
||||
+ throttleInactiveGoalSelectorTick = getBoolean("inactive-goal-selector-throttle", "inactive-goal-selector-disable", false, // Purpur
|
||||
"Throttles the AI goal selector in entity inactive ticks.",
|
||||
"This can improve performance by a few percent, but has minor gameplay implications.");
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index eac31c3fcc9161711328588ac852fcae1116d8ef..dbb59969cf55eda997588f4c3ef7dc899ea619bb 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -948,7 +948,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
// 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(); // Pufferfish - moved to super
|
||||
+ private final io.papermc.paper.util.math.ThreadUnsafeRandom randomTickRandom = new io.papermc.paper.util.math.ThreadUnsafeRandom(this.random.nextLong()); public net.minecraft.util.RandomSource getThreadUnsafeRandom() { return this.randomTickRandom; } // Pufferfish - moved to super // Purpur - dont break ABI
|
||||
// Paper end
|
||||
|
||||
private int currentIceAndSnowTick = 0; protected void resetIceAndSnowTick() { this.currentIceAndSnowTick = this.randomTickRandom.nextInt(16); } // Pufferfish
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 30d8ec75203adc677e5fb91d9538baf52a0684ad..5eca99fbd23ff0d35607bd185b011d6f9a30d0f0 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -273,7 +273,7 @@ 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(java.util.concurrent.ThreadLocalRandom.current().nextLong()); public net.minecraft.util.RandomSource getThreadUnsafeRandom() { return this.randomTickRandom; } // Pufferfish - move thread unsafe random initialization // Pufferfish - getter
|
||||
+ //protected final io.papermc.paper.util.math.ThreadUnsafeRandom randomTickRandom = new io.papermc.paper.util.math.ThreadUnsafeRandom(java.util.concurrent.ThreadLocalRandom.current().nextLong()); public net.minecraft.util.RandomSource getThreadUnsafeRandom() { return this.randomTickRandom; } // Pufferfish - move thread unsafe random initialization // Pufferfish - getter // Purpur - dont break ABI
|
||||
|
||||
// Pufferfish start - ensure these get inlined
|
||||
private final int minBuildHeight, minSection, height, maxBuildHeight, maxSection;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 3eeb1f0eac76efe9b7c24f6d5787018c7842d07a..dbb0593a6feb60216379bde6720ca16f3ca827ae 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -125,7 +125,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
this.blockTicks = blockTickScheduler;
|
||||
this.fluidTicks = fluidTickScheduler;
|
||||
|
||||
- this.lightningTick = this.level.getThreadUnsafeRandom().nextInt(100000) << 1; // Pufferfish - initialize lightning tick
|
||||
+ this.lightningTick = java.util.concurrent.ThreadLocalRandom.current().nextInt(100000) << 1; // Pufferfish - initialize lightning tick // Purpur - any random will do
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -1,56 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <blake.galbreath@gmail.com>
|
||||
Date: Sun, 12 Jun 2022 09:18:57 -0500
|
||||
Subject: [PATCH] Make pufferfish config relocatable
|
||||
|
||||
|
||||
diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
index 219fc5bbe7dfade0b3576e6e1e7e60e361fdee0f..3e36958365bc136516bafbaad0c168f7956406f1 100644
|
||||
--- a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
+++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
@@ -28,6 +28,7 @@ public class PufferfishConfig {
|
||||
|
||||
private static final YamlFile config = new YamlFile();
|
||||
private static int updates = 0;
|
||||
+ public static File pufferfishFile; // Purpur
|
||||
|
||||
private static ConfigurationSection convertToBukkit(org.simpleyaml.configuration.ConfigurationSection section) {
|
||||
ConfigurationSection newSection = new MemoryConfiguration();
|
||||
@@ -50,7 +51,7 @@ public class PufferfishConfig {
|
||||
}
|
||||
|
||||
public static void load() throws IOException {
|
||||
- File configFile = new File("pufferfish.yml");
|
||||
+ File configFile = pufferfishFile; // Purpur
|
||||
|
||||
if (configFile.exists()) {
|
||||
try {
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index fa258f1a15a93db0c3401397433b184938412a9b..41db72915baa4c02b11a701dfdde09b66ba72476 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -230,6 +230,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now
|
||||
io.papermc.paper.brigadier.PaperBrigadierProviderImpl.INSTANCE.getClass(); // init PaperBrigadierProvider
|
||||
// Paper end
|
||||
+ gg.pufferfish.pufferfish.PufferfishConfig.pufferfishFile = (java.io.File) options.valueOf("pufferfish-settings"); // Purpur
|
||||
gg.pufferfish.pufferfish.PufferfishConfig.load(); // Pufferfish
|
||||
gg.pufferfish.pufferfish.PufferfishCommand.init(); // Pufferfish
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 75e10acdab366deea1ff47274424aeae11173c8c..9a3374a1236164194ef0df43ed639296cbe1c731 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -179,6 +179,12 @@ public class Main {
|
||||
.ofType(File.class)
|
||||
.defaultsTo(new File("purpur.yml"))
|
||||
.describedAs("Yml file");
|
||||
+
|
||||
+ acceptsAll(asList("pufferfish", "pufferfish-settings"), "File for pufferfish settings")
|
||||
+ .withRequiredArg()
|
||||
+ .ofType(File.class)
|
||||
+ .defaultsTo(new File("pufferfish.yml"))
|
||||
+ .describedAs("Yml file");
|
||||
// Purpur end
|
||||
|
||||
// Paper start
|
||||
Reference in New Issue
Block a user