2
2
3
3
import com .google .common .base .Function ;
4
4
import io .izzel .arclight .common .bridge .bukkit .EntityDamageEventBridge ;
5
- import io .izzel .arclight .common .mod .server .ArclightServer ;
6
5
import org .bukkit .damage .DamageSource ;
7
6
import org .bukkit .entity .Entity ;
8
7
import org .bukkit .event .Event ;
11
10
import org .spongepowered .asm .mixin .Final ;
12
11
import org .spongepowered .asm .mixin .Mixin ;
13
12
import org .spongepowered .asm .mixin .Shadow ;
13
+ import org .spongepowered .asm .mixin .Unique ;
14
14
import org .spongepowered .asm .mixin .injection .At ;
15
15
import org .spongepowered .asm .mixin .injection .Inject ;
16
16
import org .spongepowered .asm .mixin .injection .callback .CallbackInfo ;
@@ -25,8 +25,8 @@ public abstract class EntityDamageEventMixin extends Event implements EntityDama
25
25
26
26
@ Shadow public abstract double getDamage (@ NotNull EntityDamageEvent .DamageModifier type ) throws IllegalArgumentException ;
27
27
28
+ @ Unique
28
29
private Map <EntityDamageEvent .DamageModifier , ? extends Function <? super Double , Double >> arclight$originalFunction ;
29
- private boolean actuallyHurt = false ;
30
30
31
31
@ Inject (method = "<init>(Lorg/bukkit/entity/Entity;Lorg/bukkit/event/entity/EntityDamageEvent$DamageCause;Lorg/bukkit/damage/DamageSource;Ljava/util/Map;Ljava/util/Map;)V" , at = @ At ("RETURN" ))
32
32
private void arclight$init (Entity damagee , EntityDamageEvent .DamageCause cause , DamageSource source , Map modifiers , Map modifierFunctions , CallbackInfo ci ) {
@@ -62,14 +62,4 @@ public abstract class EntityDamageEventMixin extends Event implements EntityDama
62
62
public boolean arclight$isStillOriginal (EntityDamageEvent .DamageModifier modifier , double offset ) {
63
63
return Math .abs (offset - arclight$getOriginalDamage (modifier )) < 10E-3 ;
64
64
}
65
-
66
- @ Override
67
- public void arclight$setActuallyHurt () {
68
- actuallyHurt = true ;
69
- }
70
-
71
- @ Override
72
- public boolean arclight$actuallyHurt () {
73
- return actuallyHurt ;
74
- }
75
65
}
0 commit comments