java.lang.Object
com.blamejared.crafttweaker.natives.item.type.projectileweapon.ExpandCrossBowItem

@ZenRegister public class ExpandCrossBowItem extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    containsChargedProjectile(net.minecraft.world.item.ItemStack crossbowStack, net.minecraft.world.item.Item ammoItem)
    Checks if the given stack has any charged items of the given type
    static int
    getChargeDuration(net.minecraft.world.item.ItemStack crossbowStack)
    Gets the charged duration of the given stack.
    static boolean
    isCharged(net.minecraft.world.item.ItemStack crossbowStack)
    Checks if the stack is charged
    static void
    performShooting(net.minecraft.world.level.Level level, net.minecraft.world.entity.LivingEntity shooter, net.minecraft.world.InteractionHand hand, net.minecraft.world.item.ItemStack crossbowStack, float velocity, float accuracy)
     
    static void
    setCharged(net.minecraft.world.item.ItemStack crossbowStack, boolean charged)
    Sets the charged value on the given stack.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExpandCrossBowItem

      public ExpandCrossBowItem()
  • Method Details

    • isCharged

      public static boolean isCharged(net.minecraft.world.item.ItemStack crossbowStack)
      Checks if the stack is charged
      Parameters:
      crossbowStack - the stack to check
      Returns:
      true if charged, false otherwise.
      DocParam:
      crossbowStack <item:minecraft:crossbow>
    • setCharged

      public static void setCharged(net.minecraft.world.item.ItemStack crossbowStack, boolean charged)
      Sets the charged value on the given stack.
      Parameters:
      crossbowStack - the stack to set the value on
      charged - the charged value
      DocParam:
      crossbowStack <item:minecraft:crossbow>, charged true
    • containsChargedProjectile

      public static boolean containsChargedProjectile(net.minecraft.world.item.ItemStack crossbowStack, net.minecraft.world.item.Item ammoItem)
      Checks if the given stack has any charged items of the given type
      Parameters:
      crossbowStack - The stack to check
      ammoItem - The ammo to check for
      Returns:
      true if it contains the charged item, false otherwise.
      DocParam:
      crossbowStack <item:minecraft:crossbow>, ammoItem <item:minecraft:arrow>
    • performShooting

      public static void performShooting(net.minecraft.world.level.Level level, net.minecraft.world.entity.LivingEntity shooter, net.minecraft.world.InteractionHand hand, net.minecraft.world.item.ItemStack crossbowStack, float velocity, float accuracy)
    • getChargeDuration

      public static int getChargeDuration(net.minecraft.world.item.ItemStack crossbowStack)
      Gets the charged duration of the given stack.
      Parameters:
      crossbowStack - The stack to check
      Returns:
      the charged duration of the given stack.
      DocParam:
      crossbowStack <item:minecraft:crossbow>