Class BooleanInputType
java.lang.Object
com.pixelmonmod.pixelmon.api.ui.type.BooleanInputType
This input type represents a single boolean input from the user
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<BooleanInputType>
protected net.minecraft.network.chat.Component
protected net.minecraft.network.chat.Component
protected net.minecraft.network.chat.Component
protected boolean
-
Constructor Summary
ModifierConstructorDescriptionprotected
BooleanInputType
(boolean value, net.minecraft.network.chat.Component label, net.minecraft.network.chat.Component trueValue, net.minecraft.network.chat.Component falseValue) -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.Codec<? extends InputType<?>>
codec()
The codec used for encoding and decoding the data when transferring between the client and serverList<net.minecraft.client.gui.layouts.Layout>
static BooleanInputType
of
(boolean value, net.minecraft.network.chat.Component label) static BooleanInputType
of
(boolean value, net.minecraft.network.chat.Component label, net.minecraft.network.chat.Component trueValue, net.minecraft.network.chat.Component falseValue) Creates a new boolean input typevoid
Sets the value of the inputvalue()
The current value of the input
-
Field Details
-
CODEC
-
label
protected net.minecraft.network.chat.Component label -
trueValue
protected net.minecraft.network.chat.Component trueValue -
falseValue
protected net.minecraft.network.chat.Component falseValue -
value
protected boolean value
-
-
Constructor Details
-
BooleanInputType
protected BooleanInputType(boolean value, net.minecraft.network.chat.Component label, net.minecraft.network.chat.Component trueValue, net.minecraft.network.chat.Component falseValue)
-
-
Method Details
-
of
-
of
public static BooleanInputType of(boolean value, net.minecraft.network.chat.Component label, net.minecraft.network.chat.Component trueValue, net.minecraft.network.chat.Component falseValue) Creates a new boolean input type- Parameters:
value
- The current valuelabel
- The label to display- Returns:
- The new boolean input type
-
codec
Description copied from interface:InputType
The codec used for encoding and decoding the data when transferring between the client and server -
value
Description copied from interface:InputType
The current value of the input -
setValue
Description copied from interface:InputType
Sets the value of the input -
getWidget
-