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
ConstructorDescriptionAspectBase
(org.cyclops.cyclopscore.init.ModBase mod, IAspectProperties defaultProperties) -
Method Summary
Modifier and TypeMethodDescriptionprotected IAspectProperties
Deprecated.final IAspectProperties
protected org.cyclops.cyclopscore.init.ModBase
getMod()
protected String
getModId()
<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.MenuProvider
This will only be called if this aspect has properties.These are the properties that are supported for this aspect.net.minecraft.resources.ResourceLocation
protected String
protected abstract String
<P extends IPartType<P,
S>, S extends IPartState<P>>
booleanvoid
loadTooltip
(List<net.minecraft.network.chat.Component> lines, 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, wait
Methods 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:
getUniqueName
in interfaceIAspect<V extends IValue,
T extends IValueType<V>> - Returns:
- The unique name for this aspecy, only used for internal storage.
-
getTranslationKey
- Specified by:
getTranslationKey
in interfaceIAspect<V extends IValue,
T extends IValueType<V>> - Returns:
- The unique unlocalized name for this aspect.
-
getUnlocalizedPrefix
-
getUnlocalizedType
-
loadTooltip
public void loadTooltip(List<net.minecraft.network.chat.Component> lines, boolean appendOptionalInfo) Description copied from interface:IAspect
Add tooltip lines for this aspect when hovered in a gui.- Specified by:
loadTooltip
in interfaceIAspect<V extends IValue,
T extends IValueType<V>> - Parameters:
lines
- The list to add lines to.appendOptionalInfo
- If shift-to-show info should be added.
-
hasProperties
- Specified by:
hasProperties
in 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:IAspect
Get the current properties of this aspect in the given part.- Specified by:
getProperties
in 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:IAspect
Set the new properties of this aspect in the given part.- Specified by:
setProperties
in 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:
getDefaultProperties
in interfaceIAspect<V extends IValue,
T extends IValueType<V>> - Returns:
- The default properties for this aspect.
-
getPropertyTypes
Description copied from interface:IAspect
These 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:
getPropertyTypes
in interfaceIAspect<V extends IValue,
T extends IValueType<V>> - Returns:
- The types that are available for this aspect.
-
getPropertiesContainerProvider
Description copied from interface:IAspect
This will only be called if this aspect has properties.- Specified by:
getPropertiesContainerProvider
in 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.
-
getMod
protected org.cyclops.cyclopscore.init.ModBase getMod() -
getModId
-