Class ExpandCrossBowItem
java.lang.Object
com.blamejared.crafttweaker.natives.item.type.projectileweapon.ExpandCrossBowItem
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancontainsChargedProjectile(net.minecraft.world.item.ItemStack crossbowStack, net.minecraft.world.item.Item ammoItem) Checks if the given stack has any charged items of the given typestatic intgetChargeDuration(net.minecraft.world.item.ItemStack crossbowStack) Gets the charged duration of the given stack.static booleanisCharged(net.minecraft.world.item.ItemStack crossbowStack) Checks if the stack is chargedstatic voidperformShooting(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 voidsetCharged(net.minecraft.world.item.ItemStack crossbowStack, boolean charged) Sets the charged value on the given stack.
-
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 oncharged- 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 checkammoItem- 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>
-