package net.mcreator.cawezsmantletostratus.procedures;

import net.minecraft.world.entity.boss.enderdragon.EnderDragon;
import net.minecraft.world.entity.Entity;
import net.minecraft.server.level.ServerPlayer;

public class BanisherLivingEntityIsHitWithToolProcedure {
	public static void execute(Entity entity) {
		if (entity == null)
			return;
		if (!(entity instanceof EnderDragon)) {
			{
				Entity _ent = entity;
				_ent.teleportTo(0, (-1000), 0);
				if (_ent instanceof ServerPlayer _serverPlayer)
					_serverPlayer.connection.teleport(0, (-1000), 0, _ent.getYRot(), _ent.getXRot());
			}
		}
	}
}
