Package net.minecraftforge.registries
Class MissingMappingsEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.registries.MissingMappingsEvent
public class MissingMappingsEvent
extends net.minecraftforge.eventbus.api.Event
Fired on the
forge bus
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Actions you can take with this missing mapping.static class
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
Modifier and TypeFieldDescriptionprivate final ResourceKey
<? extends Registry<?>> private final List
<MissingMappingsEvent.Mapping<?>> private final IForgeRegistry
<?> -
Constructor Summary
ConstructorDescriptionMissingMappingsEvent
(ResourceKey<? extends Registry<?>> key, IForgeRegistry<?> registry, Collection<MissingMappingsEvent.Mapping<?>> missed) -
Method Summary
Modifier and TypeMethodDescription<T> List
<MissingMappingsEvent.Mapping<T>> getAllMappings
(ResourceKey<? extends Registry<T>> registryKey) ResourceKey
<? extends Registry<?>> getKey()
<T> List
<MissingMappingsEvent.Mapping<T>> getMappings
(ResourceKey<? extends Registry<T>> registryKey, String namespace) Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
key
-
registry
-
mappings
-
-
Constructor Details
-
MissingMappingsEvent
public MissingMappingsEvent(ResourceKey<? extends Registry<?>> key, IForgeRegistry<?> registry, Collection<MissingMappingsEvent.Mapping<?>> missed)
-
-
Method Details
-
getKey
-
getRegistry
-
getMappings
public <T> List<MissingMappingsEvent.Mapping<T>> getMappings(ResourceKey<? extends Registry<T>> registryKey, String namespace) - Returns:
- An immutable list of missing mappings for the given namespace.
Empty if the registry key doesn't match
getKey()
.
-
getAllMappings
public <T> List<MissingMappingsEvent.Mapping<T>> getAllMappings(ResourceKey<? extends Registry<T>> registryKey) - Returns:
- An immutable list of all missing mappings.
Empty if the registry key doesn't match
getKey()
.
-