Interface IStructureWithBlocksToMove
- All Superinterfaces:
IPropertyHolder,IPropertyHolderConst
Describes a type of structure that moves in a straight line, where the final position of each block in a structure
after an animation can be calculated by adding or subtracting the same 'distance' value (measured in blocks as
integer value) to its starting position. The dimension(s) along which this is applied is up to the structure type
itself to define.
An example of a structure type with discrete movement is a portcullis, as that only goes straight up and straight down.
-
Method Summary
Modifier and TypeMethodDescriptiondefault intGet the number of blocks this structure will try to move.default IPropertyValue<Integer> setBlocksToMove(int blocksToMove) Change the number of blocks this structure will try to move when opened.Methods inherited from interface nl.pim16aap2.animatedarchitecture.core.structures.properties.IPropertyHolder
setPropertyValueMethods inherited from interface nl.pim16aap2.animatedarchitecture.core.structures.properties.IPropertyHolderConst
getPropertyValue, getRequiredPropertyValue, hasProperties, hasProperties, hasProperties, hasProperty
-
Method Details
-
getBlocksToMove
default int getBlocksToMove()Get the number of blocks this structure will try to move. As explained atsetBlocksToMove(int), the structure is not guaranteed to move as far as specified.- Returns:
- The number of blocks the structure will try to move.
-
setBlocksToMove
Change the number of blocks this structure will try to move when opened. Note that this is only a suggestion. It will never move more blocks than possible. Values less than 1 will use the default value for thisStructure.- Parameters:
blocksToMove- The number of blocks the structure will try to move.- Returns:
- The previous property value of the open status property.
-