Interface DataProvider<T>
- All Known Implementing Classes:
BuildableDataProvider
,ConstantBooleanDataProvider
,ConstantItemStackDataProvider
,ConstantNumberDataProvider
,ConstantStringDataProvider
,HandUsedDataProvider
,HasPermissionDataProvider
,ImmutableDataProvider
,InteractionConditionDataProvider
,MatchesSpecDataProvider
,MutableDataProvider
,PartySlotDataProvider
,PlayerExpLevelDataProvider
,PlayerGameModeDataProvider
,PlayerInventoryDataProvider
,PlayerIPDataProvider
,PlayerNameDataProvider
,PlayerUUIDDataProvider
public interface DataProvider<T>
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.mojang.serialization.Codec<DataProvider<Boolean>>
static <T> BuildableDataProvider.Builder<T>
Creates a newBuildableDataProvider.Builder
com.mojang.serialization.Codec<? extends DataProvider<T>>
codec()
static <A extends DataProvider<B>,
B>
com.mojang.serialization.Codec<A>default DataProvider<T>
get
(InteractionContext context) default net.minecraft.resources.ResourceLocation
getKey()
static <A extends DataProvider<B>,
B extends List<C>, C>
com.mojang.serialization.Codec<A>static com.mojang.serialization.Codec<DataProvider<Number>>
static com.mojang.serialization.Codec<DataProvider<String>>
-
Method Details
-
getKey
default net.minecraft.resources.ResourceLocation getKey() -
codec
com.mojang.serialization.Codec<? extends DataProvider<T>> codec() -
get
-
inputTypes
-
fill
-
codec
-
listCodec
static <A extends DataProvider<B>,B extends List<C>, com.mojang.serialization.Codec<A> listCodecC> (Class<C> allowedType) -
numberCodec
-
booleanCodec
-
stringCodec
-
builder
Creates a newBuildableDataProvider.Builder
- Type Parameters:
T
- The type- Parameters:
type
- Not used for anything other than making sure the returned type is correct- Returns:
- The builder
-