9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-19 15:09:25 +00:00

Updated Upstream (Gale/Purpur/Dependencies)

This commit is contained in:
Dreeam
2024-01-14 05:30:00 -05:00
parent 7563d699b3
commit 24eea0768f
27 changed files with 475 additions and 472 deletions

View File

@@ -10,13 +10,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Leaf repository
uses: actions/checkout@v3
uses: actions/checkout@main
with:
path: 'Leaf'
token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout Gale repository
uses: actions/checkout@v3
uses: actions/checkout@main
with:
path: 'Gale'
repository: "Dreeam-qwq/Gale"

View File

@@ -15,7 +15,7 @@ repositories {
}
dependencies {
remapper("net.fabricmc:tiny-remapper:0.9.0:fat")
remapper("net.fabricmc:tiny-remapper:0.10.0:fat")
decompiler("org.vineflower:vineflower:1.9.3")
paperclip("io.papermc:paperclip:3.0.4-SNAPSHOT")
}

View File

@@ -1,7 +1,7 @@
group = org.dreeam.leaf
version = 1.20.4-R0.1-SNAPSHOT
galeCommit = 993b4ec0aca9326ed9910c237d656673e83a3edb
galeCommit = d4340c647e85de9bdf5f29eb56b25e1b04fd1f66
org.gradle.caching = true
org.gradle.parallel = true

View File

@@ -7,14 +7,14 @@ Original license: GPL v3
Original project: https://github.com/pufferfish-gg/Pufferfish
diff --git a/build.gradle.kts b/build.gradle.kts
index 3f11b99f87eb380daeb1f660f63a8347958e1e0f..3f01a142439616c88c3b5da4d6cab80bfdaa2a76 100644
index 3f11b99f87eb380daeb1f660f63a8347958e1e0f..0d9531a62d7667b98a57bd6b8e627a3e2f105001 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -51,6 +51,7 @@ dependencies {
apiAndDocs("net.kyori:adventure-text-logger-slf4j")
api("org.apache.logging.log4j:log4j-api:$log4jVersion")
api("org.slf4j:slf4j-api:$slf4jVersion")
+ api("io.sentry:sentry:7.1.0") // Pufferfish
+ api("io.sentry:sentry:7.2.0") // Pufferfish
implementation("org.ow2.asm:asm:9.5")
implementation("org.ow2.asm:asm-commons:9.5")

View File

@@ -6,7 +6,7 @@ Subject: [PATCH] Purpur API Changes
Original license: MIT
Original project: https://github.com/PurpurMC/Purpur
Commit: 6f17a3da52ca57ed1647593b8b37e4306fff8b70
Commit: de54530c93353462042e18e37f791298257ce2f7
Patches below are removed in this patch:
Pufferfish-API-Changes.patch
@@ -956,10 +956,10 @@ index 58017fce436cdbda255f7172fbdadb726d4b113c..05600fc8bf2a61aca8094029bc4c208a
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index e68c71047b2bc1b456c380db25b3ff376852b4a9..6b025794c34e1b4b47b4b5ae1375705bdedad078 100644
index 47b0154928b3d36e2602da202df07defbcf82108..7498179f6df47008c4da6ad6d67b2ce16f49e7a6 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -1270,4 +1270,41 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
@@ -1276,4 +1276,41 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
void setBodyYaw(float bodyYaw);
// Paper end
@@ -1027,10 +1027,10 @@ index bc84b892cae5fe7019a3ad481e9da79956efa1fe..48eb5b00c460cccde29d327cef1d63fc
+ // Purpur end
}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 2238cbe3f7680e759baa8c91e4db6ad5202e3cab..32fc5a73c79858e31c3de45e16179714d3bea667 100644
index caa24af01ee57c8d1917818c1063d2fa75f1ae4a..5579fe9823d13be13d501cd0e3383b5763e2a4ed 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3545,4 +3545,123 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -3584,4 +3584,123 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@Override
Spigot spigot();
// Spigot end
@@ -1266,10 +1266,10 @@ index c9f395064656dd0126410eb3c6e197baa450c063..13156a12e5df50cdc1e465dc0bd9d941
* When a player gets bad omen after killing a patrol captain.
*/
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java
index 64e59fe706b0bb37fc2439fa88fd40c3167c9fb5..333ba8a730d01b6baa980f34aa03f3db90c8f255 100644
index daa1306a7324d946d66ad5a674bbc84371d8d4d6..f3b2d7b6fda051211add2b3215f120fb6911aeed 100644
--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java
+++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java
@@ -159,7 +159,7 @@ public enum InventoryType {
@@ -165,7 +165,7 @@ public enum InventoryType {
SMITHING_NEW(4, "Upgrade Gear"),
;
@@ -2063,10 +2063,10 @@ index cd3296fea01648592d2af89b3d80135acb6d0958..45797a6fbae1d8edc4211cb30def24ad
permissions.put(lname, new PermissionAttachmentInfo(parent, lname, attachment, value));
diff --git a/src/main/java/org/bukkit/potion/PotionEffect.java b/src/main/java/org/bukkit/potion/PotionEffect.java
index 037af5fd6d71a526c0e6620f2db0cd6df9625261..939ed1931492854c5854cab06730cf235eba7e89 100644
index c8ab330ef171795d08fa201cf8320703c7f1c66b..ea656ed39ebc9875f93f99bea274b0ea4456fcf5 100644
--- a/src/main/java/org/bukkit/potion/PotionEffect.java
+++ b/src/main/java/org/bukkit/potion/PotionEffect.java
@@ -32,12 +32,14 @@ public class PotionEffect implements ConfigurationSerializable {
@@ -33,6 +33,7 @@ public class PotionEffect implements ConfigurationSerializable {
private static final String AMBIENT = "ambient";
private static final String PARTICLES = "has-particles";
private static final String ICON = "has-icon";
@@ -2074,36 +2074,49 @@ index 037af5fd6d71a526c0e6620f2db0cd6df9625261..939ed1931492854c5854cab06730cf23
private final int amplifier;
private final int duration;
private final PotionEffectType type;
private final boolean ambient;
@@ -40,6 +41,7 @@ public class PotionEffect implements ConfigurationSerializable {
private final boolean particles;
private final boolean icon;
private final PotionEffect hiddenEffect; // Paper
+ @Nullable private final NamespacedKey key; // Purpur
/**
* Creates a potion effect.
@@ -50,6 +52,36 @@ public class PotionEffect implements ConfigurationSerializable {
@@ -50,11 +52,12 @@ public class PotionEffect implements ConfigurationSerializable {
* @param ambient the ambient status, see {@link PotionEffect#isAmbient()}
* @param particles the particle status, see {@link PotionEffect#hasParticles()}
* @param icon the icon status, see {@link PotionEffect#hasIcon()}
+ * @param key the namespacedKey, see {@link PotionEffect#getKey()}
* @param hiddenEffect the hidden PotionEffect
* @hidden Internal-- hidden effects are only shown internally
*/
@org.jetbrains.annotations.ApiStatus.Internal // Paper
- public PotionEffect(@NotNull PotionEffectType type, int duration, int amplifier, boolean ambient, boolean particles, boolean icon, @Nullable PotionEffect hiddenEffect) { // Paper
+ public PotionEffect(@NotNull PotionEffectType type, int duration, int amplifier, boolean ambient, boolean particles, boolean icon, @Nullable PotionEffect hiddenEffect, @Nullable NamespacedKey key) { // Paper // Purpur
Preconditions.checkArgument(type != null, "effect type cannot be null");
this.type = type;
this.duration = duration;
@@ -62,6 +65,7 @@ public class PotionEffect implements ConfigurationSerializable {
this.ambient = ambient;
this.particles = particles;
this.icon = icon;
+ this.key = key; // Purpur
// Paper start
this.hiddenEffect = hiddenEffect;
}
@@ -77,10 +81,28 @@ public class PotionEffect implements ConfigurationSerializable {
* @param icon the icon status, see {@link PotionEffect#hasIcon()}
*/
public PotionEffect(@NotNull PotionEffectType type, int duration, int amplifier, boolean ambient, boolean particles, boolean icon) {
- this(type, duration, amplifier, ambient, particles, icon, null);
+ this(type, duration, amplifier, ambient, particles, icon, null, null); // Purpur
// Paper end
}
+ // Purpur start
+ this(type, duration, amplifier, ambient, particles, icon, null);
+ }
+
+ /**
+ * Create a potion effect.
+ * @param duration measured in ticks, see {@link
+ * PotionEffect#getDuration()}
+ * @param amplifier the amplifier, see {@link PotionEffect#getAmplifier()}
+ * @param ambient the ambient status, see {@link PotionEffect#isAmbient()}
+ * @param particles the particle status, see {@link PotionEffect#hasParticles()}
+ * @param key the namespacedKey, see {@link PotionEffect#getKey()}
+ */
+ public PotionEffect(@NotNull PotionEffectType type, int duration, int amplifier, boolean ambient, boolean particles, @Nullable NamespacedKey key) {
+ this(type, duration, amplifier, ambient, particles, particles, key);
+ }
+
+ /**
+ * Creates a potion effect.
+ *
+ * @param type effect type
+ * @param duration measured in ticks, see {@link
+ * PotionEffect#getDuration()}
@@ -2114,24 +2127,19 @@ index 037af5fd6d71a526c0e6620f2db0cd6df9625261..939ed1931492854c5854cab06730cf23
+ * @param key the namespacedKey, see {@link PotionEffect#getKey()}
+ */
+ public PotionEffect(@NotNull PotionEffectType type, int duration, int amplifier, boolean ambient, boolean particles, boolean icon, @Nullable NamespacedKey key) {
+ this(type, duration, amplifier, ambient, particles, icon, null, key);
+ }
+ // Purpur end
Preconditions.checkArgument(type != null, "effect type cannot be null");
this.type = type;
this.duration = duration;
@@ -57,6 +89,7 @@ public class PotionEffect implements ConfigurationSerializable {
this.ambient = ambient;
this.particles = particles;
this.icon = icon;
+ this.key = key; // Purpur - add key
}
+
/**
@@ -104,36 +137,43 @@ public class PotionEffect implements ConfigurationSerializable {
* Creates a potion effect with no defined color.
*
@@ -126,33 +148,33 @@ public class PotionEffect implements ConfigurationSerializable {
* @param map the map to deserialize from
*/
public PotionEffect(@NotNull Map<String, Object> map) {
- this(getEffectType(map), getInt(map, DURATION), getInt(map, AMPLIFIER), getBool(map, AMBIENT, false), getBool(map, PARTICLES, true), getBool(map, ICON, getBool(map, PARTICLES, true)));
+ this(getEffectType(map), getInt(map, DURATION), getInt(map, AMPLIFIER), getBool(map, AMBIENT, false), getBool(map, PARTICLES, true), getBool(map, ICON, getBool(map, PARTICLES, true)), getKey(map)); // Purpur - getKey
- this(getEffectType(map), getInt(map, DURATION), getInt(map, AMPLIFIER), getBool(map, AMBIENT, false), getBool(map, PARTICLES, true), getBool(map, ICON, getBool(map, PARTICLES, true)), (PotionEffect) map.get(HIDDEN_EFFECT)); // Paper
+ this(getEffectType(map), getInt(map, DURATION), getInt(map, AMPLIFIER), getBool(map, AMBIENT, false), getBool(map, PARTICLES, true), getBool(map, ICON, getBool(map, PARTICLES, true)), (PotionEffect) map.get(HIDDEN_EFFECT), getKey(map)); // Paper // Purpur - getKey
}
// Paper start
@@ -2165,6 +2173,10 @@ index 037af5fd6d71a526c0e6620f2db0cd6df9625261..939ed1931492854c5854cab06730cf23
- return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon);
+ return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon, key); // Purpur - add key
}
/**
@@ -169,6 +191,13 @@ public class PotionEffect implements ConfigurationSerializable {
}
// Paper end
+ // Purpur start
@@ -2177,7 +2189,7 @@ index 037af5fd6d71a526c0e6620f2db0cd6df9625261..939ed1931492854c5854cab06730cf23
@NotNull
private static PotionEffectType getEffectType(@NotNull Map<?, ?> map) {
PotionEffectType effect;
@@ -166,17 +206,33 @@ public class PotionEffect implements ConfigurationSerializable {
@@ -201,6 +230,17 @@ public class PotionEffect implements ConfigurationSerializable {
return def;
}
@@ -2195,35 +2207,28 @@ index 037af5fd6d71a526c0e6620f2db0cd6df9625261..939ed1931492854c5854cab06730cf23
@Override
@NotNull
public Map<String, Object> serialize() {
- return ImmutableMap.<String, Object>builder()
+ // Purpur start - add key, don't serialize if null.
+ ImmutableMap.Builder<String, Object> builder = ImmutableMap.<String, Object>builder()
.put(TYPE, type.getKey().toString())
.put(DURATION, duration)
.put(AMPLIFIER, amplifier)
.put(AMBIENT, ambient)
.put(PARTICLES, particles)
- .put(ICON, icon)
- .build();
+ .put(ICON, icon);
+ if(key != null) {
@@ -215,6 +255,11 @@ public class PotionEffect implements ConfigurationSerializable {
if (this.hiddenEffect != null) {
builder.put(HIDDEN_EFFECT, this.hiddenEffect);
}
+ // Purpur start
+ if (key != null) {
+ builder.put(KEY, key.toString());
+ }
+ return builder.build();
+ // Purpur end
return builder.build();
// Paper end
}
/**
@@ -200,7 +256,7 @@ public class PotionEffect implements ConfigurationSerializable {
@@ -243,7 +288,7 @@ public class PotionEffect implements ConfigurationSerializable {
return false;
}
PotionEffect that = (PotionEffect) obj;
- return this.type.equals(that.type) && this.ambient == that.ambient && this.amplifier == that.amplifier && this.duration == that.duration && this.particles == that.particles && this.icon == that.icon;
+ return this.type.equals(that.type) && this.ambient == that.ambient && this.amplifier == that.amplifier && this.duration == that.duration && this.particles == that.particles && this.icon == that.icon && this.key == that.key; // Purpur - add key
- return this.type.equals(that.type) && this.ambient == that.ambient && this.amplifier == that.amplifier && this.duration == that.duration && this.particles == that.particles && this.icon == that.icon && java.util.Objects.equals(this.hiddenEffect, that.hiddenEffect); // Paper
+ return this.type.equals(that.type) && this.ambient == that.ambient && this.amplifier == that.amplifier && this.duration == that.duration && this.particles == that.particles && this.icon == that.icon && java.util.Objects.equals(this.hiddenEffect, that.hiddenEffect) && this.key == that.key; // Paper // Purpur - add key
}
/**
@@ -296,6 +352,24 @@ public class PotionEffect implements ConfigurationSerializable {
@@ -339,6 +384,24 @@ public class PotionEffect implements ConfigurationSerializable {
return icon;
}
@@ -2248,12 +2253,12 @@ index 037af5fd6d71a526c0e6620f2db0cd6df9625261..939ed1931492854c5854cab06730cf23
@Override
public int hashCode() {
int hash = 1;
@@ -310,6 +384,6 @@ public class PotionEffect implements ConfigurationSerializable {
@@ -354,6 +417,6 @@ public class PotionEffect implements ConfigurationSerializable {
@Override
public String toString() {
- return type.getName() + (ambient ? ":(" : ":") + duration + "t-x" + amplifier + (ambient ? ")" : "");
+ return type.getName() + (ambient ? ":(" : ":") + duration + "t-x" + amplifier + (ambient ? ")" : "") + (hasKey() ? "(" + key + ")" : ""); // Purpur - add key if not null
- return "PotionEffect{" + "amplifier=" + amplifier + ", duration=" + duration + ", type=" + type + ", ambient=" + ambient + ", particles=" + particles + ", icon=" + icon + ", hiddenEffect=" + hiddenEffect + '}'; // Paper
+ return "PotionEffect{" + "amplifier=" + amplifier + ", duration=" + duration + ", type=" + type + ", ambient=" + ambient + ", particles=" + particles + ", icon=" + icon + ", hiddenEffect=" + hiddenEffect + ", key=" + key + '}'; // Paper // Purpur - add key
}
}
diff --git a/src/main/java/org/bukkit/util/permissions/CommandPermissions.java b/src/main/java/org/bukkit/util/permissions/CommandPermissions.java

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Bump Dependencies
diff --git a/build.gradle.kts b/build.gradle.kts
index 3f01a142439616c88c3b5da4d6cab80bfdaa2a76..dee13c231683420cc5e1c5bbae280020b40c36ae 100644
index 0d9531a62d7667b98a57bd6b8e627a3e2f105001..bd863ad35b4ed1da320ab6276ebedbaf52ab2d67 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -9,11 +9,11 @@ java {
@@ -16,9 +16,10 @@ index 3f01a142439616c88c3b5da4d6cab80bfdaa2a76..dee13c231683420cc5e1c5bbae280020
+val annotationsVersion = "24.1.0" // Leaf - Bump Dependencies
val bungeeCordChatVersion = "1.20-R0.1"
val adventureVersion = "4.15.0"
val slf4jVersion = "2.0.9"
-val slf4jVersion = "2.0.9"
-val log4jVersion = "2.17.1"
+val log4jVersion = "2.22.0" // Leaf - Bump Dependencies
+val slf4jVersion = "2.0.11"
+val log4jVersion = "2.22.1" // Leaf - Bump Dependencies
val apiAndDocs: Configuration by configurations.creating {
attributes {
attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION))
@@ -42,7 +43,7 @@ index 3f01a142439616c88c3b5da4d6cab80bfdaa2a76..dee13c231683420cc5e1c5bbae280020
apiAndDocs("net.kyori:adventure-text-minimessage")
@@ -53,11 +53,12 @@ dependencies {
api("org.slf4j:slf4j-api:$slf4jVersion")
api("io.sentry:sentry:7.1.0") // Pufferfish
api("io.sentry:sentry:7.2.0") // Pufferfish
- implementation("org.ow2.asm:asm:9.5")
- implementation("org.ow2.asm:asm-commons:9.5")

View File

@@ -7,7 +7,7 @@ Original license: MIT
Original project: https://github.com/KeYiMC/KeYi
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 32fc5a73c79858e31c3de45e16179714d3bea667..a1584415383708b3e9693c91f21a7bf9daab1b25 100644
index 5579fe9823d13be13d501cd0e3383b5763e2a4ed..e13f778a5a44c4eb352779cfca389ccfa570556a 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -9,6 +9,10 @@ import java.util.Date;
@@ -21,7 +21,7 @@ index 32fc5a73c79858e31c3de45e16179714d3bea667..a1584415383708b3e9693c91f21a7bf9
import org.bukkit.DyeColor;
import org.bukkit.Effect;
import org.bukkit.GameMode;
@@ -3664,4 +3668,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -3703,4 +3707,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
sendDeathScreen(message);
}
// Purpur end

View File

@@ -7,10 +7,10 @@ Original license: MIT
Original project: https://github.com/Cryptite/Slice
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index a1584415383708b3e9693c91f21a7bf9daab1b25..a262d8bf4b6f17141246ecaa0cee4c778629f424 100644
index e13f778a5a44c4eb352779cfca389ccfa570556a..93d6dd81777969df34d1cf55d3c7a4af777a5974 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -3412,6 +3412,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@@ -3451,6 +3451,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
String getClientBrandName();
// Paper end

View File

@@ -73,10 +73,10 @@ index e45e6b44b2a8f2cdae6e0048a812b92126aa17ca..b5f3f213da8a40d5184098af017c8e26
.completer(new ConsoleCommandCompleter(this.server))
.option(LineReader.Option.COMPLETE_IN_WORD, true);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index f1bf143d5a97a4afbba6b2e7c07a5f46678c3260..69d7ffeae56f4e9e8bd33b23c9322f1cd9d09272 100644
index c712427d5eda3b4c1f6968836da594f193f189b4..22734bad2fd73fbac5cc3e62de36a5c2cbfde9dc 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -944,7 +944,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -942,7 +942,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
We do not want people to report thread issues to Paper,
but we do want people to report thread issues to Gale.
*/

View File

@@ -20,10 +20,10 @@ and, in my opinion, worth the low risk of minor mob-spawning-related
inconsistencies.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 69d7ffeae56f4e9e8bd33b23c9322f1cd9d09272..01d8446b4019562a2e68b14236a85277639d6728 100644
index 22734bad2fd73fbac5cc3e62de36a5c2cbfde9dc..824004849ef389d629ddca7e60f664f5f465ff90 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -301,6 +301,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -299,6 +299,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public static final long SERVER_INIT = System.nanoTime();
// Paper end - lag compensation
@@ -45,7 +45,7 @@ index fc017f554147eaaee5c436ede2595bccd6b8fd7f..5f1d63343b1d7fbcf19b1ef189504e55
}
}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 322fca6749d6f7fe432e3510c22ab369ad2db93f..104cdc470e337c382d51988cb6d47e1903fea4ce 100644
index 5838e05d9d5b6a0b3b7d6b775577b11f7f603a56..c9fb6458ed3d3fa48a758c053662f11d83e727c7 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -243,7 +243,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider

View File

@@ -30,10 +30,10 @@ 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/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index b19571f838469dcaba5ecee06fe43de23bcdc776..1c9ba5d25d521126a912522aed8d220cc1bb68b4 100644
index 56ee1c3061c854d9b3fdd096c4c70eee909f0f74..628c553e0580400a8e08396def8c4db3ed1682a9 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -881,6 +881,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -886,6 +886,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
org.spigotmc.ActivationRange.activateEntities(this); // Spigot
this.timings.entityTick.startTiming(); // Spigot
this.entityTickList.forEach((entity) -> {
@@ -42,7 +42,7 @@ index b19571f838469dcaba5ecee06fe43de23bcdc776..1c9ba5d25d521126a912522aed8d220c
if (false && this.shouldDiscardEntity(entity)) { // CraftBukkit - We prevent spawning in general, so this butchering is not needed
entity.discard();
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index a2d778cd804362e03ddc73d5e35569c3d5b8d187..e32c97853eb7e94c06a97ec1b1ac0e88dd4126f5 100644
index 8684e769b1658aa2d8fe598b77c3f99129a1962d..83a0767d4f285b944471b3dddac70270792d10f5 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -440,6 +440,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -58,7 +58,7 @@ index a2d778cd804362e03ddc73d5e35569c3d5b8d187..e32c97853eb7e94c06a97ec1b1ac0e88
return this.yRot;
}
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
index 940b8d0b89d7e55c938aefbe80ee71b0db3dacb8..3e89a633b57fd206216b65f704ea8c0243e02c52 100644
index 6cfce9755dd464a7afb01f9032e567ce3bcd5bc5..d1201c4f6625d56bfa9f329fbb32bea1ff2bcb56 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
@@ -305,6 +305,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
@@ -70,7 +70,7 @@ index 940b8d0b89d7e55c938aefbe80ee71b0db3dacb8..3e89a633b57fd206216b65f704ea8c02
private String descriptionId;
@Nullable
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index db9aee68b644d318f65df010027b40628ea84ea2..88cccee4152d18db34818a37c7a2c19dcb6ef596 100644
index ad6a159f5472059c1550c36dd98d83af01bbe31a..0fa8fc1cbedf0b65c7695d604bfc78c7ef2c2c41 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -227,10 +227,10 @@ public abstract class Mob extends LivingEntity implements Targeting {
@@ -357,7 +357,7 @@ index 5d161351e7517acf57e98203bab8c9f9ab9d4005..634a4e46022f1d63a67c64f19f255538
private static void network() {
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index 7f9efe9429f9dcceb52d72f231a7a4bbae0f9738..4295d8257616628727e7dc4aaf6d20b7eb18dc76 100644
index c7058fb8dc39a534e9403b3392547f6d925f2851..1275d4ecc7c2dca1d82b2da883717ef7561d520d 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -40,6 +40,9 @@ import net.minecraft.world.level.Level;

View File

@@ -7,10 +7,10 @@ Original license: GPL v3
Original project: https://github.com/pufferfish-gg/Pufferfish
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index e32c97853eb7e94c06a97ec1b1ac0e88dd4126f5..80f210c04d3ae3a36ff46273b5cb7b4a95408ce3 100644
index 83a0767d4f285b944471b3dddac70270792d10f5..e62d19bb841779684bb3a3ffb34f7bb0939303be 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -809,6 +809,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -813,6 +813,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
public void tick() {
@@ -24,7 +24,7 @@ index e32c97853eb7e94c06a97ec1b1ac0e88dd4126f5..80f210c04d3ae3a36ff46273b5cb7b4a
}
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
index 3e89a633b57fd206216b65f704ea8c0243e02c52..a63399eedb896c06e96c7fba5cac7102e1c40ba6 100644
index d1201c4f6625d56bfa9f329fbb32bea1ff2bcb56..cf90ecefea3586d0ce236288ab515bfa67239814 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
@@ -306,6 +306,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT

File diff suppressed because it is too large Load Diff

View File

@@ -5,10 +5,10 @@ Subject: [PATCH] Purpur: Configurable server mod name
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 7418860e8d25d6eeab33a617a7365c608e1454d2..176f10372a0060fbd2733a6713eb3979a8f4652e 100644
index fe3ad5d2acec094e9f363acb418233a2756fd0c3..a58b37b576888f865259e647fb30624fa99361bd 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1858,7 +1858,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1856,7 +1856,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@DontObfuscate
public String getServerModName() {

View File

@@ -798,10 +798,10 @@ index 22687667ec69a954261e55e59261286ac1b8b8cd..00000000000000000000000000000000
- }
-}
diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
index abd0217cf0bff183c8e262edc173a53403797c1a..8e52ebe8d12f5da3d877b0e4ff3723229fb47db1 100644
index 6bc7c6f16a1649fc9e24e7cf90fca401e5bd4875..5b446e6ac151f99f64f0c442d0b40b5e251bc4c4 100644
--- a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
+++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkHolderManager.java
@@ -1315,9 +1315,7 @@ public final class ChunkHolderManager {
@@ -1316,9 +1316,7 @@ public final class ChunkHolderManager {
}
public boolean processTicketUpdates() {
@@ -941,10 +941,10 @@ index c5c734b9eb80d1cdf0e9fd8a043f2b6d1f4cbffe..68ef0398e1b517dd9fd2def43d7d87e4
} catch (Exception exception) {
label25:
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 176f10372a0060fbd2733a6713eb3979a8f4652e..138935ffe2f7852e8aa30a5fdea2d4ca340c4cdf 100644
index a58b37b576888f865259e647fb30624fa99361bd..149a786b38d999730a05931ea5dc69a7aa04723a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -180,8 +180,6 @@ import org.bukkit.craftbukkit.Main;
@@ -178,8 +178,6 @@ import org.bukkit.craftbukkit.Main;
import org.bukkit.event.server.ServerLoadEvent;
// CraftBukkit end
@@ -953,7 +953,7 @@ index 176f10372a0060fbd2733a6713eb3979a8f4652e..138935ffe2f7852e8aa30a5fdea2d4ca
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements ServerInfo, CommandSource, AutoCloseable {
public static final int SERVER_THREAD_PRIORITY = Integer.getInteger("gale.thread.priority.server", -1); // Gale - server thread priority environment variable
@@ -963,7 +961,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -961,7 +959,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
MinecraftServer.LOGGER.info("Stopping server");
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Shutdown and don't bother finishing
@@ -961,7 +961,7 @@ index 176f10372a0060fbd2733a6713eb3979a8f4652e..138935ffe2f7852e8aa30a5fdea2d4ca
// Purpur start
if (upnp) {
if (dev.omega24.upnp4j.UPnP4J.close(this.getPort(), dev.omega24.upnp4j.util.Protocol.TCP)) {
@@ -1345,7 +1342,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1343,7 +1340,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
protected void waitUntilNextTick() {
@@ -970,7 +970,7 @@ index 176f10372a0060fbd2733a6713eb3979a8f4652e..138935ffe2f7852e8aa30a5fdea2d4ca
long tickOversleepStart = System.nanoTime(); // Gale - YAPFA - last tick time
this.managedBlock(() -> {
return !this.canSleepForTickNoOversleep(); // Paper - move oversleep into full server tick
@@ -1414,8 +1411,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1412,8 +1409,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
return;
}
@@ -979,7 +979,7 @@ index 176f10372a0060fbd2733a6713eb3979a8f4652e..138935ffe2f7852e8aa30a5fdea2d4ca
for (;;) {
boolean moreTasks = this.tickMidTickTasks();
long currTime = System.nanoTime();
@@ -1440,9 +1435,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1438,9 +1433,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
return;
}
}
@@ -989,7 +989,7 @@ index 176f10372a0060fbd2733a6713eb3979a8f4652e..138935ffe2f7852e8aa30a5fdea2d4ca
}
// Paper end - execute chunk tasks mid tick
@@ -1515,15 +1507,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1513,15 +1505,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public void tickServer(BooleanSupplier shouldKeepTicking) {
@@ -1007,7 +1007,7 @@ index 176f10372a0060fbd2733a6713eb3979a8f4652e..138935ffe2f7852e8aa30a5fdea2d4ca
// Paper end
new com.destroystokyo.paper.event.server.ServerTickStartEvent(this.tickCount+1).callEvent(); // Paper
@@ -1557,11 +1548,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1555,11 +1546,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
// Paper end
io.papermc.paper.util.CachedLists.reset(); // Paper
@@ -1019,7 +1019,7 @@ index 176f10372a0060fbd2733a6713eb3979a8f4652e..138935ffe2f7852e8aa30a5fdea2d4ca
// Paper start
long endTime = System.nanoTime();
long remaining = (TICK_TIME - (endTime - lastTick)) - catchupTime;
@@ -1583,7 +1569,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1581,7 +1567,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Paper end
this.logTickTime(l - i);
org.spigotmc.WatchdogThread.tick(); // Spigot
@@ -1027,7 +1027,7 @@ index 176f10372a0060fbd2733a6713eb3979a8f4652e..138935ffe2f7852e8aa30a5fdea2d4ca
}
private int computeNextAutosaveInterval() {
@@ -1645,9 +1630,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1643,9 +1628,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.getPlayerList().getPlayers().forEach((entityplayer) -> {
entityplayer.connection.suspendFlushing();
});
@@ -1037,7 +1037,7 @@ index 176f10372a0060fbd2733a6713eb3979a8f4652e..138935ffe2f7852e8aa30a5fdea2d4ca
// Paper start - Folia scheduler API
((io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler) Bukkit.getGlobalRegionScheduler()).tick();
getAllLevels().forEach(level -> {
@@ -1663,20 +1646,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1661,20 +1644,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
});
// Paper end - Folia scheduler API
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
@@ -1058,7 +1058,7 @@ index 176f10372a0060fbd2733a6713eb3979a8f4652e..138935ffe2f7852e8aa30a5fdea2d4ca
// Send time updates to everyone, it will get the right time from the world the player is in.
// Paper start - optimize time updates
for (final ServerLevel level : this.getAllLevels()) {
@@ -1696,7 +1674,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1694,7 +1672,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}
// Paper end
@@ -1066,7 +1066,7 @@ index 176f10372a0060fbd2733a6713eb3979a8f4652e..138935ffe2f7852e8aa30a5fdea2d4ca
this.isIteratingOverLevels = true; // Paper
net.minecraft.network.FriendlyByteBuf.hasItemSerializeEvent = org.purpurmc.purpur.event.packet.NetworkItemSerializeEvent.getHandlerList().getRegisteredListeners().length > 0; // Purpur
@@ -1716,14 +1693,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1714,14 +1691,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit end */
try {
@@ -1081,7 +1081,7 @@ index 176f10372a0060fbd2733a6713eb3979a8f4652e..138935ffe2f7852e8aa30a5fdea2d4ca
} catch (Throwable throwable) {
// Spigot Start
CrashReport crashreport;
@@ -1743,21 +1718,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1741,21 +1716,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
this.isIteratingOverLevels = false; // Paper
@@ -1103,7 +1103,7 @@ index 176f10372a0060fbd2733a6713eb3979a8f4652e..138935ffe2f7852e8aa30a5fdea2d4ca
iterator = this.playerList.getPlayers().iterator();
@@ -1767,7 +1736,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1765,7 +1734,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
entityplayer.connection.chunkSender.sendNextChunks(entityplayer);
entityplayer.connection.resumeFlushing();
}
@@ -1166,7 +1166,7 @@ index f690b0b56bdaf78ce1e64445f14018b705eb3c37..3db403505f2829680648e9ff2bc2c128
// Paper start
if (waitableArray[0] != null) {
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 104cdc470e337c382d51988cb6d47e1903fea4ce..016cd710902ab2d328a9358f8fd7da9f0ef2bcde 100644
index c9fb6458ed3d3fa48a758c053662f11d83e727c7..0c3f1f6984bdcf95487b9025c17cab0c6764b6db 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1,6 +1,5 @@
@@ -1349,7 +1349,7 @@ index 58f3d1f957ec85e69b80c78e533cedc3a7ac1937..e04ab410b88f681032de4406dceac5ef
}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index dd677f1981abd5aaaf9c1ec79dbde1766f70ce84..22c9353264da69591a748773e5dd0ea49229f221 100644
index 20be339c5a6e6b012d21604dadfe214787067287..246537aea1e328ecd25676d68aa7061dbc80e8d0 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1,7 +1,6 @@
@@ -1360,7 +1360,7 @@ index dd677f1981abd5aaaf9c1ec79dbde1766f70ce84..22c9353264da69591a748773e5dd0ea4
import com.google.common.collect.Lists;
import com.mojang.datafixers.DataFixer;
import com.mojang.datafixers.util.Pair;
@@ -863,27 +862,19 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -868,27 +867,19 @@ public class ServerLevel extends Level implements WorldGenLevel {
this.tickTime();
}
@@ -1388,7 +1388,7 @@ index dd677f1981abd5aaaf9c1ec79dbde1766f70ce84..22c9353264da69591a748773e5dd0ea4
}
this.handlingTick = false;
@@ -894,13 +885,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -899,13 +890,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
if (flag1 || this.emptyTime++ < 300) {
@@ -1402,7 +1402,7 @@ index dd677f1981abd5aaaf9c1ec79dbde1766f70ce84..22c9353264da69591a748773e5dd0ea4
this.entityTickList.forEach((entity) -> {
entity.activatedPriorityReset = false; // Pufferfish - DAB
if (!entity.isRemoved()) {
@@ -937,8 +926,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -942,8 +931,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
}
});
@@ -1411,7 +1411,7 @@ index dd677f1981abd5aaaf9c1ec79dbde1766f70ce84..22c9353264da69591a748773e5dd0ea4
this.tickBlockEntities();
}
@@ -1072,7 +1059,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1077,7 +1064,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
} // Paper
@@ -1419,7 +1419,7 @@ index dd677f1981abd5aaaf9c1ec79dbde1766f70ce84..22c9353264da69591a748773e5dd0ea4
if (randomTickSpeed > 0) {
// Paper start - optimize random block ticking
LevelChunkSection[] sections = chunk.getSections();
@@ -1105,8 +1091,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1110,8 +1096,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
}
// Paper end - optimise random block ticking
@@ -1428,7 +1428,7 @@ index dd677f1981abd5aaaf9c1ec79dbde1766f70ce84..22c9353264da69591a748773e5dd0ea4
}
@VisibleForTesting
@@ -1436,31 +1420,21 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1441,31 +1425,21 @@ public class ServerLevel extends Level implements WorldGenLevel {
currentlyTickingEntity.lazySet(entity);
}
// Paper end - log detailed entity tick information
@@ -1460,7 +1460,7 @@ index dd677f1981abd5aaaf9c1ec79dbde1766f70ce84..22c9353264da69591a748773e5dd0ea4
Iterator iterator = entity.getPassengers().iterator();
while (iterator.hasNext()) {
@@ -1468,7 +1442,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1473,7 +1447,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
this.tickPassenger(entity, entity1);
}
@@ -1468,7 +1468,7 @@ index dd677f1981abd5aaaf9c1ec79dbde1766f70ce84..22c9353264da69591a748773e5dd0ea4
// Paper start - log detailed entity tick information
} finally {
if (currentlyTickingEntity.get() == entity) {
@@ -1483,9 +1456,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1488,9 +1461,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
if (passenger instanceof Player || this.entityTickList.contains(passenger)) {
// Paper - EAR 2
final boolean isActive = org.spigotmc.ActivationRange.checkIfActive(passenger);
@@ -1478,7 +1478,7 @@ index dd677f1981abd5aaaf9c1ec79dbde1766f70ce84..22c9353264da69591a748773e5dd0ea4
passenger.setOldPosAndRot();
++passenger.tickCount;
// Paper start - EAR 2
@@ -1506,8 +1476,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1511,8 +1481,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
this.tickPassenger(passenger, entity2);
}
@@ -1487,7 +1487,7 @@ index dd677f1981abd5aaaf9c1ec79dbde1766f70ce84..22c9353264da69591a748773e5dd0ea4
}
} else {
passenger.stopRiding();
@@ -1527,14 +1495,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1532,14 +1500,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld()));
}
@@ -1502,7 +1502,7 @@ index dd677f1981abd5aaaf9c1ec79dbde1766f70ce84..22c9353264da69591a748773e5dd0ea4
// Copied from save()
// CraftBukkit start - moved from MinecraftServer.saveChunks
@@ -1546,7 +1511,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1551,7 +1516,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
this.convertable.saveDataTag(this.server.registryAccess(), this.serverLevelData, this.server.getPlayerList().getSingleplayerData());
}
// CraftBukkit end
@@ -1510,7 +1510,7 @@ index dd677f1981abd5aaaf9c1ec79dbde1766f70ce84..22c9353264da69591a748773e5dd0ea4
}
// Paper end
@@ -1560,7 +1524,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1565,7 +1529,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
if (!savingDisabled) {
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(this.getWorld())); // CraftBukkit
@@ -1518,7 +1518,7 @@ index dd677f1981abd5aaaf9c1ec79dbde1766f70ce84..22c9353264da69591a748773e5dd0ea4
if (progressListener != null) {
progressListener.progressStartNoAbort(Component.translatable("menu.savingLevel"));
}
@@ -1570,11 +1533,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1575,11 +1538,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
progressListener.progressStage(Component.translatable("menu.savingChunks"));
}
@@ -1531,10 +1531,10 @@ index dd677f1981abd5aaaf9c1ec79dbde1766f70ce84..22c9353264da69591a748773e5dd0ea4
} else if (close) { chunkproviderserver.close(false); } // Paper - rewrite chunk system
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index ca8db3c11a6a794b23f760b7aaee69290752043f..add52c6986866c42d73c51fa8390d62a4a9d5594 100644
index c8d91ce1364421f7ce307aef5a4dbfa6f5b75369..c74a9e5f2d92daa36265985e4f6ef7e0e6df4484 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2481,7 +2481,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2487,7 +2487,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
public void handleCommand(String s) { // Paper - private -> public
org.spigotmc.AsyncCatcher.catchOp("Command Dispatched Async: " + s); // Paper - Add async catcher
@@ -1542,7 +1542,7 @@ index ca8db3c11a6a794b23f760b7aaee69290752043f..add52c6986866c42d73c51fa8390d62a
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
@@ -2491,7 +2490,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2497,7 +2496,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.cserver.getPluginManager().callEvent(event);
if (event.isCancelled()) {
@@ -1550,7 +1550,7 @@ index ca8db3c11a6a794b23f760b7aaee69290752043f..add52c6986866c42d73c51fa8390d62a
return;
}
@@ -2503,8 +2501,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2509,8 +2507,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
player.sendMessage(org.bukkit.ChatColor.RED + "An internal error occurred while attempting to perform this command");
java.util.logging.Logger.getLogger(ServerGamePacketListenerImpl.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
return;
@@ -1560,7 +1560,7 @@ index ca8db3c11a6a794b23f760b7aaee69290752043f..add52c6986866c42d73c51fa8390d62a
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index a0cca8f9f92eca597552d497ee61b068622482be..4158800ce4f86d20213dfd9ccba38d4baf10aa02 100644
index 35b18d05097a0bceffe0399ba9cf283ad046051f..de08bdced1d55da22b5abd6f44fdad708ec8f238 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1,6 +1,5 @@
@@ -1570,7 +1570,7 @@ index a0cca8f9f92eca597552d497ee61b068622482be..4158800ce4f86d20213dfd9ccba38d4b
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
@@ -1332,7 +1331,6 @@ public abstract class PlayerList {
@@ -1338,7 +1337,6 @@ public abstract class PlayerList {
public void saveAll(int interval) {
io.papermc.paper.util.MCUtil.ensureMain("Save Players" , () -> { // Paper - Ensure main
@@ -1578,7 +1578,7 @@ index a0cca8f9f92eca597552d497ee61b068622482be..4158800ce4f86d20213dfd9ccba38d4b
int numSaved = 0;
long now = MinecraftServer.currentTick;
for (int i = 0; i < this.players.size(); ++i) {
@@ -1343,7 +1341,6 @@ public abstract class PlayerList {
@@ -1349,7 +1347,6 @@ public abstract class PlayerList {
}
// Paper end
}
@@ -1587,7 +1587,7 @@ index a0cca8f9f92eca597552d497ee61b068622482be..4158800ce4f86d20213dfd9ccba38d4b
}
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
index 38845300ceb7092de4cd8e31ef8782728892f656..0d9d7e3b1302b2ee396954a47038370c1d4a4c59 100644
index 770d74e3c3226306a8f246920798ae72fdafe2c5..050c89be2f3fb4ae5a3d79282d3d67782b67d838 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
@@ -340,15 +340,6 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
@@ -1606,7 +1606,7 @@ index 38845300ceb7092de4cd8e31ef8782728892f656..0d9d7e3b1302b2ee396954a47038370c
this.builtInRegistryHolder = BuiltInRegistries.ENTITY_TYPE.createIntrusiveHolder(this);
this.factory = factory;
this.category = spawnGroup;
@@ -718,12 +709,6 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
@@ -724,12 +715,6 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
return this.updateInterval;
}
@@ -1619,7 +1619,7 @@ index 38845300ceb7092de4cd8e31ef8782728892f656..0d9d7e3b1302b2ee396954a47038370c
public boolean trackDeltas() {
return this != EntityType.PLAYER && this != EntityType.LLAMA_SPIT && this != EntityType.WITHER && this != EntityType.BAT && this != EntityType.ITEM_FRAME && this != EntityType.GLOW_ITEM_FRAME && this != EntityType.LEASH_KNOT && this != EntityType.PAINTING && this != EntityType.END_CRYSTAL && this != EntityType.EVOKER_FANGS;
}
@@ -833,7 +818,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
@@ -839,7 +824,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
Util.fetchChoiceType(References.ENTITY_TREE, id);
}
@@ -1726,7 +1726,7 @@ index fcdb9bde8e1605e30dde3e580491522d4b62cdc0..4de18d00cc464313b777874430da3f55
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 41c59c0828e0b6919e029f831ed22b305b2be470..0b10bf781dc70c0ea3d5031ac2b5fe5395cb5269 100644
index 8b41f27fccf31646e780966d2da7e4c4f5419710..2c5c84c028d1298bb145fa1149752db3f83d5de2 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -179,7 +179,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -1745,7 +1745,7 @@ index 41c59c0828e0b6919e029f831ed22b305b2be470..0b10bf781dc70c0ea3d5031ac2b5fe53
this.keepSpawnInMemory = this.paperConfig().spawn.keepSpawnLoaded; // Paper
this.entityLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.entityMaxTickTime);
this.tileLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.tileMaxTickTime);
@@ -1325,15 +1323,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -1330,15 +1328,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
}
protected void tickBlockEntities() {
@@ -1761,7 +1761,7 @@ index 41c59c0828e0b6919e029f831ed22b305b2be470..0b10bf781dc70c0ea3d5031ac2b5fe53
// Spigot start
// Iterator<TickingBlockEntity> iterator = this.blockEntityTickers.iterator();
boolean flag = this.tickRateManager().runsNormally();
@@ -1362,9 +1357,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -1367,9 +1362,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
}
this.blockEntityTickers.removeAll(toRemove);
@@ -1793,7 +1793,7 @@ index 530c5e3500bd735bbd41d6c973d7470c43aed404..ec6afe51fd204e4c0764850dcc4535f7
// Paper start
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
index 27879468851875f9d9e7eb28f47ad36d36fd7475..be19989c059caaa8406ce58443eb9a2586d49dfe 100644
index 1e0a8f38b88557ef8c5d1f194dca21ba0fb1226b..74edd4f804c3a9dc24515038b3e98937424e68b3 100644
--- a/src/main/java/net/minecraft/world/level/block/Block.java
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
@@ -114,13 +114,6 @@ public class Block extends BlockBehaviour implements ItemLike {
@@ -2272,7 +2272,7 @@ index 139d946346594d2a59a8b2930c4eae794c880dbc..00000000000000000000000000000000
-
-}
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index 62514cc02d0b210283e7999a6f34976355d1b2d9..95ec734e17d98aff08cba1b40de79ac50bf5ba78 100644
index c3a2e0c9b7a5f2ad55b3d8c971d280a0795ff63a..76e155205e2fca0d2080532234b9d08270a2877e 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -35,7 +35,6 @@ import net.minecraft.world.entity.projectile.FireworkRocketEntity;

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Bump Dependencies
diff --git a/build.gradle.kts b/build.gradle.kts
index 604ce3a289f33b051074aa0a5e2ff04b74986cb1..eb622ea1c419bc0d514b77af0860ab08e0aa2822 100644
index 604ce3a289f33b051074aa0a5e2ff04b74986cb1..081788f064872486f5905dcdde2e1de0495e599e 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -22,9 +22,9 @@ dependencies {
@@ -27,8 +27,8 @@ index 604ce3a289f33b051074aa0a5e2ff04b74986cb1..eb622ea1c419bc0d514b77af0860ab08
- implementation("org.apache.logging.log4j:log4j-core:2.19.0") // Paper - implementation
- log4jPlugins.annotationProcessorConfigurationName("org.apache.logging.log4j:log4j-core:2.19.0") // Paper - Needed to generate meta for our Log4j plugins
+ // Leaf start - Bump Dependencies
+ implementation("org.apache.logging.log4j:log4j-core:2.22.0") // Paper - implementation
+ log4jPlugins.annotationProcessorConfigurationName("org.apache.logging.log4j:log4j-core:2.22.0") // Paper - Needed to generate meta for our Log4j plugins
+ implementation("org.apache.logging.log4j:log4j-core:2.22.1") // Paper - implementation
+ log4jPlugins.annotationProcessorConfigurationName("org.apache.logging.log4j:log4j-core:2.22.1") // Paper - Needed to generate meta for our Log4j plugins
runtimeOnly(log4jPlugins.output)
alsoShade(log4jPlugins.output)
- implementation("io.netty:netty-codec-haproxy:4.1.97.Final") // Paper - Add support for proxy protocol
@@ -37,7 +37,7 @@ index 604ce3a289f33b051074aa0a5e2ff04b74986cb1..eb622ea1c419bc0d514b77af0860ab08
- implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion
- implementation("org.ow2.asm:asm:9.5")
- implementation("org.ow2.asm:asm-commons:9.5") // Paper - ASM event executor generation
+ implementation("org.apache.logging.log4j:log4j-iostreams:2.22.0") // Paper - remove exclusion
+ implementation("org.apache.logging.log4j:log4j-iostreams:2.22.1") // Paper - remove exclusion
+ implementation("org.ow2.asm:asm:9.6")
+ implementation("org.ow2.asm:asm-commons:9.6") // Paper - ASM event executor generation
implementation("org.spongepowered:configurate-yaml:4.2.0-SNAPSHOT") // Paper - config files

View File

@@ -7,10 +7,10 @@ This Check is added in 1.17.x -> 1.18.x update by Mojang.
By removing this check, it enable hackers to use some modules of hack clients.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index add52c6986866c42d73c51fa8390d62a4a9d5594..78374c798272f597067bcf2ff7d9d060c0f4f5b2 100644
index c74a9e5f2d92daa36265985e4f6ef7e0e6df4484..012af2775a5d6559fdefab7d484f15b475a1c381 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2008,7 +2008,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2011,7 +2011,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
Vec3 vec3d2 = vec3d.subtract(vec3d1);
double d0 = 1.0000001D;

View File

@@ -7,7 +7,7 @@ Original license: MIT
Original project: https://github.com/KeYiMC/KeYi
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index df4f39d38f1ff4a5e499e227d93d98f531a01419..c9dd86c2d71d7281902ed5f4cfd8d4320ecd0563 100644
index 8c90eddd40c8ab2f4d727e3c7d9b6312d57bf277..2026f2b42658e5625da39097d3faae2b86b0153b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -29,6 +29,11 @@ import java.util.Optional;
@@ -30,7 +30,7 @@ index df4f39d38f1ff4a5e499e227d93d98f531a01419..c9dd86c2d71d7281902ed5f4cfd8d432
import org.bukkit.map.MapCursor;
import org.bukkit.map.MapView;
import org.bukkit.metadata.MetadataValue;
@@ -3423,4 +3429,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -3470,4 +3476,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundPlayerCombatKillPacket(getEntityId(), io.papermc.paper.adventure.PaperAdventure.asVanilla(message)));
}
// Purpur end

View File

@@ -7,7 +7,7 @@ Original license: GPLv3
Original project: https://github.com/LeavesMC/Leaves
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 50267637d752b8216ee81e09945d7b8f08743c53..0afe218612f16b04798fa5697ac40db95a6629ed 100644
index 61df6e02971a3e2deb63504b35289a77781d34ac..c7ef72f2f4fdd2b7d06312c2931a6e0e857616c2 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -423,6 +423,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -18,7 +18,7 @@ index 50267637d752b8216ee81e09945d7b8f08743c53..0afe218612f16b04798fa5697ac40db9
public void setOrigin(@javax.annotation.Nonnull Location location) {
this.origin = location.toVector();
@@ -2525,6 +2526,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -2529,6 +2530,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
nbttagcompound.putBoolean("Paper.FreezeLock", true);
}
// Paper end
@@ -26,7 +26,7 @@ index 50267637d752b8216ee81e09945d7b8f08743c53..0afe218612f16b04798fa5697ac40db9
return nbttagcompound;
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
@@ -2672,6 +2674,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -2676,6 +2678,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
freezeLocked = nbt.getBoolean("Paper.FreezeLock");
}
// Paper end
@@ -38,7 +38,7 @@ index 50267637d752b8216ee81e09945d7b8f08743c53..0afe218612f16b04798fa5697ac40db9
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT");
@@ -5109,4 +5116,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -5120,4 +5127,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
return false;
}
// Purpur end

View File

@@ -25,10 +25,10 @@ index af86f752c33a2990405fea058b7c41c437ba9d46..bada9fae1e7178162429e1f5a1608b9c
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 138935ffe2f7852e8aa30a5fdea2d4ca340c4cdf..625822b060683bfdf3b79f82ed5eea68ff8ade85 100644
index 149a786b38d999730a05931ea5dc69a7aa04723a..a500372fb5cec834d0d25eb44f46afaa1acf6ffc 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1724,6 +1724,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1722,6 +1722,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
GameTestTicker.SINGLETON.tick();
}
@@ -58,7 +58,7 @@ index 1ee6f597bbb8ba62b9fddde3fd7a91085dc0def2..66255eeab8cae6ce150ca888b9db3c2f
} catch (Exception ex) {
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t register custom payload", ex);
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 9e66c884c9a00263cb8f723f0a94cebed7d788c9..7b184f16a7759ddfbdf430b2f79f1055a8e77064 100644
index 0a6f3536d6ca9bf2efb18524eb1dd00ef5a8f1e0..f498cfe2051fc8045c02bfaf4d98a3b46ce23aa6 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -361,6 +361,7 @@ public abstract class PlayerList {

View File

@@ -7,10 +7,10 @@ Original license: GPLv3
Original project: https://github.com/LeavesMC/Leaves
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 7b184f16a7759ddfbdf430b2f79f1055a8e77064..f30825df1eb2a4a9383b1fe33fa76ebba98bc999 100644
index f498cfe2051fc8045c02bfaf4d98a3b46ce23aa6..828ada89fc42344e0567346ce9013ddad2e4e782 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1370,6 +1370,7 @@ public abstract class PlayerList {
@@ -1376,6 +1376,7 @@ public abstract class PlayerList {
player.connection.send(new ClientboundInitializeBorderPacket(worldborder));
player.connection.send(new ClientboundSetTimePacket(world.getGameTime(), world.getDayTime(), world.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT)));
player.connection.send(new ClientboundSetDefaultSpawnPositionPacket(world.getSharedSpawnPos(), world.getSharedSpawnAngle()));

View File

@@ -9,7 +9,7 @@ Original project: https://github.com/LeavesMC/Leaves
This patch is Powered by Syncmatica(https://github.com/End-Tech/syncmatica)
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 78374c798272f597067bcf2ff7d9d060c0f4f5b2..1acd2580294af4e7f07a5c5e767d8e3093efca17 100644
index 012af2775a5d6559fdefab7d484f15b475a1c381..5736cb60316da784590ef03d5808376254aae20b 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -311,6 +311,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -20,7 +20,7 @@ index 78374c798272f597067bcf2ff7d9d060c0f4f5b2..1acd2580294af4e7f07a5c5e767d8e30
}
// CraftBukkit start - add fields
@@ -351,6 +352,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -350,6 +351,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
);
// Purpur end

View File

@@ -6,7 +6,7 @@ Subject: [PATCH] Reduce canSee work
Credit by: Martijn Muijsers <martijnmuijsers@live.nl>, MachineBreaker<machinebreaker>
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 0b10bf781dc70c0ea3d5031ac2b5fe5395cb5269..ddbc6340297d4d3e502d00bc3ab4f2b66438472e 100644
index 2c5c84c028d1298bb145fa1149752db3f83d5de2..202805185a61316c559c22be7c0d880d77abc503 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -386,11 +386,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -35,7 +35,7 @@ index 0b10bf781dc70c0ea3d5031ac2b5fe5395cb5269..ddbc6340297d4d3e502d00bc3ab4f2b6
return false;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index d45a8bed2a65f7efb93cfd6d714fe399c615bb1d..c887f6c6f60acee37ff72568f95e5a34d4db53a2 100644
index 7e13ffee8e650cd5fe63fddf636321830e6ffb6d..b1442a099fa38fe20e9421f9183d66cf1ec54c2f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -585,12 +585,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -53,7 +53,7 @@ index d45a8bed2a65f7efb93cfd6d714fe399c615bb1d..c887f6c6f60acee37ff72568f95e5a34
if ((this.getUniqueId() == null) || (other.getUniqueId() == null)) {
return false;
}
@@ -2113,6 +2115,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2160,6 +2162,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.canSee((org.bukkit.entity.Entity) player);
}

View File

@@ -113,7 +113,7 @@ index df8c7a45eb49a8c667030eb67d6d49dcbaef4fcf..6a534272546b19a75880940f39458ca6
@Override
protected float getStandingEyeHeight(Pose pose, EntityDimensions dimensions) {
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index 22a61c89007e624586e7ed518f0aa18372bc4593..609446782958d03ae0d5bef99c1d8e5320dfa037 100644
index 307d2703d61285dfe5225be27d8933098b4aa67c..0a29f28cf666896f0715d40bb121017e4675b4e7 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -1535,6 +1535,7 @@ public class PurpurWorldConfig {
@@ -148,7 +148,7 @@ index 22a61c89007e624586e7ed518f0aa18372bc4593..609446782958d03ae0d5bef99c1d8e53
}
public boolean illusionerRidable = false;
@@ -3126,6 +3130,7 @@ public class PurpurWorldConfig {
@@ -3122,6 +3126,7 @@ public class PurpurWorldConfig {
public boolean zombieTakeDamageFromWater = false;
public boolean zombieAlwaysDropExp = false;
public double zombieHeadVisibilityPercent = 0.5D;
@@ -156,7 +156,7 @@ index 22a61c89007e624586e7ed518f0aa18372bc4593..609446782958d03ae0d5bef99c1d8e53
private void zombieSettings() {
zombieRidable = getBoolean("mobs.zombie.ridable", zombieRidable);
zombieRidableInWater = getBoolean("mobs.zombie.ridable-in-water", zombieRidableInWater);
@@ -3145,6 +3150,7 @@ public class PurpurWorldConfig {
@@ -3141,6 +3146,7 @@ public class PurpurWorldConfig {
zombieTakeDamageFromWater = getBoolean("mobs.zombie.takes-damage-from-water", zombieTakeDamageFromWater);
zombieAlwaysDropExp = getBoolean("mobs.zombie.always-drop-exp", zombieAlwaysDropExp);
zombieHeadVisibilityPercent = getDouble("mobs.zombie.head-visibility-percent", zombieHeadVisibilityPercent);
@@ -164,7 +164,7 @@ index 22a61c89007e624586e7ed518f0aa18372bc4593..609446782958d03ae0d5bef99c1d8e53
}
public boolean zombieHorseRidable = false;
@@ -3193,6 +3199,7 @@ public class PurpurWorldConfig {
@@ -3189,6 +3195,7 @@ public class PurpurWorldConfig {
public int zombieVillagerCuringTimeMax = 6000;
public boolean zombieVillagerCureEnabled = true;
public boolean zombieVillagerAlwaysDropExp = false;
@@ -172,7 +172,7 @@ index 22a61c89007e624586e7ed518f0aa18372bc4593..609446782958d03ae0d5bef99c1d8e53
private void zombieVillagerSettings() {
zombieVillagerRidable = getBoolean("mobs.zombie_villager.ridable", zombieVillagerRidable);
zombieVillagerRidableInWater = getBoolean("mobs.zombie_villager.ridable-in-water", zombieVillagerRidableInWater);
@@ -3212,6 +3219,7 @@ public class PurpurWorldConfig {
@@ -3208,6 +3215,7 @@ public class PurpurWorldConfig {
zombieVillagerCuringTimeMax = getInt("mobs.zombie_villager.curing_time.max", zombieVillagerCuringTimeMax);
zombieVillagerCureEnabled = getBoolean("mobs.zombie_villager.cure.enabled", zombieVillagerCureEnabled);
zombieVillagerAlwaysDropExp = getBoolean("mobs.zombie_villager.always-drop-exp", zombieVillagerAlwaysDropExp);
@@ -180,7 +180,7 @@ index 22a61c89007e624586e7ed518f0aa18372bc4593..609446782958d03ae0d5bef99c1d8e53
}
public boolean zombifiedPiglinRidable = false;
@@ -3225,6 +3233,7 @@ public class PurpurWorldConfig {
@@ -3221,6 +3229,7 @@ public class PurpurWorldConfig {
public boolean zombifiedPiglinCountAsPlayerKillWhenAngry = true;
public boolean zombifiedPiglinTakeDamageFromWater = false;
public boolean zombifiedPiglinAlwaysDropExp = false;
@@ -188,7 +188,7 @@ index 22a61c89007e624586e7ed518f0aa18372bc4593..609446782958d03ae0d5bef99c1d8e53
private void zombifiedPiglinSettings() {
zombifiedPiglinRidable = getBoolean("mobs.zombified_piglin.ridable", zombifiedPiglinRidable);
zombifiedPiglinRidableInWater = getBoolean("mobs.zombified_piglin.ridable-in-water", zombifiedPiglinRidableInWater);
@@ -3242,6 +3251,7 @@ public class PurpurWorldConfig {
@@ -3238,6 +3247,7 @@ public class PurpurWorldConfig {
zombifiedPiglinCountAsPlayerKillWhenAngry = getBoolean("mobs.zombified_piglin.count-as-player-kill-when-angry", zombifiedPiglinCountAsPlayerKillWhenAngry);
zombifiedPiglinTakeDamageFromWater = getBoolean("mobs.zombified_piglin.takes-damage-from-water", zombifiedPiglinTakeDamageFromWater);
zombifiedPiglinAlwaysDropExp = getBoolean("mobs.zombified_piglin.always-drop-exp", zombifiedPiglinAlwaysDropExp);

View File

@@ -13,7 +13,7 @@ Fixed errors in console has no color,also fixed`Advanced terminal features are n
or `Unable to create terminal` like issues
diff --git a/build.gradle.kts b/build.gradle.kts
index eb622ea1c419bc0d514b77af0860ab08e0aa2822..a6ac60d7d57e4b0662b0c30f7bc43ba84179d697 100644
index 081788f064872486f5905dcdde2e1de0495e599e..0baaa2bcd05ea65c5fbb9ae646b3a9eeb12bac14 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -23,7 +23,7 @@ dependencies {
@@ -26,10 +26,10 @@ index eb622ea1c419bc0d514b77af0860ab08e0aa2822..a6ac60d7d57e4b0662b0c30f7bc43ba8
implementation("net.kyori:ansi:1.0.3") // Manually bump beyond above transitive dep
/*
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 625822b060683bfdf3b79f82ed5eea68ff8ade85..fb3bbe36c7bf67be65f0978ead2d4c778c32ba82 100644
index a500372fb5cec834d0d25eb44f46afaa1acf6ffc..1b4e0c7f23186afd88c7a71e296a5ca958f1c1d8 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1276,10 +1276,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1274,10 +1274,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
//org.spigotmc.WatchdogThread.doStop(); // Spigot // Paper - move into stop
// CraftBukkit start - Restore terminal to original settings

View File

@@ -30,7 +30,7 @@ index 0a8e22a7aabca12b3d6391b21d6e431398c01ba9..62e4fa9b5cb4043990c6642df43c8ef5
Vec3 currentMovement = this.getDeltaMovement();
org.bukkit.util.Vector delta = new org.bukkit.util.Vector(currentMovement.x - vec3d.x, currentMovement.y - vec3d.y, currentMovement.z - vec3d.z);
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index 03d263d7ac7e665fb6bf6b258796426ce2c4827c..4d71346ec51c08f2178c4f20da7e25af4fd70495 100644
index b0aa6482936338b5102efaaae682e8b26dc4ede6..040231a7c6388b30d9aa1e0287f3480189c0a511 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1371,11 +1371,22 @@ public abstract class Player extends LivingEntity {
@@ -104,7 +104,7 @@ index 03d263d7ac7e665fb6bf6b258796426ce2c4827c..4d71346ec51c08f2178c4f20da7e25af
if (flag2) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index c887f6c6f60acee37ff72568f95e5a34d4db53a2..a42e3084fa2792bd341a6e3e5b93320e37e4a99c 100644
index b1442a099fa38fe20e9421f9183d66cf1ec54c2f..468ac1525c97043b53b16440fec6bb784e1e9c25 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -67,6 +67,7 @@ import net.minecraft.network.protocol.game.ClientboundSetBorderSizePacket;
@@ -115,7 +115,7 @@ index c887f6c6f60acee37ff72568f95e5a34d4db53a2..a42e3084fa2792bd341a6e3e5b93320e
import net.minecraft.network.protocol.game.ClientboundSetEquipmentPacket;
import net.minecraft.network.protocol.game.ClientboundSetExperiencePacket;
import net.minecraft.network.protocol.game.ClientboundSetHealthPacket;
@@ -3224,6 +3225,40 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -3271,6 +3272,40 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
getHandle().resetAttackStrengthTicker();
}
// Paper end

View File

@@ -1,5 +1,3 @@
import java.util.Locale
pluginManagement {
repositories {
gradlePluginPortal()
@@ -7,9 +5,9 @@ pluginManagement {
}
}
rootProject.name = "Leaf"
rootProject.name = "leaf"
for (name in listOf("Leaf-API", "Leaf-Server")) {
val projName = name.lowercase(Locale.ENGLISH)
val projName = name.lowercase()
include(projName)
findProject(":$projName")!!.projectDir = file(name)
}