Package net.minecraft.loot
Class LootManager
java.lang.Object
net.minecraft.loot.LootManager
- All Implemented Interfaces:
class_8489,ResourceReloader
- Mappings:
Namespace Name official dyzintermediary net/minecraft/class_60named net/minecraft/loot/LootManager
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static classNested classes/interfaces inherited from interface net.minecraft.resource.ResourceReloader
ResourceReloader.Synchronizer -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final class_8488<LootTable>private Map<class_8488<?>,?> private Multimap<class_8490<?>,Identifier> private static final Logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TgetElement(class_8488<T> class_8488) private voidmethod_20712(Map<class_8490<?>, Map<Identifier, ?>> map) method_51193(class_8490<?> class_8490) private static <T> CompletableFuture<?>method_51194(class_8490<T> class_8490, ResourceManager resourceManager, Executor executor, Map<class_8490<?>, Map<Identifier, ?>> map) private static <T> voidmethod_51196(LootTableReporter lootTableReporter, class_8488<T> class_8488, Object object) static LootFunctionmethod_51200(LootFunction[] lootFunction) static LootConditionmethod_51201(LootCondition[] lootCondition) final CompletableFuture<Void>reload(ResourceReloader.Synchronizer synchronizer, ResourceManager manager, Profiler prepareProfiler, Profiler applyProfiler, Executor prepareExecutor, Executor applyExecutor) Performs a reload.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.class_8489
getElement, getElementOptional, getElementOptional, getLootTableMethods inherited from interface net.minecraft.resource.ResourceReloader
getName
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector official bLdyz;b:Lorg/slf4j/Logger;intermediary field_975Lnet/minecraft/class_60;field_975:Lorg/slf4j/Logger;named LOGGERLnet/minecraft/loot/LootManager;LOGGER:Lorg/slf4j/Logger;
-
field_44491
- Mappings:
Namespace Name Mixin selector official aLdyz;a:Ldyy;intermediary field_44491Lnet/minecraft/class_60;field_44491:Lnet/minecraft/class_8488;named field_44491Lnet/minecraft/loot/LootManager;field_44491:Lnet/minecraft/class_8488;
-
field_44492
- Mappings:
Namespace Name Mixin selector official cLdyz;c:Ljava/util/Map;intermediary field_44492Lnet/minecraft/class_60;field_44492:Ljava/util/Map;named field_44492Lnet/minecraft/loot/LootManager;field_44492:Ljava/util/Map;
-
field_44493
- Mappings:
Namespace Name Mixin selector official dLdyz;d:Lcom/google/common/collect/Multimap;intermediary field_44493Lnet/minecraft/class_60;field_44493:Lcom/google/common/collect/Multimap;named field_44493Lnet/minecraft/loot/LootManager;field_44493:Lcom/google/common/collect/Multimap;
-
-
Constructor Details
-
LootManager
public LootManager()
-
-
Method Details
-
reload
public final CompletableFuture<Void> reload(ResourceReloader.Synchronizer synchronizer, ResourceManager manager, Profiler prepareProfiler, Profiler applyProfiler, Executor prepareExecutor, Executor applyExecutor) Performs a reload. Returns a future that is completed when the reload is completed.In a reload, there is a prepare stage and an apply stage. For the prepare stage, you should create completable futures with CompletableFuture.supplyAsync(..., prepareExecutor) to ensure the prepare actions are done with the prepare executor. Then, you should have a completable future for all the prepared actions, and call combinedPrepare.thenCompose(synchronizer::waitFor) to notify the
synchronizer. Finally, you should run CompletableFuture.thenAcceptAsync(..., applyExecutor) for apply actions. In the end, returns the result ofthenAcceptAsync.- Specified by:
reloadin interfaceResourceReloader- Parameters:
synchronizer- the synchronizermanager- the resource managerprepareProfiler- the profiler for prepare stageapplyProfiler- the profiler for apply stageprepareExecutor- the executor for prepare stageapplyExecutor- the executor for apply stage- Returns:
- a future for the reload
- See Also:
- Mappings:
Namespace Name Mixin selector official aLakn;a(Lakn$a;Lakt;Lbae;Lbae;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;intermediary method_25931Lnet/minecraft/class_3302;method_25931(Lnet/minecraft/class_3302$class_4045;Lnet/minecraft/class_3300;Lnet/minecraft/class_3695;Lnet/minecraft/class_3695;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;named reloadLnet/minecraft/resource/ResourceReloader;reload(Lnet/minecraft/resource/ResourceReloader$Synchronizer;Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/util/profiler/Profiler;Lnet/minecraft/util/profiler/Profiler;Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture;
-
method_51194
private static <T> CompletableFuture<?> method_51194(class_8490<T> class_8490, ResourceManager resourceManager, Executor executor, Map<class_8490<?>, Map<Identifier, ?>> map) - Mappings:
Namespace Name Mixin selector official aLdyz;a(Ldzb;Lakt;Ljava/util/concurrent/Executor;Ljava/util/Map;)Ljava/util/concurrent/CompletableFuture;intermediary method_51194Lnet/minecraft/class_60;method_51194(Lnet/minecraft/class_8490;Lnet/minecraft/class_3300;Ljava/util/concurrent/Executor;Ljava/util/Map;)Ljava/util/concurrent/CompletableFuture;named method_51194Lnet/minecraft/loot/LootManager;method_51194(Lnet/minecraft/class_8490;Lnet/minecraft/resource/ResourceManager;Ljava/util/concurrent/Executor;Ljava/util/Map;)Ljava/util/concurrent/CompletableFuture;
-
method_20712
- Mappings:
Namespace Name Mixin selector official aLdyz;a(Ljava/util/Map;)Vintermediary method_20712Lnet/minecraft/class_60;method_20712(Ljava/util/Map;)Vnamed method_20712Lnet/minecraft/loot/LootManager;method_20712(Ljava/util/Map;)V
-
method_51196
private static <T> void method_51196(LootTableReporter lootTableReporter, class_8488<T> class_8488, Object object) - Mappings:
Namespace Name Mixin selector official aLdyz;a(Ldzg;Ldyy;Ljava/lang/Object;)Vintermediary method_51196Lnet/minecraft/class_60;method_51196(Lnet/minecraft/class_58;Lnet/minecraft/class_8488;Ljava/lang/Object;)Vnamed method_51196Lnet/minecraft/loot/LootManager;method_51196(Lnet/minecraft/loot/LootTableReporter;Lnet/minecraft/class_8488;Ljava/lang/Object;)V
-
getElement
- Specified by:
getElementin interfaceclass_8489
-
method_51193
- Mappings:
Namespace Name Mixin selector official aLdyz;a(Ldzb;)Ljava/util/Collection;intermediary method_51193Lnet/minecraft/class_60;method_51193(Lnet/minecraft/class_8490;)Ljava/util/Collection;named method_51193Lnet/minecraft/loot/LootManager;method_51193(Lnet/minecraft/class_8490;)Ljava/util/Collection;
-
method_51201
- Mappings:
Namespace Name Mixin selector official aLdyz;a([Lebt;)Lebt;intermediary method_51201Lnet/minecraft/class_60;method_51201([Lnet/minecraft/class_5341;)Lnet/minecraft/class_5341;named method_51201Lnet/minecraft/loot/LootManager;method_51201([Lnet/minecraft/loot/condition/LootCondition;)Lnet/minecraft/loot/condition/LootCondition;
-
method_51200
- Mappings:
Namespace Name Mixin selector official aLdyz;a([Leak;)Leak;intermediary method_51200Lnet/minecraft/class_60;method_51200([Lnet/minecraft/class_117;)Lnet/minecraft/class_117;named method_51200Lnet/minecraft/loot/LootManager;method_51200([Lnet/minecraft/loot/function/LootFunction;)Lnet/minecraft/loot/function/LootFunction;
-