use of com.teamwizardry.wizardry.common.entity.projectile.EntityLightningProjectile in project Wizardry by TeamWizardry.
the class ModuleEffectLightning method onRunProjectile.
@ModuleOverride("shape_projectile_run")
public boolean onRunProjectile(@ContextSuper ModuleOverrideSuper ovdSuper, World world, SpellData data, SpellRing shape, @ContextRing SpellRing childRing) {
if (ovdSuper.hasSuper())
ovdSuper.invoke(true, world, data, shape);
if (world.isRemote)
return true;
Vec3d origin = data.getOriginWithFallback(world);
if (origin == null)
return true;
if (!childRing.taxCaster(world, data, true))
return true;
double dist = shape.getAttributeValue(world, AttributeRegistry.RANGE, data);
double speed = shape.getAttributeValue(world, AttributeRegistry.SPEED, data);
EntityLightningProjectile proj = new EntityLightningProjectile(world, shape, childRing, data, (float) dist, (float) speed, (float) 0.1);
proj.setPosition(origin.x, origin.y, origin.z);
world.spawnEntity(proj);
return true;
}
Aggregations