[ci skip] Cleanup events (#10202)

This commit is contained in:
Lulu13022002 2024-02-01 10:15:57 +01:00 committed by GitHub
parent b3c81089ae
commit 294347bee2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
295 changed files with 3245 additions and 3088 deletions

View file

@ -33,10 +33,10 @@ index 433d8eccdd225651af8c88babfdb94d19ce546d8..026654c4d3a910f0dbfed5475f231370
}
}
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index 2759fa8768cfa7a38af7266a8e58af5feab138fa..3ccfc9cbf1b9dd91f3cefaec8f2dbcfa6afba8a9 100644
index d8ef2466e235b8121dd04bde0800ed2dbf8e370c..4f2d4ed485ce0d5f82f562281c40dc6a660e554b 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -969,7 +969,7 @@ public abstract class Player extends LivingEntity {
@@ -971,7 +971,7 @@ public abstract class Player extends LivingEntity {
protected void blockUsingShield(LivingEntity attacker) {
super.blockUsingShield(attacker);
if (attacker.canDisableShield()) {
@ -45,11 +45,11 @@ index 2759fa8768cfa7a38af7266a8e58af5feab138fa..3ccfc9cbf1b9dd91f3cefaec8f2dbcfa
}
}
@@ -1452,7 +1452,14 @@ public abstract class Player extends LivingEntity {
@@ -1454,7 +1454,14 @@ public abstract class Player extends LivingEntity {
this.attack(target);
}
+ @io.papermc.paper.annotation.DoNotUse // Paper - Add PlayerShieldDisableEvent
+ @io.papermc.paper.annotation.DoNotUse @Deprecated // Paper - Add PlayerShieldDisableEvent
public void disableShield(boolean sprinting) {
+ // Paper start - Add PlayerShieldDisableEvent
+ disableShield(sprinting, null);
@ -60,7 +60,7 @@ index 2759fa8768cfa7a38af7266a8e58af5feab138fa..3ccfc9cbf1b9dd91f3cefaec8f2dbcfa
float f = 0.25F + (float) EnchantmentHelper.getBlockEfficiency(this) * 0.05F;
if (sprinting) {
@@ -1460,7 +1467,16 @@ public abstract class Player extends LivingEntity {
@@ -1462,7 +1469,16 @@ public abstract class Player extends LivingEntity {
}
if (this.random.nextFloat() < f) {