refactor: fix up patches

docs: fix an error
This commit is contained in:
Helvetica Volubi
2025-06-07 21:06:48 +08:00
committed by Helvetica Volubi
parent 0a2838607c
commit 785d82c433
4 changed files with 30 additions and 36 deletions

View File

@@ -15,7 +15,7 @@ body:
如果此bug被尝试修复您可以帮助我们测试并回复。若bug的确被修复您可以关闭issue来让开发者确认。 如果此bug被尝试修复您可以帮助我们测试并回复。若bug的确被修复您可以关闭issue来让开发者确认。
If this bug is tried to fix, you can help us test and reply. If the bug is fixed, you can close the issue to let the developer confirm. If this bug is tried to fix, you can help us test and reply. If the bug is fixed, you can close the issue to let the developer confirm.
- type: input - type: input
id: leavesMC-version id: luminolMC-version
attributes: attributes:
label: 服务端版本 LuminolMC Version label: 服务端版本 LuminolMC Version
description: description:

View File

@@ -63,7 +63,7 @@ BTW, `*-api` and `*-server` and are not normal git repositories.
- Before applying patches, the base will point to unmodified source code. - Before applying patches, the base will point to unmodified source code.
- Every commit after the base is a patch. - Every commit after the base is a patch.
- Only commits after the last commit of Paper will be considered as Luminol patches. - Only commits after the last commit of Folia will be considered as Luminol patches.
## Adding new patches ## Adding new patches

View File

@@ -53,3 +53,31 @@ index 76c08499b704a6cb0cb95ce69b9a9248d69cc127..d516595a8675a9f3d9c14658b66160ba
+ } + }
+ // Leaves end - exp fix + // Leaves end - exp fix
} }
diff --git a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
index 6316a2f1d2dc0314397e33e6dbd354fb8bc50541..6e2d1bf0e8eb9fa4917b464324a02b9b5d0dd496 100644
--- a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
+++ b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
@@ -25,6 +25,7 @@ public class PlayerDeathEvent extends EntityDeathEvent {
private boolean doExpDrop;
private boolean keepLevel = false;
private boolean keepInventory = false;
+ private boolean useApiExpDropStatus = false; // Leaves - exp fix
@Deprecated
private final List<ItemStack> itemsToKeep = new ArrayList<>();
@@ -82,8 +83,15 @@ public class PlayerDeathEvent extends EntityDeathEvent {
this.showDeathMessages = true;
this.deathMessage = LegacyComponentSerializer.legacySection().deserializeOrNull(deathMessage);
this.doExpDrop = doExpDrop;
+ this.useApiExpDropStatus = true; // Leaves - exp fix
}
+ // Leaves start - exp fix
+ public boolean forceUseEventDropStatus() {
+ return this.useApiExpDropStatus;
+ }
+ // Leaves end - exp fix
+
@NotNull
@Override
public Player getEntity() {

View File

@@ -1,34 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
Date: Sat, 24 May 2025 01:47:10 +0800
Subject: [PATCH] Leaves Fix SculkCatalyst exp skip
diff --git a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
index 6316a2f1d2dc0314397e33e6dbd354fb8bc50541..6e2d1bf0e8eb9fa4917b464324a02b9b5d0dd496 100644
--- a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
+++ b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
@@ -25,6 +25,7 @@ public class PlayerDeathEvent extends EntityDeathEvent {
private boolean doExpDrop;
private boolean keepLevel = false;
private boolean keepInventory = false;
+ private boolean useApiExpDropStatus = false; // Leaves - exp fix
@Deprecated
private final List<ItemStack> itemsToKeep = new ArrayList<>();
@@ -82,8 +83,15 @@ public class PlayerDeathEvent extends EntityDeathEvent {
this.showDeathMessages = true;
this.deathMessage = LegacyComponentSerializer.legacySection().deserializeOrNull(deathMessage);
this.doExpDrop = doExpDrop;
+ this.useApiExpDropStatus = true; // Leaves - exp fix
}
+ // Leaves start - exp fix
+ public boolean forceUseEventDropStatus() {
+ return this.useApiExpDropStatus;
+ }
+ // Leaves end - exp fix
+
@NotNull
@Override
public Player getEntity() {