Class ScatterTargeter
java.lang.Object
me.deecaad.core.mechanics.targeters.Targeter
me.deecaad.core.mechanics.targeters.RelativeTargeter
me.deecaad.core.mechanics.targeters.ShapeTargeter
me.deecaad.core.mechanics.targeters.ScatterTargeter
- All Implemented Interfaces:
InlineSerializer<Targeter>,Serializer<Targeter>,net.kyori.adventure.key.Keyed,org.bukkit.Keyed
Strictly speaking, a random assortment of points is not a shape. But the shape targeter targets a
list of points, not a shape, so this is fine.
-
Nested Class Summary
Nested classes/interfaces inherited from interface me.deecaad.core.file.InlineSerializer
InlineSerializer.FormatException -
Field Summary
Fields inherited from class me.deecaad.core.mechanics.targeters.RelativeTargeter
isUseTargetFields inherited from interface me.deecaad.core.file.InlineSerializer
NAME_FINDER, UNIQUE_IDENTIFIER -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for serializerScatterTargeter(int points, double horizontalRange, double verticalRange, boolean isTraceDown) -
Method Summary
Methods inherited from class me.deecaad.core.mechanics.targeters.ShapeTargeter
getTargets0, isEntityMethods inherited from class me.deecaad.core.mechanics.targeters.RelativeTargeter
applyParentArgsMethods inherited from class me.deecaad.core.mechanics.targeters.Targeter
getOffset, getTargets, getWikiLink, isEyeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.deecaad.core.file.InlineSerializer
getInlineKeyword, getKeyword, shouldSerializeMethods inherited from interface org.bukkit.Keyed
keyMethods inherited from interface me.deecaad.core.file.Serializer
canUsePathTo, getName, getParentKeywords, letPassThrough, tryPathTo, useLater
-
Constructor Details
-
ScatterTargeter
public ScatterTargeter()Default constructor for serializer -
ScatterTargeter
public ScatterTargeter(int points, double horizontalRange, double verticalRange, boolean isTraceDown)
-
-
Method Details
-
getPoints
@NotNull public @NotNull Iterator<org.bukkit.util.Vector> getPoints(@NotNull @NotNull CastData cast) - Specified by:
getPointsin classShapeTargeter
-
getKey
@NotNull public @NotNull org.bukkit.NamespacedKey getKey() -
serialize
@NotNull public @NotNull Targeter serialize(@NotNull @NotNull me.deecaad.core.file.SerializeData data) throws me.deecaad.core.file.SerializerException Description copied from interface:SerializerInstantiates a new Object to be added into the finalized configuration. The object should be built off ofSerializeData.getConfig(). If there is any misconfiguration (or any other issue preventing the construction of an object), then this method should throw aSerializerException. This method may not return null.- Parameters:
data- The non-null data containing config- Returns:
- The non-null serialized data.
- Throws:
me.deecaad.core.file.SerializerException- If there is an error in config.
-