Class DataProviderInputType<T>
java.lang.Object
com.pixelmonmod.pixelmon.api.ui.type.DataProviderInputType<T>
- All Implemented Interfaces:
InputType<DataProvider<T>>
This input type represents
The
DataProvider
input from the user
to be selected from a dropdown menu.
The
DataProvider
s displayed in the dropdown menu are determined
by the type given when creating the input type.-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<DataProviderInputType<?>>
protected net.minecraft.resources.ResourceLocation
protected net.minecraft.network.chat.Component
protected List<net.minecraft.resources.ResourceLocation>
-
Constructor Summary
ModifierConstructorDescriptionprotected
DataProviderInputType
(List<net.minecraft.resources.ResourceLocation> values, net.minecraft.network.chat.Component label, net.minecraft.resources.ResourceLocation currentValue, List<InputType<?>> inputTypes) -
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 <T> DataProviderInputType<T>
of
(Class<T> dataProviderType, net.minecraft.network.chat.Component label, DataProvider<T> provider) Creates a new data provider input type for the given typevoid
setValue
(DataProvider<T> value) Sets the value of the inputvalue()
The current value of the input
-
Field Details
-
CODEC
-
values
-
label
protected net.minecraft.network.chat.Component label -
currentValue
protected net.minecraft.resources.ResourceLocation currentValue -
inputTypes
-
-
Constructor Details
-
DataProviderInputType
-
-
Method Details
-
of
public static <T> DataProviderInputType<T> of(Class<T> dataProviderType, net.minecraft.network.chat.Component label, DataProvider<T> provider) Creates a new data provider input type for the given type- Parameters:
dataProviderType
- The type of data provider to displaylabel
- The label to displayprovider
- The current value- Returns:
- The new data provider 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
-