From 1f1252583c92bbeb87347664f12d361ffdd60e6b Mon Sep 17 00:00:00 2001 From: Edith Boles Date: Mon, 4 Oct 2021 17:03:22 -0700 Subject: [PATCH] Funny ritual --- .../top/penowl/quidproquo/rituals/FakePlayerRitual.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/top/penowl/quidproquo/rituals/FakePlayerRitual.java b/src/main/java/top/penowl/quidproquo/rituals/FakePlayerRitual.java index f7be3bd..5c676e5 100644 --- a/src/main/java/top/penowl/quidproquo/rituals/FakePlayerRitual.java +++ b/src/main/java/top/penowl/quidproquo/rituals/FakePlayerRitual.java @@ -22,6 +22,7 @@ public class FakePlayerRitual extends Ritual { addIngredient(Material.LEAVES, 32); name = "player illusion"; notify = false; + health = 4; } @Override @@ -32,13 +33,15 @@ public class FakePlayerRitual extends Ritual { int y = random.nextInt(51) - 25; int z = random.nextInt(51) - 25; Entity fakePlayer = target.getWorld().spawnEntity(loc.clone().add(x, y, z), EntityType.SLIME); - fakePlayer.setCustomName(caster.getName()); LivingEntity fp_livingEntity = (LivingEntity)fakePlayer; fp_livingEntity.setMaxHealth(100.0); fp_livingEntity.setHealth(100.0); fp_livingEntity.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 200, 100)); fp_livingEntity.addPotionEffect(new PotionEffect(PotionEffectType.WITHER, 200, 1)); - fp_livingEntity.setCustomNameVisible(true); + Entity armorStand = target.getWorld().spawnEntity(loc.clone().add(x, y, z), EntityType.ARMOR_STAND); + armorStand.setCustomName(caster.getName()); + armorStand.setCustomNameVisible(true); + fp_livingEntity.setPassenger(armorStand); Slime fpSlime = (Slime)fp_livingEntity; fpSlime.setSize(1); }