Package net.minecraftforge.registries
Class ObjectHolderRef
- java.lang.Object
-
- net.minecraftforge.registries.ObjectHolderRef
-
- All Implemented Interfaces:
java.util.function.Consumer<java.util.function.Predicate<ResourceLocation>>
public class ObjectHolderRef extends java.lang.Object implements java.util.function.Consumer<java.util.function.Predicate<ResourceLocation>>
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.reflect.Field
field
private ResourceLocation
injectedObject
private boolean
isValid
private static org.apache.logging.log4j.Logger
LOGGER
private ForgeRegistry<?>
registry
-
Constructor Summary
Constructors Constructor Description ObjectHolderRef(java.lang.reflect.Field field, java.lang.String injectedObject, boolean extractFromExistingValues)
ObjectHolderRef(java.lang.reflect.Field field, ResourceLocation injectedObject)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(java.util.function.Predicate<ResourceLocation> filter)
boolean
equals(java.lang.Object other)
private ForgeRegistry<?>
getRegistryForType(java.lang.reflect.Field field)
int
hashCode()
boolean
isValid()
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
field
private java.lang.reflect.Field field
-
injectedObject
private ResourceLocation injectedObject
-
isValid
private boolean isValid
-
registry
private ForgeRegistry<?> registry
-
-
Constructor Detail
-
ObjectHolderRef
public ObjectHolderRef(java.lang.reflect.Field field, ResourceLocation injectedObject)
-
ObjectHolderRef
ObjectHolderRef(java.lang.reflect.Field field, java.lang.String injectedObject, boolean extractFromExistingValues)
-
-
Method Detail
-
getRegistryForType
@Nullable private ForgeRegistry<?> getRegistryForType(java.lang.reflect.Field field)
-
isValid
public boolean isValid()
-
accept
public void accept(java.util.function.Predicate<ResourceLocation> filter)
- Specified by:
accept
in interfacejava.util.function.Consumer<java.util.function.Predicate<ResourceLocation>>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
-