mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 15:30:19 +01:00
Updated Upstream (Bukkit) (#10255)
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 58ce1b0f Improve compatibility of new DamageSource API
This commit is contained in:
parent
d884bac087
commit
72004ecb99
3 changed files with 25 additions and 3 deletions
|
@ -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<DamageModifier, Double> modifiers, @NotNull final Map<DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions) {
|
||||
super(damagee, cause, damageSource, modifiers, modifierFunctions);
|
||||
|
|
|
@ -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<DamageModifier, Double> modifiers, @NotNull final Map<DamageModifier, ? extends Function<? super Double, Double>> 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<DamageModifier, Double> modifiers, @NotNull final Map<DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions) {
|
||||
+ public EntityDamageByBlockEvent(@Nullable final Block damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, @NotNull final DamageSource damageSource, @NotNull final Map<DamageModifier, Double> modifiers, @NotNull final Map<DamageModifier, ? extends Function<? super Double, Double>> modifierFunctions, final @Nullable org.bukkit.block.BlockState damagerBlockState) { // Paper
|
||||
super(damagee, cause, damageSource, modifiers, modifierFunctions);
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit a6a9d2a41f83bf0196ab664da0ef748865c805c4
|
||||
Subproject commit 58ce1b0f157c419bab3c256659a7e632f91aeb25
|
Loading…
Reference in a new issue