Class LootDataType<T>
java.lang.Object
net.minecraft.world.level.storage.loot.LootDataType<T>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
private static final org.slf4j.Logger
static final LootDataType<LootItemFunction>
private final com.google.gson.Gson
static final LootDataType<LootItemCondition>
static final LootDataType<LootTable>
private final org.apache.commons.lang3.function.TriFunction<ResourceLocation,
com.google.gson.JsonElement, ResourceManager, Optional<T>> private final LootDataType.Validator<T>
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
LootDataType
(com.google.gson.Gson p_279334_, BiFunction<com.google.gson.Gson, String, org.apache.commons.lang3.function.TriFunction<ResourceLocation, com.google.gson.JsonElement, ResourceManager, Optional<T>>> p_279478_, String p_279433_, LootDataType.Validator<T> p_279363_) -
Method Summary
Modifier and TypeMethodDescriptionprivate static LootDataType.Validator<LootTable>
private static <T extends LootContextUser>
LootDataType.Validator<T>private static <T> BiFunction<com.google.gson.Gson,
String, org.apache.commons.lang3.function.TriFunction<ResourceLocation, com.google.gson.JsonElement, ResourceManager, Optional<T>>> createSingleDeserialiser
(Class<T> p_279251_) private static <T> BiFunction<com.google.gson.Gson,
String, org.apache.commons.lang3.function.TriFunction<ResourceLocation, com.google.gson.JsonElement, ResourceManager, Optional<T>>> createSingleOrMultipleDeserialiser
(Class<T> p_279337_, Function<T[], T> p_279252_) deserialize
(ResourceLocation p_279253_, com.google.gson.JsonElement p_279330_, ResourceManager resourceManager) com.google.gson.Gson
parser()
void
runValidation
(ValidationContext p_279366_, LootDataId<T> p_279106_, T p_279124_) static Stream<LootDataType<?>>
values()
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
PREDICATE
-
MODIFIER
-
TABLE
-
parser
private final com.google.gson.Gson parser -
topDeserializer
private final org.apache.commons.lang3.function.TriFunction<ResourceLocation,com.google.gson.JsonElement, topDeserializerResourceManager, Optional<T>> -
directory
-
validator
-
-
Constructor Details
-
LootDataType
private LootDataType(com.google.gson.Gson p_279334_, BiFunction<com.google.gson.Gson, String, org.apache.commons.lang3.function.TriFunction<ResourceLocation, com.google.gson.JsonElement, ResourceManager, Optional<T>>> p_279478_, String p_279433_, LootDataType.Validator<T> p_279363_)
-
-
Method Details
-
parser
public com.google.gson.Gson parser() -
directory
-
runValidation
-
deserialize
public Optional<T> deserialize(ResourceLocation p_279253_, com.google.gson.JsonElement p_279330_, ResourceManager resourceManager) -
values
-
createSingleDeserialiser
private static <T> BiFunction<com.google.gson.Gson,String, createSingleDeserialiserorg.apache.commons.lang3.function.TriFunction<ResourceLocation, com.google.gson.JsonElement, ResourceManager, Optional<T>>> (Class<T> p_279251_) -
createSingleOrMultipleDeserialiser
private static <T> BiFunction<com.google.gson.Gson,String, createSingleOrMultipleDeserialiserorg.apache.commons.lang3.function.TriFunction<ResourceLocation, com.google.gson.JsonElement, ResourceManager, Optional<T>>> (Class<T> p_279337_, Function<T[], T> p_279252_) -
createSimpleValidator
-
createLootTableValidator
-