Package net.minecraftforge.event
Class RegistryEvent.MissingMappings.Mapping<T extends IForgeRegistryEntry<T>>
- java.lang.Object
-
- net.minecraftforge.event.RegistryEvent.MissingMappings.Mapping<T>
-
- All Implemented Interfaces:
java.lang.Comparable<RegistryEvent.MissingMappings.Mapping<T>>
- Enclosing class:
- RegistryEvent.MissingMappings<T extends IForgeRegistryEntry<T>>
public static class RegistryEvent.MissingMappings.Mapping<T extends IForgeRegistryEntry<T>> extends java.lang.Object implements java.lang.Comparable<RegistryEvent.MissingMappings.Mapping<T>>
-
-
Field Summary
Fields Modifier and Type Field Description private RegistryEvent.MissingMappings.ActionactionintidResourceLocationkeyprivate IForgeRegistry<T>poolIForgeRegistry<T>registryprivate Ttarget
-
Constructor Summary
Constructors Constructor Description Mapping(IForgeRegistry<T> registry, IForgeRegistry<T> pool, ResourceLocation key, int id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(RegistryEvent.MissingMappings.Mapping<T> o)voidfail()Prevent the world from loading due to the missing item.RegistryEvent.MissingMappings.ActiongetAction()TgetTarget()voidignore()Ignore the missing item.voidremap(T target)Remap the missing entry to the specified object.voidwarn()Warn the user about the missing item.
-
-
-
Field Detail
-
registry
public final IForgeRegistry<T extends IForgeRegistryEntry<T>> registry
-
pool
private final IForgeRegistry<T extends IForgeRegistryEntry<T>> pool
-
key
public final ResourceLocation key
-
id
public final int id
-
action
private RegistryEvent.MissingMappings.Action action
-
target
private T extends IForgeRegistryEntry<T> target
-
-
Constructor Detail
-
Mapping
public Mapping(IForgeRegistry<T> registry, IForgeRegistry<T> pool, ResourceLocation key, int id)
-
-
Method Detail
-
ignore
public void ignore()
Ignore the missing item.
-
warn
public void warn()
Warn the user about the missing item.
-
fail
public void fail()
Prevent the world from loading due to the missing item.
-
remap
public void remap(T target)
Remap the missing entry to the specified object. Use this if you have renamed an entry. Existing references using the old name will point to the new one.- Parameters:
target- Entry to remap to.
-
getAction
public RegistryEvent.MissingMappings.Action getAction()
-
getTarget
public T getTarget()
-
compareTo
public int compareTo(RegistryEvent.MissingMappings.Mapping<T> o)
- Specified by:
compareToin interfacejava.lang.Comparable<T extends IForgeRegistryEntry<T>>
-
-