Class AspectRegistry
java.lang.Object
org.cyclops.integrateddynamics.core.part.aspect.AspectRegistry
- All Implemented Interfaces:
org.cyclops.cyclopscore.init.IRegistry,IVariableFacadeHandler<IAspectVariableFacade>,IAspectRegistry
Registry for
IAspect.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Method Summary
Modifier and TypeMethodDescriptiongetAspect(net.minecraft.resources.ResourceLocation name) Get an aspect by name.Get all registered aspects.getAspects(IPartType partType) Get the registered aspects for a given part type.static AspectRegistryGet all registered read aspects.List<IAspectRead<?, ?>> getReadAspects(IPartType partType) Get the registered read aspects for a given part type.net.minecraft.resources.ResourceLocationgetVariableFacade(ValueDeseralizationContext valueDeseralizationContext, int id, net.minecraft.nbt.CompoundTag tag) Get the variable facade for the given tag.Get all registered write aspects.List<IAspectWrite<?, ?>> getWriteAspects(IPartType partType) Get the registered write aspects for a given part type.booleanisInstance(IVariable<?> variable) If the given variable is created by this handler.booleanisInstance(IVariableFacade variableFacade) If the given facade is created by this handler.voidregister(IPartType partType, Collection<IAspect> aspects) Register a set of aspects for a given part type.Register a new aspect for a given part type.protected <T extends IAspect<?,?>>
voidregisterSubAspectType(IPartType partType, T aspect, Map<IPartType, Set<T>> partAspects, Map<String, T> unlocalizedAspects) voidsetVariableFacade(ValueDeseralizationContext valueDeseralizationContext, net.minecraft.nbt.CompoundTag tag, IAspectVariableFacade variableFacade) Set the variable facade for the given tag.
-
Method Details
-
getInstance
- Returns:
- The unique instance.
-
getClient
- Specified by:
getClientin interfaceIAspectRegistry
-
register
Description copied from interface:IAspectRegistryRegister a new aspect for a given part type.- Specified by:
registerin interfaceIAspectRegistry- Parameters:
partType- The part type.aspect- The aspect.- Returns:
- The registered element.
-
registerSubAspectType
-
register
Description copied from interface:IAspectRegistryRegister a set of aspects for a given part type.- Specified by:
registerin interfaceIAspectRegistry- Parameters:
partType- The part type.aspects- The aspects.
-
getAspects
Description copied from interface:IAspectRegistryGet the registered aspects for a given part type.- Specified by:
getAspectsin interfaceIAspectRegistry- Parameters:
partType- The part type.- Returns:
- The aspects.
-
getReadAspects
Description copied from interface:IAspectRegistryGet the registered read aspects for a given part type.- Specified by:
getReadAspectsin interfaceIAspectRegistry- Parameters:
partType- The part type.- Returns:
- The read aspects.
-
getWriteAspects
Description copied from interface:IAspectRegistryGet the registered write aspects for a given part type.- Specified by:
getWriteAspectsin interfaceIAspectRegistry- Parameters:
partType- The part type.- Returns:
- The write aspects.
-
getAspects
Description copied from interface:IAspectRegistryGet all registered aspects.- Specified by:
getAspectsin interfaceIAspectRegistry- Returns:
- The aspects.
-
getReadAspects
Description copied from interface:IAspectRegistryGet all registered read aspects.- Specified by:
getReadAspectsin interfaceIAspectRegistry- Returns:
- The read aspects.
-
getWriteAspects
Description copied from interface:IAspectRegistryGet all registered write aspects.- Specified by:
getWriteAspectsin interfaceIAspectRegistry- Returns:
- The write aspects.
-
getAspect
Description copied from interface:IAspectRegistryGet an aspect by name.- Specified by:
getAspectin interfaceIAspectRegistry- Parameters:
name- The name of the aspect.- Returns:
- The matching aspect.
-
getUniqueName
public net.minecraft.resources.ResourceLocation getUniqueName()- Specified by:
getUniqueNamein interfaceIVariableFacadeHandler<IAspectVariableFacade>- Returns:
- The unique name of this type used to identity variables to this handler.
-
getVariableFacade
public IAspectVariableFacade getVariableFacade(ValueDeseralizationContext valueDeseralizationContext, int id, net.minecraft.nbt.CompoundTag tag) Description copied from interface:IVariableFacadeHandlerGet the variable facade for the given tag.- Specified by:
getVariableFacadein interfaceIVariableFacadeHandler<IAspectVariableFacade>- Parameters:
valueDeseralizationContext-id- The id that was read and needs to be inserted into the variable facade.tag- The tag containing information that can be read and used to form a variable facade.- Returns:
- The variable facade
-
setVariableFacade
public void setVariableFacade(ValueDeseralizationContext valueDeseralizationContext, net.minecraft.nbt.CompoundTag tag, IAspectVariableFacade variableFacade) Description copied from interface:IVariableFacadeHandlerSet the variable facade for the given tag.- Specified by:
setVariableFacadein interfaceIVariableFacadeHandler<IAspectVariableFacade>- Parameters:
valueDeseralizationContext-tag- The tag that is used to write variable facade information to.variableFacade- The facade to write.
-
isInstance
Description copied from interface:IVariableFacadeHandlerIf the given facade is created by this handler.- Specified by:
isInstancein interfaceIVariableFacadeHandler<IAspectVariableFacade>- Parameters:
variableFacade- A facade.- Returns:
- If it is an instance.
-
isInstance
Description copied from interface:IVariableFacadeHandlerIf the given variable is created by this handler.- Specified by:
isInstancein interfaceIVariableFacadeHandler<IAspectVariableFacade>- Parameters:
variable- A variable.- Returns:
- If it is an instance.
-