Search in sources :

Example 1 with IBlastInit

use of icbm.classic.api.explosion.IBlastInit in project ICBM-Classic by BuiltBrokenModding.

the class ExplosiveHandler method createNew.

public static IBlast createNew(Entity cause, World world, double x, double y, double z, IExplosiveData data, float scale, NBTTagCompound customData) {
    if (// TODO add way to hook blast builder to add custom blasts
    data != null && data.getBlastFactory() != null) {
        final IBlastInit blast = data.getBlastFactory().create();
        blast.setBlastWorld(world);
        blast.setBlastPosition(x, y, z);
        blast.scaleBlast(scale);
        blast.setBlastSource(cause);
        blast.setExplosiveData(data);
        return blast.buildBlast();
    }
    ICBMClassic.logger().error("ExplosiveHandler: Failed to create blast, data: " + data + " factory: " + (data != null ? data.getBlastFactory() : " nil"), new RuntimeException());
    return null;
}
Also used : IBlastInit(icbm.classic.api.explosion.IBlastInit)

Aggregations

IBlastInit (icbm.classic.api.explosion.IBlastInit)1