Class ExpandAbstractArrow
java.lang.Object
com.blamejared.crafttweaker.natives.entity.type.projectile.arrow.ExpandAbstractArrow
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doublegetBaseDamage(net.minecraft.world.entity.projectile.AbstractArrow internal) Gets the base damage that this arrow does.static intgetKnockback(net.minecraft.world.entity.projectile.AbstractArrow internal) Gets the knockback of this arrow.static bytegetPierceLevel(net.minecraft.world.entity.projectile.AbstractArrow internal) Gets the pierce level of this arrow.static booleanisCritArrow(net.minecraft.world.entity.projectile.AbstractArrow internal) Checks whether this arrow is a crit arrow.static booleanisNoPhysics(net.minecraft.world.entity.projectile.AbstractArrow internal) Checks if this arrow has physics or not.static voidsetBaseDamage(net.minecraft.world.entity.projectile.AbstractArrow internal, double damage) Sets the base damage that this arrow does.static voidsetCritArrow(net.minecraft.world.entity.projectile.AbstractArrow internal, boolean crit) Sets this the crit value of this arrow.static voidsetEnchantmentEffectsFromEntity(net.minecraft.world.entity.projectile.AbstractArrow internal, net.minecraft.world.entity.LivingEntity entity, float distanceFactor) Sets the values of this arrow based on the enchantments the given entity has.static voidsetKnockback(net.minecraft.world.entity.projectile.AbstractArrow internal, int knockback) Sets the knockback of this arrow.static voidsetNoPhysics(net.minecraft.world.entity.projectile.AbstractArrow internal, boolean noPhysics) Sets if this arrow has physics or not.static voidsetPierceLevel(net.minecraft.world.entity.projectile.AbstractArrow internal, byte pieceLevel) Sets the pierce level of this arrow.static voidsetShotFromCrossbow(net.minecraft.world.entity.projectile.AbstractArrow internal, boolean shotFromCrossbow) Sets if this arrow was shot from a crossbow or not.static voidsetSoundEvent(net.minecraft.world.entity.projectile.AbstractArrow internal, net.minecraft.sounds.SoundEvent event) Sets the sound event that this arrow plays when it hits an entity or block.static booleanshotFromCrossbow(net.minecraft.world.entity.projectile.AbstractArrow internal) Checks if this arrow was shot from a crossbow.
-
Constructor Details
-
ExpandAbstractArrow
public ExpandAbstractArrow()
-
-
Method Details
-
setSoundEvent
public static void setSoundEvent(net.minecraft.world.entity.projectile.AbstractArrow internal, net.minecraft.sounds.SoundEvent event) Sets the sound event that this arrow plays when it hits an entity or block.- Parameters:
event- The sound event to play when- DocParam:
- soundevent <soundevent:minecraft:ambient.cave>
-
setBaseDamage
public static void setBaseDamage(net.minecraft.world.entity.projectile.AbstractArrow internal, double damage) Sets the base damage that this arrow does.- Parameters:
damage- The base damage.- DocParam:
- damage 0.5
-
getBaseDamage
public static double getBaseDamage(net.minecraft.world.entity.projectile.AbstractArrow internal) Gets the base damage that this arrow does.- Returns:
- The base damage of this arrow.
-
setKnockback
public static void setKnockback(net.minecraft.world.entity.projectile.AbstractArrow internal, int knockback) Sets the knockback of this arrow.- Parameters:
knockback- The knockback value.- DocParam:
- knockback 5
-
getKnockback
public static int getKnockback(net.minecraft.world.entity.projectile.AbstractArrow internal) Gets the knockback of this arrow.- Returns:
- The knockback of this arrow.
-
setCritArrow
public static void setCritArrow(net.minecraft.world.entity.projectile.AbstractArrow internal, boolean crit) Sets this the crit value of this arrow.- Parameters:
crit- The crit value to set.- DocParam:
- crit true
-
isCritArrow
public static boolean isCritArrow(net.minecraft.world.entity.projectile.AbstractArrow internal) Checks whether this arrow is a crit arrow.- Returns:
- true if this is a crit arrow, false otherwise.
-
setPierceLevel
public static void setPierceLevel(net.minecraft.world.entity.projectile.AbstractArrow internal, byte pieceLevel) Sets the pierce level of this arrow.- Parameters:
pieceLevel- The pierce level of this arrow.- DocParam:
- pierceLevel 5
-
getPierceLevel
public static byte getPierceLevel(net.minecraft.world.entity.projectile.AbstractArrow internal) Gets the pierce level of this arrow.- Returns:
- the pierce level of this arrow.
-
setShotFromCrossbow
public static void setShotFromCrossbow(net.minecraft.world.entity.projectile.AbstractArrow internal, boolean shotFromCrossbow) Sets if this arrow was shot from a crossbow or not.- Parameters:
shotFromCrossbow- If this arrow was shot from a crossbow or not.- DocParam:
- shotFromCrossbow true
-
shotFromCrossbow
public static boolean shotFromCrossbow(net.minecraft.world.entity.projectile.AbstractArrow internal) Checks if this arrow was shot from a crossbow.- Returns:
- true if it was shot from a crossbow, false otherwise.
-
setEnchantmentEffectsFromEntity
public static void setEnchantmentEffectsFromEntity(net.minecraft.world.entity.projectile.AbstractArrow internal, net.minecraft.world.entity.LivingEntity entity, float distanceFactor) Sets the values of this arrow based on the enchantments the given entity has. This handles setting the knockback if the bow has a knockback enchantment.- Parameters:
entity- The entity that fired the arrowdistanceFactor- How charged is the bow.- DocParam:
- entity entity, distanceFactor 1
-
setNoPhysics
public static void setNoPhysics(net.minecraft.world.entity.projectile.AbstractArrow internal, boolean noPhysics) Sets if this arrow has physics or not.- Parameters:
noPhysics- If this arrow has physics or not.- DocParam:
- noPhysics true
-
isNoPhysics
public static boolean isNoPhysics(net.minecraft.world.entity.projectile.AbstractArrow internal) Checks if this arrow has physics or not.- Returns:
- true if this arrow doesn't have physics, false otherwise.
-