SPIGOT-7462: Players no longer drop XP after dying near a Sculk Catalyst
By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
@@ -31,10 +31,12 @@
|
||||
public abstract class EntityLiving extends Entity implements Attackable {
|
||||
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -226,6 +250,20 @@
|
||||
@@ -225,7 +249,21 @@
|
||||
private float swimAmount;
|
||||
private float swimAmountO;
|
||||
protected BehaviorController<?> brain;
|
||||
private boolean skipDropExperience;
|
||||
- private boolean skipDropExperience;
|
||||
+ protected boolean skipDropExperience;
|
||||
+ // CraftBukkit start
|
||||
+ public int expToDrop;
|
||||
+ public boolean forceDrops;
|
||||
@@ -536,7 +538,7 @@
|
||||
+ return i;
|
||||
+ } else {
|
||||
+ return 0;
|
||||
}
|
||||
+ }
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
@@ -545,7 +547,7 @@
|
||||
+ if (true && !(this instanceof net.minecraft.world.entity.boss.enderdragon.EntityEnderDragon)) { // CraftBukkit - SPIGOT-2420: Special case ender dragon will drop the xp over time
|
||||
+ EntityExperienceOrb.award((WorldServer) this.level(), this.position(), this.expToDrop);
|
||||
+ this.expToDrop = 0;
|
||||
+ }
|
||||
}
|
||||
+ // CraftBukkit end
|
||||
|
||||
}
|
||||
@@ -652,7 +654,7 @@
|
||||
+ };
|
||||
+ float blockingModifier = blocking.apply((double) f).floatValue();
|
||||
+ f += blockingModifier;
|
||||
+
|
||||
|
||||
+ Function<Double, Double> armor = new Function<Double, Double>() {
|
||||
+ @Override
|
||||
+ public Double apply(Double f) {
|
||||
@@ -741,7 +743,7 @@
|
||||
+ absorptionModifier = (float) -event.getDamage(DamageModifier.ABSORPTION);
|
||||
+ this.setAbsorptionAmount(Math.max(this.getAbsorptionAmount() - absorptionModifier, 0.0F));
|
||||
+ float f2 = absorptionModifier;
|
||||
|
||||
+
|
||||
+ if (f2 > 0.0F && f2 < 3.4028235E37F && this instanceof EntityHuman) {
|
||||
+ ((EntityHuman) this).awardStat(StatisticList.DAMAGE_ABSORBED, Math.round(f2 * 10.0F));
|
||||
+ }
|
||||
|
||||
Reference in New Issue
Block a user