Search in sources :

Example 1 with FxBeam

use of com.builtbroken.mc.lib.render.fx.FxBeam in project Engine by VoltzEngine-Project.

the class VEProviderSmokeStream method displayEffect.

@Override
@SideOnly(Side.CLIENT)
public void displayEffect(World world, double x, double y, double z, double mx, double my, double mz, boolean movementIsEndpoint, NBTTagCompound otherData) {
    Color color = Color.gray;
    int lifeTicks = 2;
    if (otherData != null) {
        //load life timer for particle
        if (otherData.hasKey("lifeTime")) {
            lifeTicks = otherData.getInteger("lifeTime");
        }
        //Load color
        if (otherData.hasKey("red")) {
            color = new Color(otherData.getInteger("red"), otherData.getInteger("green"), otherData.getInteger("blue"));
        } else if (otherData.hasKey("color")) {
            color = new Color(otherData.getInteger("color"));
        }
    }
    FxBeam laser = new FxBeam(SharedAssets.NOISE_TEXTURE, world, new Pos(x, y, z), new Pos(mx, my, mz), color, lifeTicks);
    FMLClientHandler.instance().getClient().effectRenderer.addEffect(laser);
}
Also used : Pos(com.builtbroken.mc.imp.transform.vector.Pos) FxBeam(com.builtbroken.mc.lib.render.fx.FxBeam) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Example 2 with FxBeam

use of com.builtbroken.mc.lib.render.fx.FxBeam in project Engine by VoltzEngine-Project.

the class ClientProxy method spawnBeamFx.

@Override
public void spawnBeamFx(ResourceLocation location, World world, Pos start, Pos end, Color color, int ticksToLive) {
    FxBeam beam = new FxBeam(SharedAssets.GREY_TEXTURE, world, start, end, color, 5);
    FMLClientHandler.instance().getClient().effectRenderer.addEffect(beam);
}
Also used : FxBeam(com.builtbroken.mc.lib.render.fx.FxBeam)

Example 3 with FxBeam

use of com.builtbroken.mc.lib.render.fx.FxBeam in project Engine by VoltzEngine-Project.

the class VEProviderLaserBeam method displayEffect.

@Override
@SideOnly(Side.CLIENT)
public void displayEffect(World world, double x, double y, double z, double mx, double my, double mz, boolean movementIsEndpoint, NBTTagCompound otherData) {
    Color color = Color.red;
    int lifeTicks = 2;
    if (otherData != null) {
        //load life timer for particle
        if (otherData.hasKey("lifeTime")) {
            lifeTicks = otherData.getInteger("lifeTime");
        }
        //Load color
        if (otherData.hasKey("red")) {
            color = new Color(otherData.getInteger("red"), otherData.getInteger("green"), otherData.getInteger("blue"));
        } else if (otherData.hasKey("color")) {
            color = new Color(otherData.getInteger("color"));
        }
    }
    FxBeam laser = new FxBeam(SharedAssets.LASER_TEXTURE, world, new Pos(x, y, z), new Pos(mx, my, mz), color, lifeTicks);
    FMLClientHandler.instance().getClient().effectRenderer.addEffect(laser);
}
Also used : Pos(com.builtbroken.mc.imp.transform.vector.Pos) FxBeam(com.builtbroken.mc.lib.render.fx.FxBeam) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Aggregations

FxBeam (com.builtbroken.mc.lib.render.fx.FxBeam)3 Pos (com.builtbroken.mc.imp.transform.vector.Pos)2 SideOnly (cpw.mods.fml.relauncher.SideOnly)2