类 ContextAwareReloadListener
java.lang.Object
net.neoforged.neoforge.resource.ContextAwareReloadListener
- 所有已实现的接口:
PreparableReloadListener
- 直接已知子类:
SimplePreparableReloadListener
Reload listeners that descend from this class will have the reload context automatically populated when it is available.
The context is guaranteed to be available for the duration of PreparableReloadListener.reload(net.minecraft.server.packs.resources.PreparableReloadListener.PreparationBarrier, net.minecraft.server.packs.resources.ResourceManager, java.util.concurrent.Executor, java.util.concurrent.Executor)
.
For children of SimplePreparableReloadListener
, it will be available during both SimplePreparableReloadListener.prepare(net.minecraft.server.packs.resources.ResourceManager, net.minecraft.util.profiling.ProfilerFiller)
prepare()} and apply()
.
-
嵌套类概要
从接口继承的嵌套类/接口 net.minecraft.server.packs.resources.PreparableReloadListener
PreparableReloadListener.PreparationBarrier
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected final ICondition.IContext
Returns the condition context held by this listener, orICondition.IContext.EMPTY
if it is unavailable.protected final HolderLookup.Provider
Returns the registry access held by this listener, orRegistryAccess.EMPTY
if it is unavailable.void
injectContext
(ICondition.IContext context, HolderLookup.Provider registryLookup) protected final ConditionalOps
<com.google.gson.JsonElement> protected final ConditionalOps
<com.google.gson.JsonElement> makeConditionalOps
(com.mojang.serialization.DynamicOps<com.google.gson.JsonElement> ops) 从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 net.minecraft.server.packs.resources.PreparableReloadListener
getName, reload
-
字段详细资料
-
conditionContext
-
registryLookup
-
-
构造器详细资料
-
ContextAwareReloadListener
public ContextAwareReloadListener()
-
-
方法详细资料
-
injectContext
@Internal public void injectContext(ICondition.IContext context, HolderLookup.Provider registryLookup) -
getContext
Returns the condition context held by this listener, orICondition.IContext.EMPTY
if it is unavailable. -
getRegistryLookup
Returns the registry access held by this listener, orRegistryAccess.EMPTY
if it is unavailable. -
makeConditionalOps
-
makeConditionalOps
protected final ConditionalOps<com.google.gson.JsonElement> makeConditionalOps(com.mojang.serialization.DynamicOps<com.google.gson.JsonElement> ops)
-