package net.mcreator.target.procedures; import net.minecraft.world.item.ItemStack; import net.minecraft.world.entity.Entity; import net.minecraft.server.level.ServerLevel; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.CommandSource; public class As12DsProcedure { public static void execute(Entity entity) { if (entity == null) return; ItemStack usehand = ItemStack.EMPTY; { Entity _ent = entity; if (!_ent.level().isClientSide() && _ent.getServer() != null) { _ent.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, _ent.position(), _ent.getRotationVector(), _ent.level() instanceof ServerLevel ? (ServerLevel) _ent.level() : null, 4, _ent.getName().getString(), _ent.getDisplayName(), _ent.level().getServer(), _ent), "playsound target:aa12_far player @a ~ ~ ~ 16 1"); } } { Entity _ent = entity; if (!_ent.level().isClientSide() && _ent.getServer() != null) { _ent.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, _ent.position(), _ent.getRotationVector(), _ent.level() instanceof ServerLevel ? (ServerLevel) _ent.level() : null, 4, _ent.getName().getString(), _ent.getDisplayName(), _ent.level().getServer(), _ent), "playsound target:aa12_very_far player @a ~ ~ ~ 32 1"); } } { Entity _ent = entity; if (!_ent.level().isClientSide() && _ent.getServer() != null) { _ent.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, _ent.position(), _ent.getRotationVector(), _ent.level() instanceof ServerLevel ? (ServerLevel) _ent.level() : null, 4, _ent.getName().getString(), _ent.getDisplayName(), _ent.level().getServer(), _ent), "stopsound @s player target:aa12_far"); } } { Entity _ent = entity; if (!_ent.level().isClientSide() && _ent.getServer() != null) { _ent.getServer().getCommands().performPrefixedCommand(new CommandSourceStack(CommandSource.NULL, _ent.position(), _ent.getRotationVector(), _ent.level() instanceof ServerLevel ? (ServerLevel) _ent.level() : null, 4, _ent.getName().getString(), _ent.getDisplayName(), _ent.level().getServer(), _ent), "stopsound @s player target:aa12_very_far"); } } } }