mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Level affects the amount of damage ghast disguises deal
This commit is contained in:
parent
fbb5abbba5
commit
9342369b69
1 changed files with 9 additions and 7 deletions
|
@ -22,20 +22,22 @@ public class GhastBehaviour extends MobBehaviour<GhastEntity> {
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue