diff --git a/patches/api/Add-critical-damage-API.patch b/patches/api/Add-critical-damage-API.patch index 4b9a568c91..cedae1c964 100644 --- a/patches/api/Add-critical-damage-API.patch +++ b/patches/api/Add-critical-damage-API.patch @@ -8,9 +8,9 @@ diff --git a/src/main/java/org/bukkit/event/entity/EntityDamageByEntityEvent.jav index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/event/entity/EntityDamageByEntityEvent.java +++ b/src/main/java/org/bukkit/event/entity/EntityDamageByEntityEvent.java -@@ -0,0 +0,0 @@ import com.google.common.base.Function; - import java.util.Map; +@@ -0,0 +0,0 @@ import java.util.Map; import org.bukkit.damage.DamageSource; + import org.bukkit.damage.DamageType; import org.bukkit.entity.Entity; +import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.NotNull; @@ -22,6 +22,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private final Entity damager; + private final boolean critical; // Paper + @Deprecated(forRemoval = true) + public EntityDamageByEntityEvent(@NotNull final Entity damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, final double damage) { + this(damager, damagee, cause, DamageSource.builder(DamageType.GENERIC).withCausingEntity(damager).withDirectEntity(damager).build(), damage); + } + + @Deprecated public EntityDamageByEntityEvent(@NotNull final Entity damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, @NotNull final DamageSource damageSource, final double damage) { super(damagee, cause, damageSource, damage); @@ -29,6 +34,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + this.critical = false; // Paper - add critical damage API } + @Deprecated(forRemoval = true) +@@ -0,0 +0,0 @@ public class EntityDamageByEntityEvent extends EntityDamageEvent { + this(damager, damagee, cause, DamageSource.builder(DamageType.GENERIC).withCausingEntity(damager).withDirectEntity(damager).build(), modifiers, modifierFunctions); + } + + @Deprecated public EntityDamageByEntityEvent(@NotNull final Entity damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, @NotNull final DamageSource damageSource, @NotNull final Map modifiers, @NotNull final Map> modifierFunctions) { super(damagee, cause, damageSource, modifiers, modifierFunctions); diff --git a/patches/api/Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch b/patches/api/Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch index a7e5824eb9..28e92186b0 100644 --- a/patches/api/Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch +++ b/patches/api/Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch @@ -81,6 +81,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private final Block damager; + private final org.bukkit.block.BlockState damagerBlockState; // Paper + @Deprecated(forRemoval = true) + public EntityDamageByBlockEvent(@Nullable final Block damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, final double damage) { +- this(damager, damagee, cause, (damager != null) ? DamageSource.builder(DamageType.GENERIC).withDamageLocation(damager.getLocation()).build() : DamageSource.builder(DamageType.GENERIC).build(), damage); ++ this(damager, damagee, cause, (damager != null) ? DamageSource.builder(DamageType.GENERIC).withDamageLocation(damager.getLocation()).build() : DamageSource.builder(DamageType.GENERIC).build(), damage, null); // Paper + } + - public EntityDamageByBlockEvent(@Nullable final Block damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, @NotNull final DamageSource damageSource, final double damage) { + public EntityDamageByBlockEvent(@Nullable final Block damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, @NotNull final DamageSource damageSource, final double damage, final @Nullable org.bukkit.block.BlockState damagerBlockState) { // Paper super(damagee, cause, damageSource, damage); @@ -88,6 +94,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + this.damagerBlockState = damagerBlockState; // Paper } + @Deprecated(forRemoval = true) + public EntityDamageByBlockEvent(@Nullable final Block damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, @NotNull final Map modifiers, @NotNull final Map> modifierFunctions) { +- this(damager, damagee, cause, (damager != null) ? DamageSource.builder(DamageType.GENERIC).withDamageLocation(damager.getLocation()).build() : DamageSource.builder(DamageType.GENERIC).build(), modifiers, modifierFunctions); ++ this(damager, damagee, cause, (damager != null) ? DamageSource.builder(DamageType.GENERIC).withDamageLocation(damager.getLocation()).build() : DamageSource.builder(DamageType.GENERIC).build(), modifiers, modifierFunctions, null); // Paper + } + - public EntityDamageByBlockEvent(@Nullable final Block damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, @NotNull final DamageSource damageSource, @NotNull final Map modifiers, @NotNull final Map> modifierFunctions) { + public EntityDamageByBlockEvent(@Nullable final Block damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, @NotNull final DamageSource damageSource, @NotNull final Map modifiers, @NotNull final Map> modifierFunctions, final @Nullable org.bukkit.block.BlockState damagerBlockState) { // Paper super(damagee, cause, damageSource, modifiers, modifierFunctions); diff --git a/work/Bukkit b/work/Bukkit index a6a9d2a41f..58ce1b0f15 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit a6a9d2a41f83bf0196ab664da0ef748865c805c4 +Subproject commit 58ce1b0f157c419bab3c256659a7e632f91aeb25