修复音效

This commit is contained in:
Atsuihsio 2024-05-10 12:33:04 +08:00
parent e98139384a
commit 95b8fd3b59
15 changed files with 34 additions and 34 deletions

View file

@ -6,7 +6,7 @@ import net.mcreator.target.TargetMod;
import net.mcreator.target.client.renderer.item.RpgItemRenderer; import net.mcreator.target.client.renderer.item.RpgItemRenderer;
import net.mcreator.target.init.TargetModItems; import net.mcreator.target.init.TargetModItems;
import net.mcreator.target.item.AnimatedItem; import net.mcreator.target.item.AnimatedItem;
import net.mcreator.target.procedures.TacRpgWuPinZaiBeiBaoZhongShiMeiKeFaShengProcedure; import net.mcreator.target.procedures.RpgWuPinZaiBeiBaoZhongShiMeiKeFaShengProcedure;
import net.mcreator.target.tools.TooltipTool; import net.mcreator.target.tools.TooltipTool;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.model.HumanoidModel; import net.minecraft.client.model.HumanoidModel;
@ -156,7 +156,7 @@ public class RpgItem extends GunItem implements GeoItem, AnimatedItem {
if (entity instanceof Player player) { if (entity instanceof Player player) {
itemstack.getOrCreateTag().putDouble("maxammo", getAmmoCount(player)); itemstack.getOrCreateTag().putDouble("maxammo", getAmmoCount(player));
} }
TacRpgWuPinZaiBeiBaoZhongShiMeiKeFaShengProcedure.execute(entity, itemstack); RpgWuPinZaiBeiBaoZhongShiMeiKeFaShengProcedure.execute(entity, itemstack);
} }
public static double getAmmoCount(Player player) { public static double getAmmoCount(Player player) {

View file

@ -24,7 +24,7 @@ public class AK47WuPinZaiBeiBaoZhongShiMeiKeFaShengProcedure {
{ {
if (!entity.level().isClientSide() && entity.getServer() != null) { if (!entity.level().isClientSide() && entity.getServer() != null) {
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:ak47_reload_empty player @s ~ ~ ~ 100 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:ak_47_reload_empty player @s ~ ~ ~ 100 1");
} }
} }
} }
@ -47,7 +47,7 @@ public class AK47WuPinZaiBeiBaoZhongShiMeiKeFaShengProcedure {
{ {
if (!entity.level().isClientSide() && entity.getServer() != null) { if (!entity.level().isClientSide() && entity.getServer() != null) {
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:ak47_reload_normal player @s ~ ~ ~ 100 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:ak_47_reload_normal player @s ~ ~ ~ 100 1");
} }
} }
} }

View file

@ -24,7 +24,7 @@ public class Aa12WuPinZaiBeiBaoZhongShiMeiKeFaShengProcedure {
{ {
if (!entity.level().isClientSide() && entity.getServer() != null) { if (!entity.level().isClientSide() && entity.getServer() != null) {
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:aa12_reload_empty player @s ~ ~ ~ 100 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:aa_12_reload_empty player @s ~ ~ ~ 100 1");
} }
} }
} }
@ -47,7 +47,7 @@ public class Aa12WuPinZaiBeiBaoZhongShiMeiKeFaShengProcedure {
{ {
if (!entity.level().isClientSide() && entity.getServer() != null) { if (!entity.level().isClientSide() && entity.getServer() != null) {
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:aa12_reload_normal player @s ~ ~ ~ 100 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:aa_12_reload_normal player @s ~ ~ ~ 100 1");
} }
} }
} }

View file

@ -24,7 +24,7 @@ public class Hk416WuPinZaiBeiBaoZhongShiMeiKeFaShengProcedure {
{ {
if (!entity.level().isClientSide() && entity.getServer() != null) { if (!entity.level().isClientSide() && entity.getServer() != null) {
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:hk416_reload_empty player @s ~ ~ ~ 100 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:hk_416_reload_empty player @s ~ ~ ~ 100 1");
} }
} }
} }
@ -47,7 +47,7 @@ public class Hk416WuPinZaiBeiBaoZhongShiMeiKeFaShengProcedure {
{ {
if (!entity.level().isClientSide() && entity.getServer() != null) { if (!entity.level().isClientSide() && entity.getServer() != null) {
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:hk416_reload_normal player @s ~ ~ ~ 100 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:hk_416_reload_normal player @s ~ ~ ~ 100 1");
} }
} }
} }

View file

@ -24,7 +24,7 @@ public class M60WuPinZaiBeiBaoZhongShiMeiKeFaShengProcedure {
{ {
if (!entity.level().isClientSide() && entity.getServer() != null) { if (!entity.level().isClientSide() && entity.getServer() != null) {
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m60_reload_empty player @s ~ ~ ~ 100 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m_60_reload_empty player @s ~ ~ ~ 100 1");
} }
} }
} }
@ -50,7 +50,7 @@ public class M60WuPinZaiBeiBaoZhongShiMeiKeFaShengProcedure {
{ {
if (!entity.level().isClientSide() && entity.getServer() != null) { if (!entity.level().isClientSide() && entity.getServer() != null) {
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m60_reload_normal player @s ~ ~ ~ 100 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m_60_reload_normal player @s ~ ~ ~ 100 1");
} }
} }
} }

View file

@ -28,7 +28,7 @@ public class M79WuPinZaiBeiBaoZhongShiMeiKeFaShengProcedure {
{ {
if (!entity.level().isClientSide() && entity.getServer() != null) { if (!entity.level().isClientSide() && entity.getServer() != null) {
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m79_reload player @s ~ ~ ~ 100 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m_79_reload player @s ~ ~ ~ 100 1");
} }
} }
} }

View file

@ -59,13 +59,13 @@ public class M79fireProcedure {
if (!entity.level().isClientSide() && entity.getServer() != null) { if (!entity.level().isClientSide() && entity.getServer() != null) {
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m79_fire_1p player @s ~ ~ ~ 2 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m_79_fire_1p player @s ~ ~ ~ 2 1");
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m79_fire_3p player @a ~ ~ ~ 4 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m_79_fire_3p player @a ~ ~ ~ 4 1");
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m79_far player @s ~ ~ ~ 6 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m_79_far player @s ~ ~ ~ 6 1");
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m79_veryfar player @a ~ ~ ~ 12 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m_79_veryfar player @a ~ ~ ~ 12 1");
} }
usehand.getOrCreateTag().putDouble("fireanim", 2); usehand.getOrCreateTag().putDouble("fireanim", 2);
usehand.getOrCreateTag().putDouble("ammo", (usehand.getOrCreateTag().getDouble("ammo") - 1)); usehand.getOrCreateTag().putDouble("ammo", (usehand.getOrCreateTag().getDouble("ammo") - 1));

View file

@ -60,7 +60,7 @@ public class M870WuPinZaiBeiBaoZhongShiMeiKeFaShengProcedure {
{ {
if (!entity.level().isClientSide() && entity.getServer() != null) { if (!entity.level().isClientSide() && entity.getServer() != null) {
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m870_reloadloop player @s ~ ~ ~ 100 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m_870_reloadloop player @s ~ ~ ~ 100 1");
} }
} }
if (itemstack.getOrCreateTag().getDouble("loadindex") == 0) { if (itemstack.getOrCreateTag().getDouble("loadindex") == 0) {

View file

@ -28,13 +28,13 @@ public class M870fireProcedure {
if (!entity.level().isClientSide() && entity.getServer() != null) { if (!entity.level().isClientSide() && entity.getServer() != null) {
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m870_fire_1p player @s ~ ~ ~ 2 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m_870_fire_1p player @s ~ ~ ~ 2 1");
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m870_fire_3p player @a ~ ~ ~ 4 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m_870_fire_3p player @a ~ ~ ~ 4 1");
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m870_far player @s ~ ~ ~ 12 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m_870_far player @s ~ ~ ~ 12 1");
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m870_veryfar player @a ~ ~ ~ 24 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m_870_veryfar player @a ~ ~ ~ 24 1");
} }
usehand.getOrCreateTag().putDouble("ammo", (usehand.getOrCreateTag().getDouble("ammo") - 1)); usehand.getOrCreateTag().putDouble("ammo", (usehand.getOrCreateTag().getDouble("ammo") - 1));
usehand.getOrCreateTag().putDouble("fireanim", 2); usehand.getOrCreateTag().putDouble("fireanim", 2);

View file

@ -28,7 +28,7 @@ public class M98bWuPinZaiBeiBaoZhongShiMeiKeFaShengProcedure {
{ {
if (!entity.level().isClientSide() && entity.getServer() != null) { if (!entity.level().isClientSide() && entity.getServer() != null) {
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m98b_reload_empty player @s ~ ~ ~ 100 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m_98b_reload_empty player @s ~ ~ ~ 100 1");
} }
} }
} }
@ -51,7 +51,7 @@ public class M98bWuPinZaiBeiBaoZhongShiMeiKeFaShengProcedure {
{ {
if (!entity.level().isClientSide() && entity.getServer() != null) { if (!entity.level().isClientSide() && entity.getServer() != null) {
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m98b_reload_normal player @s ~ ~ ~ 100 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m_98b_reload_normal player @s ~ ~ ~ 100 1");
} }
} }
} }

View file

@ -21,13 +21,13 @@ public class M98bfireProcedure {
if (!entity.level().isClientSide() && entity.getServer() != null) { if (!entity.level().isClientSide() && entity.getServer() != null) {
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m98b_fire_1p player @s ~ ~ ~ 2 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m_98b_fire_1p player @s ~ ~ ~ 2 1");
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m98b_fire_3p player @a ~ ~ ~ 4 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m_98b_fire_3p player @a ~ ~ ~ 4 1");
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m98b_far player @a ~ ~ ~ 12 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m_98b_far player @a ~ ~ ~ 12 1");
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m98b_veryfar player @a ~ ~ ~ 24 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m_98b_veryfar player @a ~ ~ ~ 24 1");
} }
usehand.getOrCreateTag().putDouble("ammo", (usehand.getOrCreateTag().getDouble("ammo") - 1)); usehand.getOrCreateTag().putDouble("ammo", (usehand.getOrCreateTag().getDouble("ammo") - 1));
} }

View file

@ -24,7 +24,7 @@ public class Mk14WuPinZaiBeiBaoZhongShiMeiKeFaShengProcedure {
{ {
if (!entity.level().isClientSide() && entity.getServer() != null) { if (!entity.level().isClientSide() && entity.getServer() != null) {
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:mk14_reload_empty player @s ~ ~ ~ 100 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:mk_14_reload_empty player @s ~ ~ ~ 100 1");
} }
} }
} }
@ -50,7 +50,7 @@ public class Mk14WuPinZaiBeiBaoZhongShiMeiKeFaShengProcedure {
{ {
if (!entity.level().isClientSide() && entity.getServer() != null) { if (!entity.level().isClientSide() && entity.getServer() != null) {
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:mk14_reload_normal player @s ~ ~ ~ 100 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:mk_14_reload_normal player @s ~ ~ ~ 100 1");
} }
} }
} }

View file

@ -334,7 +334,7 @@ public class PlayerReloadProcedure {
if (!entity.level().isClientSide() && entity.getServer() != null) { if (!entity.level().isClientSide() && entity.getServer() != null) {
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m870_preparealt player @s ~ ~ ~ 100 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:m_870_preparealt player @s ~ ~ ~ 100 1");
} }
} else { } else {
tag.putDouble("reloading", 1); tag.putDouble("reloading", 1);

View file

@ -9,7 +9,7 @@ import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
public class TacRpgWuPinZaiBeiBaoZhongShiMeiKeFaShengProcedure { public class RpgWuPinZaiBeiBaoZhongShiMeiKeFaShengProcedure {
public static void execute(Entity entity, ItemStack itemstack) { public static void execute(Entity entity, ItemStack itemstack) {
if (entity == null) if (entity == null)
return; return;

View file

@ -61,13 +61,13 @@ public class RpgfireProcedure {
player.getCooldowns().addCooldown(usehand.getItem(), 10); player.getCooldowns().addCooldown(usehand.getItem(), 10);
if (!entity.level().isClientSide() && entity.getServer() != null) { if (!entity.level().isClientSide() && entity.getServer() != null) {
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:rpg7_fire_1p player @s ~ ~ ~ 2 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:rpg_fire_1p player @s ~ ~ ~ 2 1");
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:rpg7_fire_3p player @a ~ ~ ~ 4 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:rpg_fire_3p player @a ~ ~ ~ 4 1");
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:rpg7_far player @a ~ ~ ~ 8 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:rpg_far player @a ~ ~ ~ 8 1");
entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4, entity.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, entity.position(), entity.getRotationVector(), entity.level() instanceof ServerLevel ? (ServerLevel) entity.level() : null, 4,
entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:rpg7_veryfar player @a ~ ~ ~ 16 1"); entity.getName().getString(), entity.getDisplayName(), entity.level().getServer(), entity), "playsound target:rpg_veryfar player @a ~ ~ ~ 16 1");
} }
usehand.getOrCreateTag().putDouble("fireanim", 2); usehand.getOrCreateTag().putDouble("fireanim", 2);
usehand.getOrCreateTag().putDouble("ammo", (usehand.getOrCreateTag().getDouble("ammo") - 1)); usehand.getOrCreateTag().putDouble("ammo", (usehand.getOrCreateTag().getDouble("ammo") - 1));