重制爆头图标,添加爆头击杀的伤害距离衰减
This commit is contained in:
parent
45829d736a
commit
e7fb6a0311
3 changed files with 7 additions and 7 deletions
|
@ -86,13 +86,13 @@ public class KillMessageOverlay {
|
||||||
if (record.headshot) {
|
if (record.headshot) {
|
||||||
event.getGuiGraphics().blit(HEADSHOT,
|
event.getGuiGraphics().blit(HEADSHOT,
|
||||||
w - targetNameWidth - 65 - attackerNameWidth,
|
w - targetNameWidth - 65 - attackerNameWidth,
|
||||||
h,
|
h - 2,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
8,
|
12,
|
||||||
8,
|
12,
|
||||||
8,
|
12,
|
||||||
8
|
12
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class LivingEntityEventHandler {
|
||||||
|
|
||||||
double damage = amount;
|
double damage = amount;
|
||||||
ItemStack stack = sourceentity instanceof LivingEntity living ? living.getMainHandItem() : ItemStack.EMPTY;
|
ItemStack stack = sourceentity instanceof LivingEntity living ? living.getMainHandItem() : ItemStack.EMPTY;
|
||||||
if (damagesource.is(TargetModDamageTypes.ARROW_IN_BRAIN)) {
|
if (damagesource.is(TargetModDamageTypes.ARROW_IN_BRAIN) || damagesource.is(TargetModDamageTypes.ARROW_IN_BRAIN_HEADSHOT)) {
|
||||||
stack.getOrCreateTag().putDouble("damagetotal", stack.getOrCreateTag().getDouble("damagetotal") + damage);
|
stack.getOrCreateTag().putDouble("damagetotal", stack.getOrCreateTag().getDouble("damagetotal") + damage);
|
||||||
}
|
}
|
||||||
if ((damagesource.is(DamageTypes.EXPLOSION) || damagesource.is(DamageTypes.PLAYER_EXPLOSION) || damagesource.is(DamageTypes.ARROW))
|
if ((damagesource.is(DamageTypes.EXPLOSION) || damagesource.is(DamageTypes.PLAYER_EXPLOSION) || damagesource.is(DamageTypes.ARROW))
|
||||||
|
@ -73,7 +73,7 @@ public class LivingEntityEventHandler {
|
||||||
stack.getOrCreateTag().putDouble("damagetotal", stack.getOrCreateTag().getDouble("damagetotal") + damage);
|
stack.getOrCreateTag().putDouble("damagetotal", stack.getOrCreateTag().getDouble("damagetotal") + damage);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (damagesource.is(TargetModDamageTypes.GUN_FIRE)) {
|
if (damagesource.is(TargetModDamageTypes.GUN_FIRE) || damagesource.is(TargetModDamageTypes.GUN_FIRE_HEADSHOT)) {
|
||||||
double distance = entity.position().distanceTo(sourceentity.position());
|
double distance = entity.position().distanceTo(sourceentity.position());
|
||||||
|
|
||||||
if (stack.is(TargetModTags.Items.SHOTGUN) || stack.getItem() == TargetModItems.BOCEK.get()) {
|
if (stack.is(TargetModTags.Items.SHOTGUN) || stack.getItem() == TargetModItems.BOCEK.get()) {
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 183 B After Width: | Height: | Size: 4 KiB |
Loading…
Add table
Reference in a new issue