Class RegistryInputType
java.lang.Object
com.pixelmonmod.pixelmon.api.ui.type.RegistryInputType
- All Implemented Interfaces:
InputType<net.minecraft.resources.ResourceLocation>
public class RegistryInputType
extends Object
implements InputType<net.minecraft.resources.ResourceLocation>
This input type represents a single String input from the user
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<RegistryInputType>
protected net.minecraft.network.chat.Component
protected net.minecraft.resources.ResourceLocation
protected net.minecraft.resources.ResourceLocation
-
Constructor Summary
ModifierConstructorDescriptionprotected
RegistryInputType
(net.minecraft.network.chat.Component label, net.minecraft.resources.ResourceLocation value, net.minecraft.resources.ResourceLocation registry) -
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 RegistryInputType
of
(net.minecraft.resources.ResourceLocation value, net.minecraft.resources.ResourceLocation registry, net.minecraft.network.chat.Component label) Creates a new text input typestatic RegistryInputType
of
(net.minecraft.resources.ResourceLocation value, net.minecraftforge.registries.IForgeRegistry<?> registry, net.minecraft.network.chat.Component label) Creates a new text input typevoid
setValue
(net.minecraft.resources.ResourceLocation value) Sets the value of the inputnet.minecraft.resources.ResourceLocation
value()
The current value of the input
-
Field Details
-
CODEC
-
label
protected net.minecraft.network.chat.Component label -
value
protected net.minecraft.resources.ResourceLocation value -
registry
protected net.minecraft.resources.ResourceLocation registry
-
-
Constructor Details
-
RegistryInputType
protected RegistryInputType(net.minecraft.network.chat.Component label, net.minecraft.resources.ResourceLocation value, net.minecraft.resources.ResourceLocation registry)
-
-
Method Details
-
of
public static RegistryInputType of(net.minecraft.resources.ResourceLocation value, net.minecraftforge.registries.IForgeRegistry<?> registry, net.minecraft.network.chat.Component label) Creates a new text input type- Parameters:
value
- The current valuelabel
- The label to display- Returns:
- The new text input type
-
of
public static RegistryInputType of(net.minecraft.resources.ResourceLocation value, net.minecraft.resources.ResourceLocation registry, net.minecraft.network.chat.Component label) Creates a new text input type- Parameters:
value
- The current valuelabel
- The label to display- Returns:
- The new text 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
public net.minecraft.resources.ResourceLocation value()Description copied from interface:InputType
The current value of the input -
setValue
public void setValue(net.minecraft.resources.ResourceLocation value) Description copied from interface:InputType
Sets the value of the input -
getWidget
-