superb-warfare/src/main/java/net/mcreator/target/procedures/BullettestDanSheWuJiZhongFangKuaiShiProcedure.java
2024-05-04 14:26:24 +08:00

36 lines
1.9 KiB
Java

package net.mcreator.target.procedures;
import net.minecraft.world.entity.Entity;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.CommandSource;
public class BullettestDanSheWuJiZhongFangKuaiShiProcedure {
public static void execute(Entity immediatesourceentity) {
if (immediatesourceentity == null)
return;
{
Entity _ent = immediatesourceentity;
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), "particle target:bullthole ~ ~ ~ 0 0 0 0 1 force");
}
}
{
Entity _ent = immediatesourceentity;
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), "particle minecraft:smoke ~ ~ ~ 0 0.1 0 0.01 3 force");
}
}
{
Entity _ent = immediatesourceentity;
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:land block @a ~ ~ ~ 1 1");
}
}
if (!immediatesourceentity.level().isClientSide())
immediatesourceentity.discard();
}
}