mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-19 14:59:32 +00:00
@@ -0,0 +1,59 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
||||
Date: Sun, 6 Apr 2025 10:42:47 +0800
|
||||
Subject: [PATCH] Fix SculkCatalyst exp skip
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java b/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java
|
||||
index 42ffb81708b327f765ba3235fdd1ab69cd7589fd..0a7e37420f8d024ffba1fd1c52edc50c10408e6e 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java
|
||||
@@ -25,17 +25,25 @@ public class EntityDeathEvent extends EntityEvent implements org.bukkit.event.Ca
|
||||
private float deathSoundVolume;
|
||||
private float deathSoundPitch;
|
||||
// Paper end
|
||||
+ private int rewardExp; // Leaves - exp fix
|
||||
|
||||
public EntityDeathEvent(@NotNull final LivingEntity entity, @NotNull DamageSource damageSource, @NotNull final List<ItemStack> drops) {
|
||||
this(entity, damageSource, drops, 0);
|
||||
}
|
||||
|
||||
public EntityDeathEvent(@NotNull final LivingEntity what, @NotNull DamageSource damageSource, @NotNull final List<ItemStack> drops, final int droppedExp) {
|
||||
+ // Leaves start - exp fix
|
||||
+ this(what, damageSource, drops, droppedExp, droppedExp);
|
||||
+ }
|
||||
+
|
||||
+ public EntityDeathEvent(@NotNull final LivingEntity what, @NotNull DamageSource damageSource, @NotNull final List<ItemStack> drops, final int droppedExp, final int rewardExp) {
|
||||
super(what);
|
||||
this.damageSource = damageSource;
|
||||
this.drops = drops;
|
||||
this.dropExp = droppedExp;
|
||||
+ this.rewardExp = rewardExp;
|
||||
}
|
||||
+ // Leaves end - exp fix
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
@@ -75,6 +83,7 @@ public class EntityDeathEvent extends EntityEvent implements org.bukkit.event.Ca
|
||||
*/
|
||||
public void setDroppedExp(int exp) {
|
||||
this.dropExp = exp;
|
||||
+ this.rewardExp = exp; // Leaves - exp fix
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -226,4 +235,14 @@ public class EntityDeathEvent extends EntityEvent implements org.bukkit.event.Ca
|
||||
this.deathSoundPitch = pitch;
|
||||
}
|
||||
// Paper end
|
||||
+
|
||||
+ // Leaves start - exp fix
|
||||
+ public int getRewardExp() {
|
||||
+ return rewardExp;
|
||||
+ }
|
||||
+
|
||||
+ public void setRewardExp(int rewardExp) {
|
||||
+ this.rewardExp = rewardExp;
|
||||
+ }
|
||||
+ // Leaves end - exp fix
|
||||
}
|
||||
Reference in New Issue
Block a user