geforkt von Mirrors/Paper
SPIGOT-7462: Players no longer drop XP after dying near a Sculk Catalyst
By: DerFrZocker <derrieple@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
a9fb0c70f8
Commit
fd3e1799d3
@ -1016,7 +1016,7 @@
|
|||||||
if (blockposition != null) {
|
if (blockposition != null) {
|
||||||
boolean flag2 = blockposition.equals(this.respawnPosition) && resourcekey.equals(this.respawnDimension);
|
boolean flag2 = blockposition.equals(this.respawnPosition) && resourcekey.equals(this.respawnDimension);
|
||||||
|
|
||||||
@@ -1913,4 +2344,146 @@
|
@@ -1913,4 +2344,147 @@
|
||||||
public CommonPlayerSpawnInfo createCommonSpawnInfo(WorldServer worldserver) {
|
public CommonPlayerSpawnInfo createCommonSpawnInfo(WorldServer worldserver) {
|
||||||
return new CommonPlayerSpawnInfo(worldserver.dimensionTypeId(), worldserver.dimension(), BiomeManager.obfuscateSeed(worldserver.getSeed()), this.gameMode.getGameModeForPlayer(), this.gameMode.getPreviousGameModeForPlayer(), worldserver.isDebug(), worldserver.isFlat(), this.getLastDeathLocation(), this.getPortalCooldown());
|
return new CommonPlayerSpawnInfo(worldserver.dimensionTypeId(), worldserver.dimension(), BiomeManager.obfuscateSeed(worldserver.getSeed()), this.gameMode.getGameModeForPlayer(), this.gameMode.getPreviousGameModeForPlayer(), worldserver.isDebug(), worldserver.isFlat(), this.getLastDeathLocation(), this.getPortalCooldown());
|
||||||
}
|
}
|
||||||
@ -1155,6 +1155,7 @@
|
|||||||
+ }
|
+ }
|
||||||
+ this.keepLevel = false;
|
+ this.keepLevel = false;
|
||||||
+ this.setDeltaMovement(0, 0, 0); // CraftBukkit - SPIGOT-6948: Reset velocity on death
|
+ this.setDeltaMovement(0, 0, 0); // CraftBukkit - SPIGOT-6948: Reset velocity on death
|
||||||
|
+ this.skipDropExperience = false; // CraftBukkit - SPIGOT-7462: Reset experience drop skip, so that further deaths drop xp
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
|
@ -31,10 +31,12 @@
|
|||||||
public abstract class EntityLiving extends Entity implements Attackable {
|
public abstract class EntityLiving extends Entity implements Attackable {
|
||||||
|
|
||||||
private static final Logger LOGGER = LogUtils.getLogger();
|
private static final Logger LOGGER = LogUtils.getLogger();
|
||||||
@@ -226,6 +250,20 @@
|
@@ -225,7 +249,21 @@
|
||||||
|
private float swimAmount;
|
||||||
private float swimAmountO;
|
private float swimAmountO;
|
||||||
protected BehaviorController<?> brain;
|
protected BehaviorController<?> brain;
|
||||||
private boolean skipDropExperience;
|
- private boolean skipDropExperience;
|
||||||
|
+ protected boolean skipDropExperience;
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ public int expToDrop;
|
+ public int expToDrop;
|
||||||
+ public boolean forceDrops;
|
+ public boolean forceDrops;
|
||||||
@ -536,7 +538,7 @@
|
|||||||
+ return i;
|
+ return i;
|
||||||
+ } else {
|
+ } else {
|
||||||
+ return 0;
|
+ return 0;
|
||||||
}
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ // 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
|
+ 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);
|
+ EntityExperienceOrb.award((WorldServer) this.level(), this.position(), this.expToDrop);
|
||||||
+ this.expToDrop = 0;
|
+ this.expToDrop = 0;
|
||||||
+ }
|
}
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -652,7 +654,7 @@
|
|||||||
+ };
|
+ };
|
||||||
+ float blockingModifier = blocking.apply((double) f).floatValue();
|
+ float blockingModifier = blocking.apply((double) f).floatValue();
|
||||||
+ f += blockingModifier;
|
+ f += blockingModifier;
|
||||||
+
|
|
||||||
+ Function<Double, Double> armor = new Function<Double, Double>() {
|
+ Function<Double, Double> armor = new Function<Double, Double>() {
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public Double apply(Double f) {
|
+ public Double apply(Double f) {
|
||||||
@ -741,7 +743,7 @@
|
|||||||
+ absorptionModifier = (float) -event.getDamage(DamageModifier.ABSORPTION);
|
+ absorptionModifier = (float) -event.getDamage(DamageModifier.ABSORPTION);
|
||||||
+ this.setAbsorptionAmount(Math.max(this.getAbsorptionAmount() - absorptionModifier, 0.0F));
|
+ this.setAbsorptionAmount(Math.max(this.getAbsorptionAmount() - absorptionModifier, 0.0F));
|
||||||
+ float f2 = absorptionModifier;
|
+ float f2 = absorptionModifier;
|
||||||
|
+
|
||||||
+ if (f2 > 0.0F && f2 < 3.4028235E37F && this instanceof EntityHuman) {
|
+ if (f2 > 0.0F && f2 < 3.4028235E37F && this instanceof EntityHuman) {
|
||||||
+ ((EntityHuman) this).awardStat(StatisticList.DAMAGE_ABSORBED, Math.round(f2 * 10.0F));
|
+ ((EntityHuman) this).awardStat(StatisticList.DAMAGE_ABSORBED, Math.round(f2 * 10.0F));
|
||||||
+ }
|
+ }
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren