Search in sources :

Example 1 with SettingColor

use of meteordevelopment.meteorclient.utils.render.color.SettingColor in project meteor-client by MeteorDevelopment.

the class SBlockDataScreen method initWidgets.

@Override
public void initWidgets() {
    Settings settings = new Settings();
    SettingGroup sgGeneral = settings.getDefaultGroup();
    SettingGroup sgTracer = settings.createGroup("Tracer");
    sgGeneral.add(new EnumSetting.Builder<ShapeMode>().name("shape-mode").description("How the shape is rendered.").defaultValue(ShapeMode.Lines).onModuleActivated(shapeModeSetting -> shapeModeSetting.set(blockData.shapeMode)).onChanged(shapeMode -> {
        blockData.shapeMode = shapeMode;
        changed(blockData, block, setting);
    }).build());
    sgGeneral.add(new ColorSetting.Builder().name("line-color").description("Color of lines.").defaultValue(new SettingColor(0, 255, 200)).onModuleActivated(settingColorSetting -> settingColorSetting.set(blockData.lineColor)).onChanged(settingColor -> {
        blockData.lineColor.set(settingColor);
        changed(blockData, block, setting);
    }).build());
    sgGeneral.add(new ColorSetting.Builder().name("side-color").description("Color of sides.").defaultValue(new SettingColor(0, 255, 200, 25)).onModuleActivated(settingColorSetting -> settingColorSetting.set(blockData.sideColor)).onChanged(settingColor -> {
        blockData.sideColor.set(settingColor);
        changed(blockData, block, setting);
    }).build());
    sgTracer.add(new BoolSetting.Builder().name("tracer").description("If tracer line is allowed to this block.").defaultValue(true).onModuleActivated(booleanSetting -> booleanSetting.set(blockData.tracer)).onChanged(aBoolean -> {
        blockData.tracer = aBoolean;
        changed(blockData, block, setting);
    }).build());
    sgTracer.add(new ColorSetting.Builder().name("tracer-color").description("Color of tracer line.").defaultValue(new SettingColor(0, 255, 200, 125)).onModuleActivated(settingColorSetting -> settingColorSetting.set(blockData.tracerColor)).onChanged(settingColor -> {
        blockData.tracerColor = settingColor;
        changed(blockData, block, setting);
    }).build());
    settings.onActivated();
    add(theme.settings(settings)).expandX();
}
Also used : GuiTheme(meteordevelopment.meteorclient.gui.GuiTheme) WindowScreen(meteordevelopment.meteorclient.gui.WindowScreen) Block(net.minecraft.block.Block) ShapeMode(meteordevelopment.meteorclient.renderer.ShapeMode) meteordevelopment.meteorclient.settings(meteordevelopment.meteorclient.settings) SettingColor(meteordevelopment.meteorclient.utils.render.color.SettingColor) ShapeMode(meteordevelopment.meteorclient.renderer.ShapeMode) SettingColor(meteordevelopment.meteorclient.utils.render.color.SettingColor)

Example 2 with SettingColor

use of meteordevelopment.meteorclient.utils.render.color.SettingColor in project meteor-rejects by AntiCope.

the class Lavacast method onRender.

@EventHandler
private void onRender(Render3DEvent event) {
    if (placeFluidPos == null)
        return;
    double x1 = placeFluidPos.getX();
    double y1 = placeFluidPos.getY();
    double z1 = placeFluidPos.getZ();
    double x2 = x1 + 1;
    double y2 = y1 + 1;
    double z2 = z1 + 1;
    SettingColor color = new SettingColor(128, 128, 128);
    if (stage == Stage.LavaDown)
        color = new SettingColor(255, 180, 10);
    if (stage == Stage.LavaUp)
        color = new SettingColor(255, 180, 128);
    if (stage == Stage.WaterDown)
        color = new SettingColor(10, 10, 255);
    if (stage == Stage.WaterUp)
        color = new SettingColor(128, 128, 255);
    SettingColor color1 = color;
    color1.a = 75;
    event.renderer.box(x1, y1, z1, x2, y2, z2, color1, color, ShapeMode.Both, 0);
}
Also used : SettingColor(meteordevelopment.meteorclient.utils.render.color.SettingColor) EventHandler(meteordevelopment.orbit.EventHandler)

Aggregations

SettingColor (meteordevelopment.meteorclient.utils.render.color.SettingColor)2 GuiTheme (meteordevelopment.meteorclient.gui.GuiTheme)1 WindowScreen (meteordevelopment.meteorclient.gui.WindowScreen)1 ShapeMode (meteordevelopment.meteorclient.renderer.ShapeMode)1 meteordevelopment.meteorclient.settings (meteordevelopment.meteorclient.settings)1 EventHandler (meteordevelopment.orbit.EventHandler)1 Block (net.minecraft.block.Block)1