Class Spread
java.lang.Object
me.deecaad.weaponmechanics.weapon.shoot.spread.Spread
- All Implemented Interfaces:
me.deecaad.core.file.Serializer<Spread>
-
Constructor Summary
ConstructorsConstructorDescriptionSpread()Default constructor for serializerSpread(double baseSpread, ModifySpreadWhen modifySpreadWhen, ChangingSpread changingSpread) Spread(SpreadImage spreadImage) Spread(SpreadImage spreadImage, double baseSpread, ModifySpreadWhen modifySpreadWhen, ChangingSpread changingSpread) -
Method Summary
Modifier and TypeMethodDescriptiondoubleorg.bukkit.util.VectorgetNormalizedSpreadDirection(EntityWrapper entityWrapper, org.bukkit.Location shootLocation, boolean mainHand, boolean updateSpreadChange) Returns normalized spread directionorg.bukkit.util.VectorgetNormalizedSpreadDirection(EntityWrapper entityWrapper, org.bukkit.Location shootLocation, boolean mainHand, boolean updateSpreadChange, double spread) Returns normalized spread direction@NotNull Spreadserialize(@NotNull me.deecaad.core.file.SerializeData data) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.deecaad.core.file.Serializer
canUsePathTo, getName, getParentKeywords, getWikiLink, letPassThrough, shouldSerialize, tryPathTo, useLater
-
Constructor Details
-
Spread
public Spread()Default constructor for serializer -
Spread
-
Spread
-
Spread
public Spread(SpreadImage spreadImage, double baseSpread, ModifySpreadWhen modifySpreadWhen, ChangingSpread changingSpread)
-
-
Method Details
-
getSpreadImage
-
getBaseSpread
public double getBaseSpread() -
getModifySpreadWhen
-
getChangingSpread
-
getNormalizedSpreadDirection
public org.bukkit.util.Vector getNormalizedSpreadDirection(EntityWrapper entityWrapper, org.bukkit.Location shootLocation, boolean mainHand, boolean updateSpreadChange) Returns normalized spread direction- Parameters:
entityWrapper- the entity involvedshootLocation- the shoot locationmainHand- whether or not main hand was usedupdateSpreadChange- whether or not to allow updating current spread change- Returns:
- the normalized spread direction
-
getNormalizedSpreadDirection
public org.bukkit.util.Vector getNormalizedSpreadDirection(EntityWrapper entityWrapper, org.bukkit.Location shootLocation, boolean mainHand, boolean updateSpreadChange, double spread) Returns normalized spread direction- Parameters:
entityWrapper- the entity involvedshootLocation- the shoot locationmainHand- whether or not main hand was usedupdateSpreadChange- whether or not to allow updating current spread changespread- the spread- Returns:
- the normalized spread direction
-
getKeyword
- Specified by:
getKeywordin interfaceme.deecaad.core.file.Serializer<Spread>
-
serialize
@NotNull public @NotNull Spread serialize(@NotNull @NotNull me.deecaad.core.file.SerializeData data) throws me.deecaad.core.file.SerializerException - Specified by:
serializein interfaceme.deecaad.core.file.Serializer<Spread>- Throws:
me.deecaad.core.file.SerializerException
-