Enum Class StructurePlaceAnimator.AnimatorTime
java.lang.Object
java.lang.Enum<StructurePlaceAnimator.AnimatorTime>
net.rodofire.easierworldcreator.placer.blocks.animator.StructurePlaceAnimator.AnimatorTime
- All Implemented Interfaces:
Serializable,Comparable<StructurePlaceAnimator.AnimatorTime>,Constable
- Enclosing class:
StructurePlaceAnimator
public static enum StructurePlaceAnimator.AnimatorTime
extends Enum<StructurePlaceAnimator.AnimatorTime>
enum to determine how much time the structure will be placed.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDetermines a defined number of blocks per tick.Determines a fixed number of ticks to place the structure.Will place an increasing (or decreasing) number of blocks per ticks linearly.Will place an increasing (or decreasing) number of blocks per ticks linearly.Will place an increasing (or decreasing) number of blocks per ticks that will grow on x².Will place an increasing (or decreasing) number of blocks per ticks following a quadratic curve.Will place a random number blocks every tick. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static StructurePlaceAnimator.AnimatorTime[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CONSTANT_BLOCKS_PER_TICK
Determines a defined number of blocks per tick. Each tick, a number ofblockPerTickwill be placed. You then have to specifyblockPerTick -
LINEAR_BLOCK_PER_TICK
Will place an increasing (or decreasing) number of blocks per ticks linearly. You will have to specify the number of blockPerTicks that will be used based on the following principle:- tick0 -> zero blocks placed
- tick1 -> blockPerTick blocks placed
- tick2 -> 2 * blockPerTick blocks placed
...
- tickN-1 -> (N-1) * blockPerTick blocks placed
- tickN -> min(N * blockPerTick blocks placed, remaining blocks)
BlockPerTicks -
QUADRATIC_BLOCK_PER_TICK
Will place an increasing (or decreasing) number of blocks per ticks that will grow on x². You will have to specify the number of blockPerTicks that will be used based on the following principle:- tick0 -> zero blocks placed
- tick1 -> blockPerTick blocks placed
- tick2 -> 4 * blockPerTick blocks placed (2*2)
...
- tickN-1 -> (N-1) * (N-1) * blockPerTick blocks placed
- tickN -> min(N * N * blockPerTick blocks placed, remaining blocks)
to init the animator, You simply have to specify the number ofBlockPerTicks -
RANDOM_BLOCKS_PER_TICK
Will place a random number blocks every tick. For that you need to use thebounds:animator.setBounds(min_value, max_value);The animator will then choose a random number of blocks to place each tick.
The random number chose will be contained between the min value and the max value. For example:
//possible values : {5, 6, 7, 8, 9, 10} animator.setBounds(5,10); -
CONSTANT_TICKS
Determines a fixed number of ticks to place the structure.
For that, you need to specify the number of ticks:
setTicks().The structure will then place a number of
blockSize / ticksblock each tick. -
LINEAR_TICKS
Will place an increasing (or decreasing) number of blocks per ticks linearly. You have to set a bound of blocksStructurePlaceAnimator.- The number of blocks that will be placed on the first tick is the first integer of the pair.
- The last int of the pair represents the number of blocks that will be placed at the last tick.
-
QUADRATIC_TICKS
Will place an increasing (or decreasing) number of blocks per ticks following a quadratic curve. You have to set a bound of blocksStructurePlaceAnimator.- The number of blocks that will be placed on the first tick is the first integer of the pair.
- The last int of the pair represents the number of blocks that will be placed at the last tick.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-