添加有效击中载具的标识和音效
This commit is contained in:
parent
996cae06f3
commit
a6877a273a
22 changed files with 61 additions and 16 deletions
|
@ -29,6 +29,7 @@ import org.joml.Math;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
|
|
||||||
import static com.atsuishio.superbwarfare.client.RenderHelper.preciseBlit;
|
import static com.atsuishio.superbwarfare.client.RenderHelper.preciseBlit;
|
||||||
|
import static com.atsuishio.superbwarfare.client.overlay.VehicleHudOverlay.renderKillIndicator;
|
||||||
|
|
||||||
@Mod.EventBusSubscriber(value = Dist.CLIENT)
|
@Mod.EventBusSubscriber(value = Dist.CLIENT)
|
||||||
public class CannonHudOverlay {
|
public class CannonHudOverlay {
|
||||||
|
@ -122,6 +123,8 @@ public class CannonHudOverlay {
|
||||||
preciseBlit(event.getGuiGraphics(), ModUtils.loc("textures/screens/cannon/cannon_crosshair_notzoom.png"), k, l, 0, 0.0F, i, j, i, j);
|
preciseBlit(event.getGuiGraphics(), ModUtils.loc("textures/screens/cannon/cannon_crosshair_notzoom.png"), k, l, 0, 0.0F, i, j, i, j);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
renderKillIndicator(guiGraphics, w, h);
|
||||||
|
|
||||||
poseStack.popPose();
|
poseStack.popPose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@ public class CrossHairOverlay {
|
||||||
public static int HIT_INDICATOR = 0;
|
public static int HIT_INDICATOR = 0;
|
||||||
public static int HEAD_INDICATOR = 0;
|
public static int HEAD_INDICATOR = 0;
|
||||||
public static int KILL_INDICATOR = 0;
|
public static int KILL_INDICATOR = 0;
|
||||||
|
public static int VEHICLE_INDICATOR = 0;
|
||||||
private static float scopeScale = 1f;
|
private static float scopeScale = 1f;
|
||||||
public static float gunRot;
|
public static float gunRot;
|
||||||
|
|
||||||
|
@ -166,6 +167,10 @@ public class CrossHairOverlay {
|
||||||
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/hit_marker.png"), posX + moveX, posY + moveY, 0, 0, 16, 16, 16, 16);
|
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/hit_marker.png"), posX + moveX, posY + moveY, 0, 0, 16, 16, 16, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (VEHICLE_INDICATOR > 0) {
|
||||||
|
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/hit_marker_vehicle.png"), posX + moveX, posY + moveY, 0, 0, 16, 16, 16, 16);
|
||||||
|
}
|
||||||
|
|
||||||
if (HEAD_INDICATOR > 0) {
|
if (HEAD_INDICATOR > 0) {
|
||||||
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/headshot_mark.png"), posX + moveX, posY + moveY, 0, 0, 16, 16, 16, 16);
|
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/headshot_mark.png"), posX + moveX, posY + moveY, 0, 0, 16, 16, 16, 16);
|
||||||
}
|
}
|
||||||
|
@ -196,5 +201,6 @@ public class CrossHairOverlay {
|
||||||
HEAD_INDICATOR = Math.max(0, HEAD_INDICATOR - 1);
|
HEAD_INDICATOR = Math.max(0, HEAD_INDICATOR - 1);
|
||||||
HIT_INDICATOR = Math.max(0, HIT_INDICATOR - 1);
|
HIT_INDICATOR = Math.max(0, HIT_INDICATOR - 1);
|
||||||
KILL_INDICATOR = Math.max(0, KILL_INDICATOR - 1);
|
KILL_INDICATOR = Math.max(0, KILL_INDICATOR - 1);
|
||||||
|
VEHICLE_INDICATOR = Math.max(0, VEHICLE_INDICATOR - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -213,6 +213,10 @@ public class HelicopterHudOverlay {
|
||||||
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/hit_marker.png"), posX, posY, 0, 0, 16, 16, 16, 16);
|
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/hit_marker.png"), posX, posY, 0, 0, 16, 16, 16, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (VEHICLE_INDICATOR > 0) {
|
||||||
|
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/hit_marker_vehicle.png"), posX, posY, 0, 0, 16, 16, 16, 16);
|
||||||
|
}
|
||||||
|
|
||||||
if (HEAD_INDICATOR > 0) {
|
if (HEAD_INDICATOR > 0) {
|
||||||
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/headshot_mark.png"), posX, posY, 0, 0, 16, 16, 16, 16);
|
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/headshot_mark.png"), posX, posY, 0, 0, 16, 16, 16, 16);
|
||||||
}
|
}
|
||||||
|
|
|
@ -365,7 +365,7 @@ public class VehicleHudOverlay {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void renderKillIndicator(GuiGraphics guiGraphics, float w, float h) {
|
public static void renderKillIndicator(GuiGraphics guiGraphics, float w, float h) {
|
||||||
float posX = w / 2f - 7.5f + (float) (2 * (java.lang.Math.random() - 0.5f));
|
float posX = w / 2f - 7.5f + (float) (2 * (java.lang.Math.random() - 0.5f));
|
||||||
float posY = h / 2f - 7.5f + (float) (2 * (java.lang.Math.random() - 0.5f));
|
float posY = h / 2f - 7.5f + (float) (2 * (java.lang.Math.random() - 0.5f));
|
||||||
float rate = (40 - KILL_INDICATOR * 5) / 5.5f;
|
float rate = (40 - KILL_INDICATOR * 5) / 5.5f;
|
||||||
|
@ -374,6 +374,10 @@ public class VehicleHudOverlay {
|
||||||
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/hit_marker.png"), posX, posY, 0, 0, 16, 16, 16, 16);
|
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/hit_marker.png"), posX, posY, 0, 0, 16, 16, 16, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (VEHICLE_INDICATOR > 0) {
|
||||||
|
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/hit_marker_vehicle.png"), posX, posY, 0, 0, 16, 16, 16, 16);
|
||||||
|
}
|
||||||
|
|
||||||
if (HEAD_INDICATOR > 0) {
|
if (HEAD_INDICATOR > 0) {
|
||||||
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/headshot_mark.png"), posX, posY, 0, 0, 16, 16, 16, 16);
|
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/headshot_mark.png"), posX, posY, 0, 0, 16, 16, 16, 16);
|
||||||
}
|
}
|
||||||
|
@ -398,6 +402,10 @@ public class VehicleHudOverlay {
|
||||||
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/hit_marker.png"), posX, posY, 0, 0, 16, 16, 16, 16);
|
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/hit_marker.png"), posX, posY, 0, 0, 16, 16, 16, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (VEHICLE_INDICATOR > 0) {
|
||||||
|
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/hit_marker_vehicle.png"), posX, posY, 0, 0, 16, 16, 16, 16);
|
||||||
|
}
|
||||||
|
|
||||||
if (HEAD_INDICATOR > 0) {
|
if (HEAD_INDICATOR > 0) {
|
||||||
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/headshot_mark.png"), posX, posY, 0, 0, 16, 16, 16, 16);
|
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/headshot_mark.png"), posX, posY, 0, 0, 16, 16, 16, 16);
|
||||||
}
|
}
|
||||||
|
|
|
@ -167,7 +167,7 @@ public class VehicleConfig {
|
||||||
AH_6_CANNON_DAMAGE = builder.defineInRange("ah_6_cannon_damage", 25, 1, 10000000);
|
AH_6_CANNON_DAMAGE = builder.defineInRange("ah_6_cannon_damage", 25, 1, 10000000);
|
||||||
|
|
||||||
builder.comment("The rocket damage of AH-6");
|
builder.comment("The rocket damage of AH-6");
|
||||||
AH_6_ROCKET_DAMAGE = builder.defineInRange("ah_6_rocket_damage", 75, 1, 10000000);
|
AH_6_ROCKET_DAMAGE = builder.defineInRange("ah_6_rocket_damage", 120, 1, 10000000);
|
||||||
|
|
||||||
builder.comment("The rocket explosion damage of AH-6");
|
builder.comment("The rocket explosion damage of AH-6");
|
||||||
AH_6_ROCKET_EXPLOSION_DAMAGE = builder.defineInRange("ah_6_rocket_explosion_damage", 60, 1, 10000000);
|
AH_6_ROCKET_EXPLOSION_DAMAGE = builder.defineInRange("ah_6_rocket_explosion_damage", 60, 1, 10000000);
|
||||||
|
|
|
@ -187,7 +187,7 @@ public class Ah6Entity extends ContainerMobileEntity implements GeoEntity, IHeli
|
||||||
}
|
}
|
||||||
|
|
||||||
this.level().playSound(null, this.getOnPos(), ModSounds.HIT.get(), SoundSource.PLAYERS, 1, 1);
|
this.level().playSound(null, this.getOnPos(), ModSounds.HIT.get(), SoundSource.PLAYERS, 1, 1);
|
||||||
this.hurt(Math.max(amount - 2, 0));
|
this.hurt(Math.max(amount - 2, 0), source.getEntity(), true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -157,10 +157,10 @@ public class AnnihilatorEntity extends EnergyVehicleEntity implements GeoEntity,
|
||||||
amount *= 0.1f;
|
amount *= 0.1f;
|
||||||
}
|
}
|
||||||
if (source.is(ModDamageTypes.LUNGE_MINE)) {
|
if (source.is(ModDamageTypes.LUNGE_MINE)) {
|
||||||
amount *= 0.1f;
|
amount *= 0.12f;
|
||||||
}
|
}
|
||||||
if (source.is(ModDamageTypes.CANNON_FIRE)) {
|
if (source.is(ModDamageTypes.CANNON_FIRE)) {
|
||||||
amount *= 0.2f;
|
amount *= 0.22f;
|
||||||
}
|
}
|
||||||
if (source.is(ModTags.DamageTypes.PROJECTILE)) {
|
if (source.is(ModTags.DamageTypes.PROJECTILE)) {
|
||||||
amount *= 0f;
|
amount *= 0f;
|
||||||
|
@ -173,7 +173,7 @@ public class AnnihilatorEntity extends EnergyVehicleEntity implements GeoEntity,
|
||||||
}
|
}
|
||||||
|
|
||||||
this.level().playSound(null, this.getOnPos(), ModSounds.HIT.get(), SoundSource.PLAYERS, 1, 1);
|
this.level().playSound(null, this.getOnPos(), ModSounds.HIT.get(), SoundSource.PLAYERS, 1, 1);
|
||||||
this.hurt(Math.max(amount - 16, 0));
|
this.hurt(Math.max(amount - 10, 0), source.getEntity(), true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -198,7 +198,7 @@ public class Bmp2Entity extends ContainerMobileEntity implements GeoEntity, ICha
|
||||||
}
|
}
|
||||||
|
|
||||||
this.level().playSound(null, this.getOnPos(), ModSounds.HIT.get(), SoundSource.PLAYERS, 1, 1);
|
this.level().playSound(null, this.getOnPos(), ModSounds.HIT.get(), SoundSource.PLAYERS, 1, 1);
|
||||||
this.hurt(Math.max(amount - 8, 0));
|
this.hurt(Math.max(amount - 8, 0), source.getEntity(), true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,7 +107,7 @@ public class DroneEntity extends MobileVehicleEntity implements GeoEntity {
|
||||||
@Override
|
@Override
|
||||||
public boolean hurt(DamageSource source, float amount) {
|
public boolean hurt(DamageSource source, float amount) {
|
||||||
super.hurt(source, amount);
|
super.hurt(source, amount);
|
||||||
this.hurt(amount);
|
this.hurt(amount, source.getEntity(), false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -194,7 +194,7 @@ public class Lav150Entity extends ContainerMobileEntity implements GeoEntity, IC
|
||||||
}
|
}
|
||||||
|
|
||||||
this.level().playSound(null, this.getOnPos(), ModSounds.HIT.get(), SoundSource.PLAYERS, 1, 1);
|
this.level().playSound(null, this.getOnPos(), ModSounds.HIT.get(), SoundSource.PLAYERS, 1, 1);
|
||||||
this.hurt(Math.max(amount - 7, 0));
|
this.hurt(Math.max(amount - 7, 0), source.getEntity(), true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -166,7 +166,7 @@ public class Mk42Entity extends VehicleEntity implements GeoEntity, ICannonEntit
|
||||||
}
|
}
|
||||||
|
|
||||||
this.level().playSound(null, this.getOnPos(), ModSounds.HIT.get(), SoundSource.PLAYERS, 1, 1);
|
this.level().playSound(null, this.getOnPos(), ModSounds.HIT.get(), SoundSource.PLAYERS, 1, 1);
|
||||||
this.hurt(Math.max(amount - 8, 0));
|
this.hurt(Math.max(amount - 8, 0), source.getEntity(), true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -173,7 +173,7 @@ public class Mle1934Entity extends VehicleEntity implements GeoEntity, ICannonEn
|
||||||
}
|
}
|
||||||
|
|
||||||
this.level().playSound(null, this.getOnPos(), ModSounds.HIT.get(), SoundSource.PLAYERS, 1, 1);
|
this.level().playSound(null, this.getOnPos(), ModSounds.HIT.get(), SoundSource.PLAYERS, 1, 1);
|
||||||
this.hurt(Math.max(amount - 8, 0));
|
this.hurt(Math.max(amount - 8, 0), source.getEntity(), true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -176,7 +176,7 @@ public class SpeedboatEntity extends ContainerMobileEntity implements GeoEntity,
|
||||||
}
|
}
|
||||||
|
|
||||||
this.level().playSound(null, this.getOnPos(), ModSounds.HIT.get(), SoundSource.PLAYERS, 1, 1);
|
this.level().playSound(null, this.getOnPos(), ModSounds.HIT.get(), SoundSource.PLAYERS, 1, 1);
|
||||||
this.hurt(Math.max(amount - 2, 0));
|
this.hurt(Math.max(amount - 2, 0), source.getEntity(), true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ public class Tom6Entity extends MobileVehicleEntity implements GeoEntity {
|
||||||
amount *= 2f;
|
amount *= 2f;
|
||||||
}
|
}
|
||||||
this.level().playSound(null, this.getOnPos(), ModSounds.HIT.get(), SoundSource.PLAYERS, 1, 1);
|
this.level().playSound(null, this.getOnPos(), ModSounds.HIT.get(), SoundSource.PLAYERS, 1, 1);
|
||||||
this.hurt(amount);
|
this.hurt(amount, source.getEntity(), true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,18 +6,23 @@ import com.atsuishio.superbwarfare.init.ModItems;
|
||||||
import com.atsuishio.superbwarfare.init.ModParticleTypes;
|
import com.atsuishio.superbwarfare.init.ModParticleTypes;
|
||||||
import com.atsuishio.superbwarfare.init.ModSounds;
|
import com.atsuishio.superbwarfare.init.ModSounds;
|
||||||
import com.atsuishio.superbwarfare.item.ContainerBlockItem;
|
import com.atsuishio.superbwarfare.item.ContainerBlockItem;
|
||||||
|
import com.atsuishio.superbwarfare.network.message.ClientIndicatorMessage;
|
||||||
|
import com.atsuishio.superbwarfare.tools.EntityFindUtil;
|
||||||
import com.atsuishio.superbwarfare.tools.ParticleTool;
|
import com.atsuishio.superbwarfare.tools.ParticleTool;
|
||||||
import com.atsuishio.superbwarfare.tools.VectorTool;
|
import com.atsuishio.superbwarfare.tools.VectorTool;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.mojang.math.Axis;
|
import com.mojang.math.Axis;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.core.Holder;
|
||||||
import net.minecraft.core.particles.ParticleTypes;
|
import net.minecraft.core.particles.ParticleTypes;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
|
import net.minecraft.network.protocol.game.ClientboundSoundPacket;
|
||||||
import net.minecraft.network.syncher.EntityDataAccessor;
|
import net.minecraft.network.syncher.EntityDataAccessor;
|
||||||
import net.minecraft.network.syncher.EntityDataSerializers;
|
import net.minecraft.network.syncher.EntityDataSerializers;
|
||||||
import net.minecraft.network.syncher.SynchedEntityData;
|
import net.minecraft.network.syncher.SynchedEntityData;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.server.level.ServerLevel;
|
import net.minecraft.server.level.ServerLevel;
|
||||||
|
import net.minecraft.server.level.ServerPlayer;
|
||||||
import net.minecraft.sounds.SoundEvents;
|
import net.minecraft.sounds.SoundEvents;
|
||||||
import net.minecraft.sounds.SoundSource;
|
import net.minecraft.sounds.SoundSource;
|
||||||
import net.minecraft.util.Mth;
|
import net.minecraft.util.Mth;
|
||||||
|
@ -33,6 +38,7 @@ import net.minecraft.world.item.ItemStack;
|
||||||
import net.minecraft.world.item.Items;
|
import net.minecraft.world.item.Items;
|
||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
import net.minecraft.world.phys.Vec3;
|
import net.minecraft.world.phys.Vec3;
|
||||||
|
import net.minecraftforge.network.PacketDistributor;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.joml.Math;
|
import org.joml.Math;
|
||||||
import org.joml.Matrix4f;
|
import org.joml.Matrix4f;
|
||||||
|
@ -179,8 +185,14 @@ public class VehicleEntity extends Entity {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void hurt(float pHealAmount) {
|
public void hurt(float pHealAmount, Entity attacker, boolean send) {
|
||||||
if (this.level() instanceof ServerLevel) {
|
if (this.level() instanceof ServerLevel) {
|
||||||
|
if (attacker instanceof ServerPlayer player && pHealAmount > 0 && this.getHealth() > 0 && send && !(this instanceof DroneEntity)) {
|
||||||
|
var holder = Holder.direct(ModSounds.INDICATION_VEHICLE.get());
|
||||||
|
player.connection.send(new ClientboundSoundPacket(holder, SoundSource.PLAYERS, player.getX(), player.getEyeY(), player.getZ(), 0.25f + (2.75f * pHealAmount / getMaxHealth()), random.nextFloat() * 0.1f + 0.9f, player.level().random.nextLong()));
|
||||||
|
|
||||||
|
ModUtils.PACKET_HANDLER.send(PacketDistributor.PLAYER.with(() -> player), new ClientIndicatorMessage(3, 5));
|
||||||
|
}
|
||||||
this.setHealth(this.getHealth() - pHealAmount);
|
this.setHealth(this.getHealth() - pHealAmount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -262,8 +274,10 @@ public class VehicleEntity extends Entity {
|
||||||
|
|
||||||
travel();
|
travel();
|
||||||
|
|
||||||
|
Entity attacker = EntityFindUtil.findEntity(this.level(), this.entityData.get(LAST_ATTACKER_UUID));
|
||||||
|
|
||||||
if (this.getHealth() <= 0.1 * this.getMaxHealth()) {
|
if (this.getHealth() <= 0.1 * this.getMaxHealth()) {
|
||||||
this.hurt(0.1f);
|
this.hurt(0.1f, attacker, false);
|
||||||
} else {
|
} else {
|
||||||
if (!(this instanceof DroneEntity)) {
|
if (!(this instanceof DroneEntity)) {
|
||||||
this.heal(0.05f);
|
this.heal(0.05f);
|
||||||
|
|
|
@ -106,7 +106,7 @@ public class WheelChairEntity extends MobileVehicleEntity implements GeoEntity {
|
||||||
public boolean hurt(DamageSource source, float amount) {
|
public boolean hurt(DamageSource source, float amount) {
|
||||||
super.hurt(source, amount);
|
super.hurt(source, amount);
|
||||||
this.level().playSound(null, this.getOnPos(), ModSounds.HIT.get(), SoundSource.PLAYERS, 1, 1);
|
this.level().playSound(null, this.getOnPos(), ModSounds.HIT.get(), SoundSource.PLAYERS, 1, 1);
|
||||||
this.hurt(amount);
|
this.hurt(amount, source.getEntity(), true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@ public class ModSounds {
|
||||||
public static final RegistryObject<SoundEvent> HIT = REGISTRY.register("hit", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("hit")));
|
public static final RegistryObject<SoundEvent> HIT = REGISTRY.register("hit", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("hit")));
|
||||||
public static final RegistryObject<SoundEvent> TARGET_DOWN = REGISTRY.register("targetdown", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("targetdown")));
|
public static final RegistryObject<SoundEvent> TARGET_DOWN = REGISTRY.register("targetdown", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("targetdown")));
|
||||||
public static final RegistryObject<SoundEvent> INDICATION = REGISTRY.register("indication", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("indication")));
|
public static final RegistryObject<SoundEvent> INDICATION = REGISTRY.register("indication", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("indication")));
|
||||||
|
public static final RegistryObject<SoundEvent> INDICATION_VEHICLE = REGISTRY.register("indication_vehicle", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("indication_vehicle")));
|
||||||
public static final RegistryObject<SoundEvent> JUMP = REGISTRY.register("jump", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("jump")));
|
public static final RegistryObject<SoundEvent> JUMP = REGISTRY.register("jump", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("jump")));
|
||||||
public static final RegistryObject<SoundEvent> DOUBLE_JUMP = REGISTRY.register("doublejump", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("doublejump")));
|
public static final RegistryObject<SoundEvent> DOUBLE_JUMP = REGISTRY.register("doublejump", () -> SoundEvent.createVariableRangeEvent(ModUtils.loc("doublejump")));
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ public class ClientPacketHandler {
|
||||||
switch (message.type) {
|
switch (message.type) {
|
||||||
case 1 -> CrossHairOverlay.HEAD_INDICATOR = message.value;
|
case 1 -> CrossHairOverlay.HEAD_INDICATOR = message.value;
|
||||||
case 2 -> CrossHairOverlay.KILL_INDICATOR = message.value;
|
case 2 -> CrossHairOverlay.KILL_INDICATOR = message.value;
|
||||||
|
case 3 -> CrossHairOverlay.VEHICLE_INDICATOR = message.value;
|
||||||
default -> CrossHairOverlay.HIT_INDICATOR = message.value;
|
default -> CrossHairOverlay.HIT_INDICATOR = message.value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1815,6 +1815,14 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"indication_vehicle": {
|
||||||
|
"sounds": [
|
||||||
|
{
|
||||||
|
"name": "superbwarfare:indication_vehicle",
|
||||||
|
"stream": false
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"jump": {
|
"jump": {
|
||||||
"sounds": [
|
"sounds": [
|
||||||
{
|
{
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 636 B |
Loading…
Add table
Reference in a new issue