public class WidgetCheckBox extends net.minecraft.client.gui.widget.Widget implements ICheckboxWidget, ITaggedWidget, ITooltipProvider
| Modifier and Type | Field and Description |
|---|---|
boolean |
checked |
| Constructor and Description |
|---|
WidgetCheckBox(int x,
int y,
int color,
net.minecraft.util.text.ITextComponent text) |
WidgetCheckBox(int x,
int y,
int color,
net.minecraft.util.text.ITextComponent text,
java.util.function.Consumer<? super WidgetCheckBox> pressable) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTooltip(double mouseX,
double mouseY,
java.util.List<net.minecraft.util.text.ITextComponent> curTip,
boolean shift) |
java.lang.String |
getTag()
Get the data to send to the server.
|
java.util.List<net.minecraft.util.text.ITextComponent> |
getTooltip() |
boolean |
isChecked()
Is this checkbox currently checked?
|
void |
onClick(double mouseX,
double mouseY) |
void |
renderButton(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
int mouseX,
int mouseY,
float partialTick) |
WidgetCheckBox |
setChecked(boolean checked) |
WidgetCheckBox |
setTooltip(java.util.List<net.minecraft.util.text.ITextComponent> tooltip) |
WidgetCheckBox |
setTooltipKey(java.lang.String translationKey) |
WidgetCheckBox |
withTag(java.lang.String tag) |
changeFocus, clearFGColor, clicked, createNarrationMessage, getFGColor, getHeight, getMessage, getWidth, getYImage, isFocused, isHovered, isMouseOver, isValidClickButton, mouseClicked, mouseDragged, mouseReleased, narrate, onDrag, onFocusedChanged, onRelease, playDownSound, queueNarration, render, renderBg, renderToolTip, setAlpha, setFGColor, setFocused, setHeight, setMessage, setWidthblit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawString, drawString, fill, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLineclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasWidget, getUpgradeId, withOwnerUpgradeIDpublic WidgetCheckBox(int x,
int y,
int color,
net.minecraft.util.text.ITextComponent text,
java.util.function.Consumer<? super WidgetCheckBox> pressable)
public WidgetCheckBox(int x,
int y,
int color,
net.minecraft.util.text.ITextComponent text)
public WidgetCheckBox withTag(java.lang.String tag)
public void renderButton(com.mojang.blaze3d.matrix.MatrixStack matrixStack,
int mouseX,
int mouseY,
float partialTick)
renderButton in class net.minecraft.client.gui.widget.Widgetpublic void onClick(double mouseX,
double mouseY)
onClick in class net.minecraft.client.gui.widget.Widgetpublic WidgetCheckBox setTooltip(java.util.List<net.minecraft.util.text.ITextComponent> tooltip)
public WidgetCheckBox setTooltipKey(java.lang.String translationKey)
public java.util.List<net.minecraft.util.text.ITextComponent> getTooltip()
public WidgetCheckBox setChecked(boolean checked)
public java.lang.String getTag()
ITaggedWidgetgetTag in interface ITaggedWidgetpublic void addTooltip(double mouseX,
double mouseY,
java.util.List<net.minecraft.util.text.ITextComponent> curTip,
boolean shift)
addTooltip in interface ITooltipProviderpublic boolean isChecked()
ICheckboxWidgetisChecked in interface ICheckboxWidget