对齐击杀提示
This commit is contained in:
parent
e9d77974b9
commit
a4cd9e40d9
3 changed files with 6 additions and 4 deletions
|
@ -4,7 +4,7 @@ plugins {
|
|||
id 'org.spongepowered.mixin' version '0.7.+'
|
||||
}
|
||||
|
||||
version = '0.0.7-SNAPSHOT'
|
||||
version = '0.0.8-SNAPSHOT'
|
||||
group = 'com.Atsushio.target'
|
||||
archivesBaseName = 'target'
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ public class KillMessageOverlay {
|
|||
event.getGuiGraphics().drawString(
|
||||
Minecraft.getInstance().font,
|
||||
attackerName,
|
||||
w - 2 * targetNameWidth - 36 - attackerNameWidth,
|
||||
w - targetNameWidth - 50 - attackerNameWidth,
|
||||
h,
|
||||
record.attacker.getTeamColor(),
|
||||
false
|
||||
|
@ -61,14 +61,15 @@ public class KillMessageOverlay {
|
|||
ResourceLocation resourceLocation = gunItem.getGunIcon();
|
||||
|
||||
event.getGuiGraphics().blit(resourceLocation,
|
||||
w - 2 * targetNameWidth - 30,
|
||||
w - targetNameWidth - 46,
|
||||
h,
|
||||
0,
|
||||
0,
|
||||
32,
|
||||
8,
|
||||
-32,
|
||||
8);
|
||||
8
|
||||
);
|
||||
}
|
||||
|
||||
event.getGuiGraphics().drawString(
|
||||
|
|
|
@ -225,6 +225,7 @@ public class LivingEntityEventHandler {
|
|||
DamageSource source = event.getSource();
|
||||
|
||||
if (source.getDirectEntity() instanceof ServerPlayer player) {
|
||||
// TODO 修改发包
|
||||
if (source.is(TargetModDamageTypes.GUN_FIRE)) {
|
||||
TargetMod.PACKET_HANDLER.send(PacketDistributor.PLAYER.with(() -> player), new PlayerKillMessage(player.getId(), entity.getId(), false));
|
||||
} else if (source.is(TargetModDamageTypes.GUN_FIRE_HEADSHOT)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue