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);
}
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);
}
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);
}