@@ -24,11 +24,10 @@ public static Config get() {
24
24
DeathDisplayLogic .CODEC .listOf ().listOf ().fieldOf ("death" ).forGetter (Config ::death )
25
25
).apply (instance , Config ::new ));
26
26
27
- @ Nullable
28
27
public void selectDamage (LivingEntity entity , DamageSource source , float amount , BiConsumer <Text , FloatingText .DisplaySettings > consumer ) {
29
28
var predicateContext = PredicateContext .of (entity );
30
29
var attackerContext = source .getAttacker () != null ? PredicateContext .of (source .getAttacker ()) : PredicateContext .of (Objects .requireNonNull (entity .getServer ()));
31
- var sourceContext = source .getSource () != null ? PredicateContext .of (source .getAttacker ()) : PredicateContext .of (Objects .requireNonNull (entity .getServer ()));
30
+ var sourceContext = source .getSource () != null ? PredicateContext .of (source .getSource ()) : PredicateContext .of (Objects .requireNonNull (entity .getServer ()));
32
31
for (var a : this .damage ) {
33
32
for (var e : a ) {
34
33
if (e .match (entity , source , predicateContext , attackerContext , sourceContext )) {
@@ -39,11 +38,10 @@ public void selectDamage(LivingEntity entity, DamageSource source, float amount,
39
38
}
40
39
}
41
40
42
- @ Nullable
43
41
public void selectDeath (LivingEntity entity , DamageSource source , BiConsumer <Text , FloatingText .DisplaySettings > consumer ) {
44
42
var predicateContext = PredicateContext .of (entity );
45
43
var attackerContext = source .getAttacker () != null ? PredicateContext .of (source .getAttacker ()) : PredicateContext .of (Objects .requireNonNull (entity .getServer ()));
46
- var sourceContext = source .getSource () != null ? PredicateContext .of (source .getAttacker ()) : PredicateContext .of (Objects .requireNonNull (entity .getServer ()));
44
+ var sourceContext = source .getSource () != null ? PredicateContext .of (source .getSource ()) : PredicateContext .of (Objects .requireNonNull (entity .getServer ()));
47
45
for (var a : this .death ) {
48
46
for (var e : a ) {
49
47
if (e .match (entity , source , predicateContext , attackerContext , sourceContext )) {
@@ -55,7 +53,6 @@ public void selectDeath(LivingEntity entity, DamageSource source, BiConsumer<Tex
55
53
56
54
}
57
55
58
- @ Nullable
59
56
public void selectHealing (LivingEntity entity , float amount , BiConsumer <Text , FloatingText .DisplaySettings > consumer ) {
60
57
var predicateContext = PredicateContext .of (entity );
61
58
for (var a : this .healing ) {
0 commit comments