Class AspectBase<V extends IValue,T extends IValueType<V>>
java.lang.Object
org.cyclops.integrateddynamics.part.aspect.AspectBase<V,T>
- All Implemented Interfaces:
IAspect<V,T>
- Direct Known Subclasses:
AspectReadBase,AspectWriteBase
public abstract class AspectBase<V extends IValue,T extends IValueType<V>>
extends Object
implements IAspect<V,T>
Base class for aspects.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.cyclops.integrateddynamics.api.part.aspect.IAspect
IAspect.AspectComparator -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected IAspectPropertiesDeprecated.final IAspectPropertiesprotected StringgetModId()<P extends IPartType<P,S>, S extends IPartState<P>>
IAspectPropertiesgetProperties(P partType, PartTarget target, S state) Get the current properties of this aspect in the given part.net.minecraft.world.MenuProviderThis will only be called if this aspect has properties.These are the properties that are supported for this aspect.net.minecraft.resources.ResourceLocationprotected Stringprotected abstract String<P extends IPartType<P,S>, S extends IPartState<P>>
booleanvoidloadTooltip(Consumer<net.minecraft.network.chat.Component> tooltipAdder, boolean appendOptionalInfo) Add tooltip lines for this aspect when hovered in a gui.<P extends IPartType<P,S>, S extends IPartState<P>>
voidsetProperties(P partType, PartTarget target, S state, IAspectProperties properties) Set the new properties of this aspect in the given part.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cyclops.integrateddynamics.api.part.aspect.IAspect
getValueType, update
-
Constructor Details
-
AspectBase
-
-
Method Details
-
getUniqueName
public net.minecraft.resources.ResourceLocation getUniqueName()- Specified by:
getUniqueNamein interfaceIAspect<V extends IValue,T extends IValueType<V>> - Returns:
- The unique name for this aspecy, only used for internal storage.
-
getTranslationKey
- Specified by:
getTranslationKeyin interfaceIAspect<V extends IValue,T extends IValueType<V>> - Returns:
- The unique unlocalized name for this aspect.
-
getUnlocalizedPrefix
-
getUnlocalizedType
-
loadTooltip
public void loadTooltip(Consumer<net.minecraft.network.chat.Component> tooltipAdder, boolean appendOptionalInfo) Description copied from interface:IAspectAdd tooltip lines for this aspect when hovered in a gui.- Specified by:
loadTooltipin interfaceIAspect<V extends IValue,T extends IValueType<V>> - Parameters:
tooltipAdder- The list to add lines to.appendOptionalInfo- If shift-to-show info should be added.
-
hasProperties
- Specified by:
hasPropertiesin interfaceIAspect<V extends IValue,T extends IValueType<V>> - Type Parameters:
P- The part type typeS- The part state type- Returns:
- If this aspect supports additional properties.
-
getProperties
public <P extends IPartType<P,S>, IAspectProperties getPropertiesS extends IPartState<P>> (P partType, PartTarget target, S state) Description copied from interface:IAspectGet the current properties of this aspect in the given part.- Specified by:
getPropertiesin interfaceIAspect<V extends IValue,T extends IValueType<V>> - Type Parameters:
P- The part type type.S- The part state.- Parameters:
partType- The part type.target- The position that is targeted by the given part.state- The current state of the given part.- Returns:
- The current properties.
-
setProperties
public <P extends IPartType<P,S>, void setPropertiesS extends IPartState<P>> (P partType, PartTarget target, S state, IAspectProperties properties) Description copied from interface:IAspectSet the new properties of this aspect in the given part.- Specified by:
setPropertiesin interfaceIAspect<V extends IValue,T extends IValueType<V>> - Type Parameters:
P- The part type type.S- The part state.- Parameters:
partType- The part type.target- The position that is targeted by the given part.state- The current state of the given part.properties- The new properties.
-
getDefaultProperties
- Specified by:
getDefaultPropertiesin interfaceIAspect<V extends IValue,T extends IValueType<V>> - Returns:
- The default properties for this aspect.
-
getPropertyTypes
Description copied from interface:IAspectThese are the properties that are supported for this aspect. It is possible that some deprecated properties are available inside the retrieved properties, so use this to iterate over the values.- Specified by:
getPropertyTypesin interfaceIAspect<V extends IValue,T extends IValueType<V>> - Returns:
- The types that are available for this aspect.
-
getPropertiesContainerProvider
Description copied from interface:IAspectThis will only be called if this aspect has properties.- Specified by:
getPropertiesContainerProviderin interfaceIAspect<V extends IValue,T extends IValueType<V>> - Parameters:
pos- The part position.- Returns:
- The container type for the screen to configure the properties.
-
createDefaultProperties
Deprecated.Creates the default properties for this aspect, only called once.- Returns:
- The default properties.
-
getModId
-