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
Modifier and TypeFieldDescriptionprivate Map<LootDataId<?>,
?> static final LootDataId<LootTable>
private static final com.google.gson.Gson
private static final org.slf4j.Logger
private com.google.common.collect.Multimap<LootDataType<?>,
ResourceLocation> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
apply
(Map<LootDataType<?>, Map<ResourceLocation, ?>> p_279426_) private static <T> void
castAndValidate
(ValidationContext p_279270_, LootDataId<T> p_279249_, Object p_279342_) <T> T
getElement
(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, wait
Methods inherited from interface net.minecraft.world.level.storage.loot.LootDataResolver
getElement, getElementOptional, getElementOptional, getLootTable
Methods 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:
reload
in 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:
getElement
in interfaceLootDataResolver
-
getKeys
-