mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@51fe7aaa Fixed modern forwarding support (#13098) PaperMC/Paper@5613a359 fix PlayerGameModeChangeEvent#cancelMessage PaperMC/Paper@673abf4b use PlayerShieldDisableEvent#getCooldown PaperMC/Paper@3a0dc7fa Fix a couple PlayerProfile mutability issues PaperMC/Paper@e97fb404 Remove parallel generation config option PaperMC/Paper@c3a60b8d Use ThreadLocal for Starlight and ticket level propagator cache PaperMC/Paper@e16b369f Resize propagator queues less aggressively PaperMC/Paper@922c85fe Add GAMEMODE_SWITCHER gamemode change cause (#13097) PaperMC/Paper@c1013989 remove old configs PaperMC/Paper@f57fd541 remove api scheduled for removal
This commit is contained in:
@@ -18,7 +18,7 @@ index aa87e93ade4c25a575e7861fef45b70c3e4e3aeb..c92ffd8b2fe4945ccd552eb54154b7be
|
||||
public boolean isClientAuthoritative() {
|
||||
return false;
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 5fec8ac15b16050baa533b73e33c899f4b08d23e..b44d17ee11b995720d6bc68b2db094ab88c0d53c 100644
|
||||
index 9dffc51f3651169e81e1617bce4562faf35c12f6..5f86c3024a857d5ec3ac39a4ef1d2a77b452c2bb 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1683,6 +1683,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -42,7 +42,7 @@ index 187fd32cdc6a37974cb9e55997dfdda57f7cbfa5..5fe9976ccd113eddd94e328b37946ef0
|
||||
@Override
|
||||
public @Nullable LevelChunk getChunkIfLoaded(int x, int z) {
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index abdf441ee5ac0586afe7ca60066163e64fb6a5fc..b405e129cb2a5dba3ea4db29823e8f6964255f3b 100644
|
||||
index 5477fd9bc0a30b0d566d982b86b737cb6392b030..8c0cdb6aaf2f546b90d7d6b0d9dfc1c053479de7 100644
|
||||
--- a/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -774,6 +774,15 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc
|
||||
@@ -62,7 +62,7 @@ index abdf441ee5ac0586afe7ca60066163e64fb6a5fc..b405e129cb2a5dba3ea4db29823e8f69
|
||||
|
||||
private void updatePlayerAttributes() {
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 3c5c7006dc68377a97682b1e73e5b45cface045c..726f2d5471cf536b1ba042dcb7f0120f8526d1d5 100644
|
||||
index 8813b9d09b0ffaf235516cada788df92a7730eaa..c643f0546613e8f4783d1e0830f7267570de7ea7 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2862,6 +2862,8 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -177,7 +177,7 @@ index f0c452ddc4b299a930de261722cc41a89aa78eeb..8e8ddab59de508c84c4182e105a11554
|
||||
protected ParticleOptions getInkParticle() {
|
||||
return ParticleTypes.GLOW_SQUID_INK;
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index 59e6a2c3e1a02b8778fb31e49fdc19fa14594085..634c8ee07d27985743d2b8774ed923f0ff63dca2 100644
|
||||
index d6540b82ce0f7c8fde596c6af24212bac1ef54bd..fdf197b040b87468fe89d86f21688c7c07bef853 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -239,9 +239,9 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -193,7 +193,7 @@ index 59e6a2c3e1a02b8778fb31e49fdc19fa14594085..634c8ee07d27985743d2b8774ed923f0
|
||||
protected InterpolationHandler interpolation = new InterpolationHandler(this);
|
||||
protected double lerpYHeadRot;
|
||||
protected int lerpHeadSteps;
|
||||
@@ -291,7 +291,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -290,7 +290,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
|
||||
protected LivingEntity(EntityType<? extends LivingEntity> entityType, Level level) {
|
||||
super(entityType, level);
|
||||
@@ -202,7 +202,7 @@ index 59e6a2c3e1a02b8778fb31e49fdc19fa14594085..634c8ee07d27985743d2b8774ed923f0
|
||||
this.craftAttributes = new org.bukkit.craftbukkit.attribute.CraftAttributeMap(this.attributes); // CraftBukkit
|
||||
// CraftBukkit - this.setHealth(this.getMaxHealth()) inlined and simplified to skip the instanceof check for Player, as getBukkitEntity() is not initialized in constructor
|
||||
this.entityData.set(LivingEntity.DATA_HEALTH_ID, this.getMaxHealth());
|
||||
@@ -371,6 +371,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -370,6 +370,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
.add(Attributes.CAMERA_DISTANCE)
|
||||
.add(Attributes.WAYPOINT_TRANSMIT_RANGE);
|
||||
}
|
||||
@@ -210,7 +210,7 @@ index 59e6a2c3e1a02b8778fb31e49fdc19fa14594085..634c8ee07d27985743d2b8774ed923f0
|
||||
|
||||
@Override
|
||||
protected void checkFallDamage(double y, boolean onGround, BlockState state, BlockPos pos) {
|
||||
@@ -3058,6 +3059,20 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -3057,6 +3058,20 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
this.move(MoverType.SELF, this.getDeltaMovement());
|
||||
this.setDeltaMovement(this.getDeltaMovement().scale(0.5));
|
||||
} else {
|
||||
@@ -231,7 +231,7 @@ index 59e6a2c3e1a02b8778fb31e49fdc19fa14594085..634c8ee07d27985743d2b8774ed923f0
|
||||
this.moveRelative(amount, relative);
|
||||
this.move(MoverType.SELF, this.getDeltaMovement());
|
||||
this.setDeltaMovement(this.getDeltaMovement().scale(0.91F));
|
||||
@@ -3661,8 +3676,10 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -3660,8 +3675,10 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
this.pushEntities();
|
||||
profilerFiller.pop();
|
||||
// Paper start - Add EntityMoveEvent
|
||||
@@ -244,7 +244,7 @@ index 59e6a2c3e1a02b8778fb31e49fdc19fa14594085..634c8ee07d27985743d2b8774ed923f0
|
||||
Location from = new Location(this.level().getWorld(), this.xo, this.yo, this.zo, this.yRotO, this.xRotO);
|
||||
Location to = new Location(this.level().getWorld(), this.getX(), this.getY(), this.getZ(), this.getYRot(), this.getXRot());
|
||||
io.papermc.paper.event.entity.EntityMoveEvent event = new io.papermc.paper.event.entity.EntityMoveEvent(this.getBukkitLivingEntity(), from, to.clone());
|
||||
@@ -3672,6 +3689,21 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -3671,6 +3688,21 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
this.absSnapTo(event.getTo().getX(), event.getTo().getY(), event.getTo().getZ(), event.getTo().getYaw(), event.getTo().getPitch());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,10 +23,10 @@ index 8e8ddab59de508c84c4182e105a11554387dcce0..1896f91e10a5e17332836d5354813a18
|
||||
protected ParticleOptions getInkParticle() {
|
||||
return ParticleTypes.GLOW_SQUID_INK;
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index 634c8ee07d27985743d2b8774ed923f0ff63dca2..5f61e79f07c408197ed92707a7b14b588477e438 100644
|
||||
index fdf197b040b87468fe89d86f21688c7c07bef853..41d0bab1a046fdfd1a266883e2b522cf63b87157 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -292,6 +292,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -291,6 +291,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
protected LivingEntity(EntityType<? extends LivingEntity> entityType, Level level) {
|
||||
super(entityType, level);
|
||||
this.attributes = new AttributeMap(DefaultAttributes.getSupplier(entityType), this); // Purpur - Ridables
|
||||
@@ -34,7 +34,7 @@ index 634c8ee07d27985743d2b8774ed923f0ff63dca2..5f61e79f07c408197ed92707a7b14b58
|
||||
this.craftAttributes = new org.bukkit.craftbukkit.attribute.CraftAttributeMap(this.attributes); // CraftBukkit
|
||||
// CraftBukkit - this.setHealth(this.getMaxHealth()) inlined and simplified to skip the instanceof check for Player, as getBukkitEntity() is not initialized in constructor
|
||||
this.entityData.set(LivingEntity.DATA_HEALTH_ID, this.getMaxHealth());
|
||||
@@ -316,6 +317,8 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -315,6 +316,8 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
return new EntityEquipment();
|
||||
}
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Implement elytra settings
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index a8de0e01547d94db3588f2a90309bfa0bccf509c..b1dcb5d8849a1b5e93b01f883f1519aaebba82da 100644
|
||||
index 41d0bab1a046fdfd1a266883e2b522cf63b87157..f48c543287a99d4281de4085e7a65f128bd2dc4a 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3745,7 +3745,18 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -3744,7 +3744,18 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
.filter(equipmentSlot1 -> canGlideUsing(this.getItemBySlot(equipmentSlot1), equipmentSlot1))
|
||||
.toList();
|
||||
EquipmentSlot equipmentSlot = Util.getRandom(list, this.random);
|
||||
@@ -51,7 +51,7 @@ index f86b0579e707ecfa5c2074ea22bbe383b5e11841..43a6d9bd3a2e301e3957e9933663c3af
|
||||
itemInHand.shrink(1); // Moved up from below
|
||||
} else {
|
||||
diff --git a/net/minecraft/world/item/ItemStack.java b/net/minecraft/world/item/ItemStack.java
|
||||
index c473caf0d333512524eb724340000dcc9f4fc042..84a4c79fd1ac92c10d6605e1c20a066b04a06dd5 100644
|
||||
index 2d9fbd3173df397e7debd9c08d4c8c5e760246e6..358d69bdca0aa46d1952d3ef9bf9b65dc39a3338 100644
|
||||
--- a/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/net/minecraft/world/item/ItemStack.java
|
||||
@@ -697,6 +697,14 @@ public final class ItemStack implements DataComponentHolder {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add mobGriefing override to everything affected
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index a022ce7041c47c4d94679a3e322ca4f7486d77bf..7113d74f4684313d67d64a9449424c6e6243ce1f 100644
|
||||
index f48c543287a99d4281de4085e7a65f128bd2dc4a..7c65124b4c10166d57ac3c0e8435be06bf05efef 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1944,7 +1944,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -1943,7 +1943,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
if (this.level() instanceof ServerLevel serverLevel) {
|
||||
boolean var6 = false;
|
||||
if (this.dead && entitySource instanceof WitherBoss) { // Paper
|
||||
@@ -227,7 +227,7 @@ index c200d57841304ba0d7a76fdd9a440fe9f2b25136..6f4aaeb645d9638764c3516d2f150166
|
||||
continue;
|
||||
}
|
||||
diff --git a/net/minecraft/world/entity/monster/piglin/Piglin.java b/net/minecraft/world/entity/monster/piglin/Piglin.java
|
||||
index b8f994025c0511169174154a077d9e34eac2443a..033e619f91fe3010a8056974d812351494c65f72 100644
|
||||
index c44fd14350b2504fc38ae22a61029d5c44b60918..1d9dc37055a2a9f41945b39812e1be15a8eb57e5 100644
|
||||
--- a/net/minecraft/world/entity/monster/piglin/Piglin.java
|
||||
+++ b/net/minecraft/world/entity/monster/piglin/Piglin.java
|
||||
@@ -438,7 +438,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento
|
||||
|
||||
@@ -35,18 +35,18 @@ index ef77be60df1cf44088e684c21dbcaf3032bb3ad6..92292ae5a313e85a3238427e7ab19c73
|
||||
this.type = entityType;
|
||||
this.level = level;
|
||||
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
|
||||
index 7113d74f4684313d67d64a9449424c6e6243ce1f..173647156cf97a476931fc8b59be4c988b7107ce 100644
|
||||
index 7c65124b4c10166d57ac3c0e8435be06bf05efef..6eb4efd8220be4a06ae3306595b64a94f23538c3 100644
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -287,6 +287,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -286,6 +286,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper
|
||||
public boolean silentDeath = false; // Paper - mark entity as dying silently for cancellable death event
|
||||
public net.kyori.adventure.util.TriState frictionState = net.kyori.adventure.util.TriState.NOT_SET; // Paper - Friction API
|
||||
public int shieldBlockingDelay = this.level().paperConfig().misc.shieldBlockingDelay; // Paper - Make shield blocking delay configurable
|
||||
+ protected boolean shouldBurnInDay = false; public boolean shouldBurnInDay() { return this.shouldBurnInDay; } public void setShouldBurnInDay(boolean shouldBurnInDay) { this.shouldBurnInDay = shouldBurnInDay; } // Purpur - API for any mob to burn daylight
|
||||
// CraftBukkit end
|
||||
|
||||
protected LivingEntity(EntityType<? extends LivingEntity> entityType, Level level) {
|
||||
@@ -796,6 +797,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -795,6 +796,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
this.getSleepingPos().ifPresent(blockPos -> output.store("sleeping_pos", BlockPos.CODEC, blockPos));
|
||||
DataResult<Dynamic<?>> dataResult = this.brain.serializeStart(NbtOps.INSTANCE).map(tag -> new Dynamic<>(NbtOps.INSTANCE, tag));
|
||||
dataResult.resultOrPartial(LOGGER::error).ifPresent(dynamic -> output.store("Brain", Codec.PASSTHROUGH, (Dynamic<?>)dynamic));
|
||||
@@ -54,7 +54,7 @@ index 7113d74f4684313d67d64a9449424c6e6243ce1f..173647156cf97a476931fc8b59be4c98
|
||||
if (this.lastHurtByPlayer != null) {
|
||||
this.lastHurtByPlayer.store(output, "last_hurt_by_player");
|
||||
output.putInt("last_hurt_by_player_memory_time", this.lastHurtByPlayerMemoryTime);
|
||||
@@ -922,6 +924,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -921,6 +923,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
} // Paper - The sleeping pos will always also set the actual pos, so a desync suggests something is wrong
|
||||
}, this::clearSleepingPos);
|
||||
input.read("Brain", Codec.PASSTHROUGH).ifPresent(dynamic -> this.brain = this.makeBrain((Dynamic<?>)dynamic));
|
||||
@@ -62,7 +62,7 @@ index 7113d74f4684313d67d64a9449424c6e6243ce1f..173647156cf97a476931fc8b59be4c98
|
||||
this.lastHurtByPlayer = EntityReference.read(input, "last_hurt_by_player");
|
||||
this.lastHurtByPlayerMemoryTime = input.getIntOr("last_hurt_by_player_memory_time", 0);
|
||||
this.lastHurtByMob = EntityReference.read(input, "last_hurt_by_mob");
|
||||
@@ -3712,6 +3715,32 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
@@ -3711,6 +3714,32 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin
|
||||
if (this.level() instanceof ServerLevel serverLevel && this.isSensitiveToWater() && this.isInWaterOrRain()) {
|
||||
this.hurtServer(serverLevel, this.damageSources().drown(), 1.0F);
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
@Override
|
||||
public void displayClientMessage(Component chatComponent, boolean actionBar) {
|
||||
this.sendSystemMessage(chatComponent, actionBar);
|
||||
@@ -2325,6 +_,20 @@
|
||||
@@ -2327,6 +_,20 @@
|
||||
);
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
public void sendSystemMessage(Component mesage) {
|
||||
this.sendSystemMessage(mesage, false);
|
||||
}
|
||||
@@ -2463,7 +_,67 @@
|
||||
@@ -2465,7 +_,67 @@
|
||||
|
||||
public void resetLastActionTime() {
|
||||
this.lastActionTime = Util.getMillis();
|
||||
@@ -215,7 +215,7 @@
|
||||
|
||||
public ServerStatsCounter getStats() {
|
||||
return this.stats;
|
||||
@@ -3105,4 +_,56 @@
|
||||
@@ -3107,4 +_,56 @@
|
||||
return (org.bukkit.craftbukkit.entity.CraftPlayer) super.getBukkitEntity();
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -447,6 +_,12 @@
|
||||
@@ -446,6 +_,12 @@
|
||||
if (d < 0.0) {
|
||||
double damagePerBlock = serverLevel1.getWorldBorder().getDamagePerBlock();
|
||||
if (damagePerBlock > 0.0) {
|
||||
@@ -13,7 +13,7 @@
|
||||
this.hurtServer(serverLevel1, this.damageSources().outOfBorder(), Math.max(1, Mth.floor(-d * damagePerBlock)));
|
||||
}
|
||||
}
|
||||
@@ -462,7 +_,7 @@
|
||||
@@ -461,7 +_,7 @@
|
||||
if (this.shouldTakeDrowningDamage()) {
|
||||
this.setAirSupply(0);
|
||||
serverLevel1.broadcastEntityEvent(this, (byte)67);
|
||||
@@ -22,7 +22,7 @@
|
||||
}
|
||||
} else if (this.getAirSupply() < this.getMaxAirSupply()) {
|
||||
this.setAirSupply(this.increaseAirSupply(this.getAirSupply()));
|
||||
@@ -522,7 +_,7 @@
|
||||
@@ -521,7 +_,7 @@
|
||||
}
|
||||
|
||||
protected boolean shouldTakeDrowningDamage() {
|
||||
@@ -31,7 +31,7 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1046,14 +_,32 @@
|
||||
@@ -1045,14 +_,32 @@
|
||||
if (lookingEntity != null) {
|
||||
ItemStack itemBySlot = this.getItemBySlot(EquipmentSlot.HEAD);
|
||||
EntityType<?> type = lookingEntity.getType();
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
return d;
|
||||
}
|
||||
@@ -1100,6 +_,7 @@
|
||||
@@ -1099,6 +_,7 @@
|
||||
Iterator<MobEffectInstance> iterator = this.activeEffects.values().iterator();
|
||||
while (iterator.hasNext()) {
|
||||
MobEffectInstance effect = iterator.next();
|
||||
@@ -80,7 +80,7 @@
|
||||
EntityPotionEffectEvent event = CraftEventFactory.callEntityPotionEffectChangeEvent(this, effect, null, cause, EntityPotionEffectEvent.Action.CLEARED);
|
||||
if (event.isCancelled()) {
|
||||
continue;
|
||||
@@ -1424,6 +_,24 @@
|
||||
@@ -1423,6 +_,24 @@
|
||||
this.stopSleeping();
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
this.noActionTime = 0;
|
||||
if (amount < 0.0F) {
|
||||
amount = 0.0F;
|
||||
@@ -1686,10 +_,10 @@
|
||||
@@ -1685,10 +_,10 @@
|
||||
protected Player resolvePlayerResponsibleForDamage(DamageSource damageSource) {
|
||||
Entity entity = damageSource.getEntity();
|
||||
if (entity instanceof Player player) {
|
||||
@@ -118,7 +118,7 @@
|
||||
} else {
|
||||
this.lastHurtByPlayer = null;
|
||||
this.lastHurtByPlayerMemoryTime = 0;
|
||||
@@ -1740,6 +_,18 @@
|
||||
@@ -1739,6 +_,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
final org.bukkit.inventory.EquipmentSlot handSlot = (hand != null) ? org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(hand) : null;
|
||||
final EntityResurrectEvent event = new EntityResurrectEvent((org.bukkit.entity.LivingEntity) this.getBukkitEntity(), handSlot);
|
||||
event.setCancelled(itemStack == null);
|
||||
@@ -1915,6 +_,7 @@
|
||||
@@ -1914,6 +_,7 @@
|
||||
boolean flag = this.lastHurtByPlayerMemoryTime > 0;
|
||||
this.dropEquipment(level); // CraftBukkit - from below
|
||||
if (this.shouldDropLoot(level)) {
|
||||
@@ -145,7 +145,7 @@
|
||||
this.dropFromLootTable(level, damageSource, flag);
|
||||
// Paper start
|
||||
final boolean prev = this.clearEquipmentSlots;
|
||||
@@ -1923,6 +_,7 @@
|
||||
@@ -1922,6 +_,7 @@
|
||||
// Paper end
|
||||
this.dropCustomDeathLoot(level, damageSource, flag);
|
||||
this.clearEquipmentSlots = prev; // Paper
|
||||
@@ -153,7 +153,7 @@
|
||||
}
|
||||
|
||||
// CraftBukkit start - Call death event // Paper start - call advancement triggers with correct entity equipment
|
||||
@@ -3141,6 +_,7 @@
|
||||
@@ -3140,6 +_,7 @@
|
||||
float f = (float)(d * 10.0 - 3.0);
|
||||
if (f > 0.0F) {
|
||||
this.playSound(this.getFallDamageSound((int)f), 1.0F, 1.0F);
|
||||
@@ -161,7 +161,7 @@
|
||||
this.hurt(this.damageSources().flyIntoWall(), f);
|
||||
}
|
||||
}
|
||||
@@ -4540,6 +_,12 @@
|
||||
@@ -4539,6 +_,12 @@
|
||||
? slot == EquipmentSlot.MAINHAND && this.canUseSlot(EquipmentSlot.MAINHAND)
|
||||
: slot == equippable.slot() && this.canUseSlot(equippable.slot()) && equippable.canBeEquippedBy(this.getType());
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@ index e5d23a8d571fda492bc6dd6ee6694f175ff30ba1..5e46428e5dd24c581c816125b52cb32d
|
||||
Preconditions.checkArgument(entity != null, "Unknown entity");
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 1ed274542d32a5efbf8af4d5a0f197c98902f810..1e79357a3f31efd479720e78821962e5d6ff6db4 100644
|
||||
index 0d9c2a68dd665aec471f57c370a139f03e97718c..3e79cebf42b61afedd3893aee04ab051fe403280 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -1142,4 +1142,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@@ -1132,4 +1132,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
public CombatTracker getCombatTracker() {
|
||||
return this.getHandle().getCombatTracker().paperCombatTracker;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user