com.parzivail.util.client.screen.EventCheckboxWidget Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pswg Show documentation
Show all versions of pswg Show documentation
Explore the galaxy with Galaxies: Parzi's Star Wars Mod!
package com.parzivail.util.client.screen;
import java.util.function.Consumer;
import net.minecraft.class_2561;
import net.minecraft.class_4286;
public class EventCheckboxWidget extends class_4286
{
private final Consumer checkChanged;
public EventCheckboxWidget(int x, int y, int width, int height, class_2561 text, boolean checked, boolean showLabel, Consumer checkChanged)
{
super(x, y, width, height, text, checked, showLabel);
this.checkChanged = checkChanged;
}
@Override
public void method_25306()
{
super.method_25306();
checkChanged.accept(method_20372());
}
public void setChecked(boolean checked)
{
if (this.method_20372() == checked)
return;
this.method_25306();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy