From 9342369b6976dbcaad2bade1db19ff4d2f3c56e2 Mon Sep 17 00:00:00 2001 From: Sollace Date: Fri, 2 Oct 2020 09:13:28 +0200 Subject: [PATCH] Level affects the amount of damage ghast disguises deal --- .../entity/behaviour/GhastBehaviour.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/entity/behaviour/GhastBehaviour.java b/src/main/java/com/minelittlepony/unicopia/entity/behaviour/GhastBehaviour.java index 5e776f1c..fdc35fb6 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/behaviour/GhastBehaviour.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/behaviour/GhastBehaviour.java @@ -22,20 +22,22 @@ public class GhastBehaviour extends MobBehaviour { entity.world.syncWorldEvent(null, 1015, entity.getBlockPos(), 0); } } else { - Vec3d vec3d = entity.getRotationVec(1); - if (!entity.isSilent()) { entity.world.syncWorldEvent(null, 1016, entity.getBlockPos(), 0); } Vec3d rot = player.getEntity().getRotationVec(1); - FireballEntity fireballEntity = new FireballEntity(entity.world, entity, rot.getX(), rot.getY(), rot.getZ()); - fireballEntity.explosionPower = entity.getFireballStrength(); - fireballEntity.setOwner(player.getOwner()); - fireballEntity.updatePosition(entity.getX() + vec3d.x * 4, entity.getBodyY(0.5D) + 0.5D, fireballEntity.getZ() + vec3d.z * 4); + FireballEntity proj = new FireballEntity(entity.world, entity, rot.getX(), rot.getY(), rot.getZ()); + proj.explosionPower = entity.getFireballStrength() * (player.getCurrentLevel() + 1); + proj.setOwner(player.getOwner()); + proj.updatePosition( + entity.getX() + rot.x * 4, + entity.getBodyY(0.5D) + 0.5, + proj.getZ() + rot.z * 4 + ); - entity.world.spawnEntity(fireballEntity); + entity.world.spawnEntity(proj); } } }