mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-17 10:24:23 +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);
|
entity.world.syncWorldEvent(null, 1015, entity.getBlockPos(), 0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Vec3d vec3d = entity.getRotationVec(1);
|
|
||||||
|
|
||||||
if (!entity.isSilent()) {
|
if (!entity.isSilent()) {
|
||||||
entity.world.syncWorldEvent(null, 1016, entity.getBlockPos(), 0);
|
entity.world.syncWorldEvent(null, 1016, entity.getBlockPos(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
Vec3d rot = player.getEntity().getRotationVec(1);
|
Vec3d rot = player.getEntity().getRotationVec(1);
|
||||||
|
|
||||||
FireballEntity fireballEntity = new FireballEntity(entity.world, entity, rot.getX(), rot.getY(), rot.getZ());
|
FireballEntity proj = new FireballEntity(entity.world, entity, rot.getX(), rot.getY(), rot.getZ());
|
||||||
fireballEntity.explosionPower = entity.getFireballStrength();
|
proj.explosionPower = entity.getFireballStrength() * (player.getCurrentLevel() + 1);
|
||||||
fireballEntity.setOwner(player.getOwner());
|
proj.setOwner(player.getOwner());
|
||||||
fireballEntity.updatePosition(entity.getX() + vec3d.x * 4, entity.getBodyY(0.5D) + 0.5D, fireballEntity.getZ() + vec3d.z * 4);
|
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