remove useless patch
This commit is contained in:
@@ -1,86 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
|
||||||
Date: Sat, 24 May 2025 01:25:10 +0800
|
|
||||||
Subject: [PATCH] Leaves: Fix SculkCatalyst exp skip
|
|
||||||
|
|
||||||
Co-authored by: violetc <58360096+s-yh-china@users.noreply.github.com>
|
|
||||||
As part of: Leaves (https://github.com/LeavesMC/Leaves/blob/ea91106ae57fc4cc14e2e0225009cf9919072f7f/leaves-api/paper-patches/features/0007-Fix-SculkCatalyst-exp-skip.patch)
|
|
||||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java b/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java
|
|
||||||
index 76c08499b704a6cb0cb95ce69b9a9248d69cc127..d516595a8675a9f3d9c14658b66160ba4b3c4278 100644
|
|
||||||
--- a/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java
|
|
||||||
+++ b/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java
|
|
||||||
@@ -27,6 +27,7 @@ public class EntityDeathEvent extends EntityEvent implements Cancellable {
|
|
||||||
@Nullable private org.bukkit.SoundCategory deathSoundCategory;
|
|
||||||
private float deathSoundVolume;
|
|
||||||
private float deathSoundPitch;
|
|
||||||
+ private int rewardExp; // Leaves - exp fix
|
|
||||||
|
|
||||||
private boolean cancelled;
|
|
||||||
|
|
||||||
@@ -35,13 +36,20 @@ public class EntityDeathEvent extends EntityEvent implements Cancellable {
|
|
||||||
this(livingEntity, damageSource, drops, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
- @ApiStatus.Internal
|
|
||||||
public EntityDeathEvent(@NotNull final LivingEntity livingEntity, @NotNull DamageSource damageSource, @NotNull final List<ItemStack> drops, final int droppedExp) {
|
|
||||||
+ // Leaves start - exp fix
|
|
||||||
+ this(livingEntity, damageSource, drops, droppedExp, droppedExp);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ @ApiStatus.Internal
|
|
||||||
+ public EntityDeathEvent(@NotNull final LivingEntity livingEntity, @NotNull DamageSource damageSource, @NotNull final List<ItemStack> drops, final int droppedExp, final int rewardExp) {
|
|
||||||
super(livingEntity);
|
|
||||||
this.damageSource = damageSource;
|
|
||||||
this.drops = drops;
|
|
||||||
this.dropExp = droppedExp;
|
|
||||||
+ this.rewardExp = rewardExp;
|
|
||||||
}
|
|
||||||
+ // Leaves end - exp fix
|
|
||||||
|
|
||||||
@NotNull
|
|
||||||
@Override
|
|
||||||
@@ -230,4 +238,14 @@ public class EntityDeathEvent extends EntityEvent implements Cancellable {
|
|
||||||
public static HandlerList getHandlerList() {
|
|
||||||
return HANDLER_LIST;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ // Leaves start - exp fix
|
|
||||||
+ public int getRewardExp() {
|
|
||||||
+ return rewardExp;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ public void setRewardExp(int rewardExp) {
|
|
||||||
+ this.rewardExp = rewardExp;
|
|
||||||
+ }
|
|
||||||
+ // 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 78497c423edaff9550315610ccc2f3d4d3614dce..187fb47ba43d300997f19ecb82ddc41fdd312ec1 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() {
|
|
||||||
Reference in New Issue
Block a user