Class LootDataManager
java.lang.Object
net.minecraft.world.level.storage.loot.LootDataManager
- All Implemented Interfaces:
PreparableReloadListener,LootDataResolver
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
PreparableReloadListener.PreparationBarrier -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Map<LootDataId<?>,?> static final LootDataId<LootTable>private static final com.google.gson.Gsonprivate static final org.slf4j.Loggerprivate com.google.common.collect.Multimap<LootDataType<?>,ResourceLocation> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidapply(Map<LootDataType<?>, Map<ResourceLocation, ?>> p_279426_) private static <T> voidcastAndValidate(ValidationContext p_279270_, LootDataId<T> p_279249_, Object p_279342_) <T> TgetElement(LootDataId<T> p_279467_) getKeys(LootDataType<?> p_279455_) final CompletableFuture<Void>reload(PreparableReloadListener.PreparationBarrier p_279240_, ResourceManager p_279377_, ProfilerFiller p_279135_, ProfilerFiller p_279088_, Executor p_279148_, Executor p_279169_) private static <T> CompletableFuture<?>scheduleElementParse(LootDataType<T> p_279205_, ResourceManager p_279441_, Executor p_279233_, Map<LootDataType<?>, Map<ResourceLocation, ?>> p_279241_) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.level.storage.loot.LootDataResolver
getElement, getElementOptional, getElementOptional, getLootTableMethods inherited from interface net.minecraft.server.packs.resources.PreparableReloadListener
getName
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
GSON
private static final com.google.gson.Gson GSON -
EMPTY_LOOT_TABLE_KEY
-
elements
-
typeKeys
-
-
Constructor Details
-
LootDataManager
public LootDataManager()
-
-
Method Details
-
reload
public final CompletableFuture<Void> reload(PreparableReloadListener.PreparationBarrier p_279240_, ResourceManager p_279377_, ProfilerFiller p_279135_, ProfilerFiller p_279088_, Executor p_279148_, Executor p_279169_) - Specified by:
reloadin interfacePreparableReloadListener
-
scheduleElementParse
private static <T> CompletableFuture<?> scheduleElementParse(LootDataType<T> p_279205_, ResourceManager p_279441_, Executor p_279233_, Map<LootDataType<?>, Map<ResourceLocation, ?>> p_279241_) -
apply
-
castAndValidate
private static <T> void castAndValidate(ValidationContext p_279270_, LootDataId<T> p_279249_, Object p_279342_) -
getElement
- Specified by:
getElementin interfaceLootDataResolver
-
getKeys
-