use of org.spongepowered.common.interfaces.world.IMixinExplosion in project SpongeCommon by SpongePowered.
the class SpongeExplosionBuilder method build.
@Override
public Explosion build() throws IllegalStateException {
// TODO Check coordinates and if world is loaded here.
checkState(this.location != null, "Location is null!");
World world = this.location.getExtent();
Vector3d origin = this.location.getPosition();
final net.minecraft.world.Explosion explosion = new net.minecraft.world.Explosion((net.minecraft.world.World) world, (Entity) this.sourceExplosive, origin.getX(), origin.getY(), origin.getZ(), this.radius, this.canCauseFire, this.shouldSmoke);
((IMixinExplosion) explosion).setShouldBreakBlocks(this.shouldBreakBlocks);
((IMixinExplosion) explosion).setShouldDamageEntities(this.shouldDamageEntities);
return (Explosion) explosion;
}
Aggregations