类 CrossbowItem
- java.lang.Object
-
- net.minecraft.item.Item
-
- net.minecraft.item.RangedWeaponItem
-
- net.minecraft.item.CrossbowItem
-
- 所有已实现的接口:
ItemConvertible,Vanishable
public class CrossbowItem extends RangedWeaponItem implements Vanishable
- Mappings:
Namespace Name official boiintermediary net/minecraft/class_1764named net/minecraft/item/CrossbowItem
-
-
嵌套类概要
-
从类继承的嵌套类/接口 net.minecraft.item.Item
Item.Settings
-
-
字段概要
字段 修饰符和类型 字段 说明 private booleanchargedprivate static StringCHARGED_KEYprivate static StringCHARGED_PROJECTILES_KEYprivate static intfield_30866private static floatfield_30867private static floatfield_30868private static floatfield_30869private static floatfield_30870private booleanloadedstatic intRANGE-
从类继承的字段 net.minecraft.item.RangedWeaponItem
BOW_PROJECTILES, CROSSBOW_HELD_PROJECTILES
-
从类继承的字段 net.minecraft.item.Item
ATTACK_DAMAGE_MODIFIER_ID, ATTACK_SPEED_MODIFIER_ID, BLOCK_ITEMS, DEFAULT_MAX_COUNT, field_30888, field_30889, group
-
-
构造器概要
构造器 构造器 说明 CrossbowItem(Item.Settings settings)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 voidappendTooltip(ItemStack stack, @Nullable World world, List<Text> tooltip, TooltipContext context)private static voidclearProjectiles(ItemStack crossbow)private static PersistentProjectileEntitycreateArrow(World world, LivingEntity entity, ItemStack crossbow, ItemStack arrow)Predicate<ItemStack>getHeldProjectiles()intgetMaxUseTime(ItemStack stack)Predicate<ItemStack>getProjectiles()private static List<ItemStack>getProjectiles(ItemStack crossbow)private static floatgetPullProgress(int useTicks, ItemStack stack)static intgetPullTime(ItemStack stack)private SoundEventgetQuickChargeSound(int stage)intgetRange()private static floatgetSoundPitch(boolean flag, Random random)private static float[]getSoundPitches(Random random)private static floatgetSpeed(ItemStack stack)UseActiongetUseAction(ItemStack stack)static booleanhasProjectile(ItemStack crossbow, Item projectile)static booleanisCharged(ItemStack stack)booleanisUsedOnRelease(ItemStack stack)private static booleanloadProjectile(LivingEntity shooter, ItemStack crossbow, ItemStack projectile, boolean simulated, boolean creative)private static booleanloadProjectiles(LivingEntity shooter, ItemStack projectile)voidonStoppedUsing(ItemStack stack, World world, LivingEntity user, int remainingUseTicks)private static voidpostShoot(World world, LivingEntity entity, ItemStack stack)private static voidputProjectile(ItemStack crossbow, ItemStack projectile)static voidsetCharged(ItemStack stack, boolean charged)private static voidshoot(World world, LivingEntity shooter, Hand hand, ItemStack crossbow, ItemStack projectile, float soundPitch, boolean creative, float speed, float divergence, float simulated)static voidshootAll(World world, LivingEntity entity, Hand hand, ItemStack stack, float speed, float divergence)voidusageTick(World world, LivingEntity user, ItemStack stack, int remainingUseTicks)TypedActionResult<ItemStack>use(World world, PlayerEntity user, Hand hand)Called when an item is used by a player.-
从类继承的方法 net.minecraft.item.RangedWeaponItem
getEnchantability, getHeldProjectile
-
从类继承的方法 net.minecraft.item.Item
appendStacks, asItem, byRawId, canBeNested, canMine, canRepair, damage, finishUsing, fromBlock, getAttributeModifiers, getDefaultStack, getDrinkSound, getEatSound, getEquipSound, getFoodComponent, getGroup, getItemBarColor, getItemBarStep, getMaxCount, getMaxDamage, getMiningSpeedMultiplier, getName, getName, getOrCreateTranslationKey, getRarity, getRawId, getRecipeRemainder, getTooltipData, getTranslationKey, getTranslationKey, hasGlint, hasRecipeRemainder, inventoryTick, isDamageable, isEnchantable, isFireproof, isFood, isIn, isItemBarVisible, isNetworkSynced, isSuitableFor, onClicked, onCraft, onItemEntityDestroyed, onStackClicked, postHit, postMine, postProcessNbt, raycast, shouldSyncTagToClient, toString, useOnBlock, useOnEntity
-
-
-
-
字段详细资料
-
CHARGED_KEY
private static final String CHARGED_KEY
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official bLboi;b:Ljava/lang/String;intermediary field_30864Lnet/minecraft/class_1764;field_30864:Ljava/lang/String;named CHARGED_KEYLnet/minecraft/item/CrossbowItem;CHARGED_KEY:Ljava/lang/String;
-
CHARGED_PROJECTILES_KEY
private static final String CHARGED_PROJECTILES_KEY
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official eLboi;e:Ljava/lang/String;intermediary field_30865Lnet/minecraft/class_1764;field_30865:Ljava/lang/String;named CHARGED_PROJECTILES_KEYLnet/minecraft/item/CrossbowItem;CHARGED_PROJECTILES_KEY:Ljava/lang/String;
-
field_30866
private static final int field_30866
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official fLboi;f:Iintermediary field_30866Lnet/minecraft/class_1764;field_30866:Inamed field_30866Lnet/minecraft/item/CrossbowItem;field_30866:I
-
RANGE
public static final int RANGE
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official aLboi;a:Iintermediary field_30863Lnet/minecraft/class_1764;field_30863:Inamed RANGELnet/minecraft/item/CrossbowItem;RANGE:I
-
field_30867
private static final float field_30867
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official iLboi;i:Fintermediary field_30867Lnet/minecraft/class_1764;field_30867:Fnamed field_30867Lnet/minecraft/item/CrossbowItem;field_30867:F
-
field_30868
private static final float field_30868
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official jLboi;j:Fintermediary field_30868Lnet/minecraft/class_1764;field_30868:Fnamed field_30868Lnet/minecraft/item/CrossbowItem;field_30868:F
-
field_30869
private static final float field_30869
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official rLboi;r:Fintermediary field_30869Lnet/minecraft/class_1764;field_30869:Fnamed field_30869Lnet/minecraft/item/CrossbowItem;field_30869:F
-
field_30870
private static final float field_30870
- 另请参阅:
- 常量字段值
- Mappings:
Namespace Name Mixin selector official sLboi;s:Fintermediary field_30870Lnet/minecraft/class_1764;field_30870:Fnamed field_30870Lnet/minecraft/item/CrossbowItem;field_30870:F
-
charged
private boolean charged
- Mappings:
Namespace Name Mixin selector official gLboi;g:Zintermediary field_7937Lnet/minecraft/class_1764;field_7937:Znamed chargedLnet/minecraft/item/CrossbowItem;charged:Z
-
loaded
private boolean loaded
- Mappings:
Namespace Name Mixin selector official hLboi;h:Zintermediary field_7936Lnet/minecraft/class_1764;field_7936:Znamed loadedLnet/minecraft/item/CrossbowItem;loaded:Z
-
-
构造器详细资料
-
CrossbowItem
public CrossbowItem(Item.Settings settings)
- Mappings:
Namespace Name Mixin selector official <init>Lbpn;<init>(Lbpn$a;)Vintermediary <init>Lnet/minecraft/class_1792;<init>(Lnet/minecraft/class_1792$class_1793;)Vnamed <init>Lnet/minecraft/item/Item;<init>(Lnet/minecraft/item/Item$Settings;)V
-
-
方法详细资料
-
getHeldProjectiles
public Predicate<ItemStack> getHeldProjectiles()
- 覆盖:
getHeldProjectiles在类中RangedWeaponItem- Mappings:
Namespace Name Mixin selector official eLbqf;e()Ljava/util/function/Predicate;intermediary method_20310Lnet/minecraft/class_1811;method_20310()Ljava/util/function/Predicate;named getHeldProjectilesLnet/minecraft/item/RangedWeaponItem;getHeldProjectiles()Ljava/util/function/Predicate;
-
getProjectiles
public Predicate<ItemStack> getProjectiles()
- 指定者:
getProjectiles在类中RangedWeaponItem- Mappings:
Namespace Name Mixin selector official bLbqf;b()Ljava/util/function/Predicate;intermediary method_19268Lnet/minecraft/class_1811;method_19268()Ljava/util/function/Predicate;named getProjectilesLnet/minecraft/item/RangedWeaponItem;getProjectiles()Ljava/util/function/Predicate;
-
use
public TypedActionResult<ItemStack> use(World world, PlayerEntity user, Hand hand)
Called when an item is used by a player. The use action, by default, is bound to the right mouse button.This method is called on both the logical client and logical server, so take caution when overriding this method. The logical side can be checked using
world.isClient().- 覆盖:
use在类中Item- 参数:
world- the world the item was used inuser- the player who used the itemhand- the hand used- 返回:
- a typed action result that specifies whether using the item was successful. The action result contains the new item stack that the player's hand will be set to.
- Mappings:
Namespace Name Mixin selector official aLbpn;a(Lbvr;Lbjf;Larf;)Larh;intermediary method_7836Lnet/minecraft/class_1792;method_7836(Lnet/minecraft/class_1937;Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;)Lnet/minecraft/class_1271;named useLnet/minecraft/item/Item;use(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/util/Hand;)Lnet/minecraft/util/TypedActionResult;
-
getSpeed
private static float getSpeed(ItemStack stack)
- Mappings:
Namespace Name Mixin selector official oLboi;o(Lbpr;)Fintermediary method_20309Lnet/minecraft/class_1764;method_20309(Lnet/minecraft/class_1799;)Fnamed getSpeedLnet/minecraft/item/CrossbowItem;getSpeed(Lnet/minecraft/item/ItemStack;)F
-
onStoppedUsing
public void onStoppedUsing(ItemStack stack, World world, LivingEntity user, int remainingUseTicks)
- 覆盖:
onStoppedUsing在类中Item- Mappings:
Namespace Name Mixin selector official aLbpn;a(Lbpr;Lbvr;Lasy;I)Vintermediary method_7840Lnet/minecraft/class_1792;method_7840(Lnet/minecraft/class_1799;Lnet/minecraft/class_1937;Lnet/minecraft/class_1309;I)Vnamed onStoppedUsingLnet/minecraft/item/Item;onStoppedUsing(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;I)V
-
loadProjectiles
private static boolean loadProjectiles(LivingEntity shooter, ItemStack projectile)
- Mappings:
Namespace Name Mixin selector official aLboi;a(Lasy;Lbpr;)Zintermediary method_7767Lnet/minecraft/class_1764;method_7767(Lnet/minecraft/class_1309;Lnet/minecraft/class_1799;)Znamed loadProjectilesLnet/minecraft/item/CrossbowItem;loadProjectiles(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;)Z
-
loadProjectile
private static boolean loadProjectile(LivingEntity shooter, ItemStack crossbow, ItemStack projectile, boolean simulated, boolean creative)
- Mappings:
Namespace Name Mixin selector official aLboi;a(Lasy;Lbpr;Lbpr;ZZ)Zintermediary method_7765Lnet/minecraft/class_1764;method_7765(Lnet/minecraft/class_1309;Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;ZZ)Znamed loadProjectileLnet/minecraft/item/CrossbowItem;loadProjectile(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;ZZ)Z
-
isCharged
public static boolean isCharged(ItemStack stack)
- Mappings:
Namespace Name Mixin selector official dLboi;d(Lbpr;)Zintermediary method_7781Lnet/minecraft/class_1764;method_7781(Lnet/minecraft/class_1799;)Znamed isChargedLnet/minecraft/item/CrossbowItem;isCharged(Lnet/minecraft/item/ItemStack;)Z
-
setCharged
public static void setCharged(ItemStack stack, boolean charged)
- Mappings:
Namespace Name Mixin selector official aLboi;a(Lbpr;Z)Vintermediary method_7782Lnet/minecraft/class_1764;method_7782(Lnet/minecraft/class_1799;Z)Vnamed setChargedLnet/minecraft/item/CrossbowItem;setCharged(Lnet/minecraft/item/ItemStack;Z)V
-
putProjectile
private static void putProjectile(ItemStack crossbow, ItemStack projectile)
- Mappings:
Namespace Name Mixin selector official bLboi;b(Lbpr;Lbpr;)Vintermediary method_7778Lnet/minecraft/class_1764;method_7778(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)Vnamed putProjectileLnet/minecraft/item/CrossbowItem;putProjectile(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)V
-
getProjectiles
private static List<ItemStack> getProjectiles(ItemStack crossbow)
- Mappings:
Namespace Name Mixin selector official pLboi;p(Lbpr;)Ljava/util/List;intermediary method_7785Lnet/minecraft/class_1764;method_7785(Lnet/minecraft/class_1799;)Ljava/util/List;named getProjectilesLnet/minecraft/item/CrossbowItem;getProjectiles(Lnet/minecraft/item/ItemStack;)Ljava/util/List;
-
clearProjectiles
private static void clearProjectiles(ItemStack crossbow)
- Mappings:
Namespace Name Mixin selector official qLboi;q(Lbpr;)Vintermediary method_7766Lnet/minecraft/class_1764;method_7766(Lnet/minecraft/class_1799;)Vnamed clearProjectilesLnet/minecraft/item/CrossbowItem;clearProjectiles(Lnet/minecraft/item/ItemStack;)V
-
hasProjectile
public static boolean hasProjectile(ItemStack crossbow, Item projectile)
- Mappings:
Namespace Name Mixin selector official aLboi;a(Lbpr;Lbpn;)Zintermediary method_7772Lnet/minecraft/class_1764;method_7772(Lnet/minecraft/class_1799;Lnet/minecraft/class_1792;)Znamed hasProjectileLnet/minecraft/item/CrossbowItem;hasProjectile(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/Item;)Z
-
shoot
private static void shoot(World world, LivingEntity shooter, Hand hand, ItemStack crossbow, ItemStack projectile, float soundPitch, boolean creative, float speed, float divergence, float simulated)
- Mappings:
Namespace Name Mixin selector official aLboi;a(Lbvr;Lasy;Larf;Lbpr;Lbpr;FZFFF)Vintermediary method_7763Lnet/minecraft/class_1764;method_7763(Lnet/minecraft/class_1937;Lnet/minecraft/class_1309;Lnet/minecraft/class_1268;Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;FZFFF)Vnamed shootLnet/minecraft/item/CrossbowItem;shoot(Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/util/Hand;Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;FZFFF)V
-
createArrow
private static PersistentProjectileEntity createArrow(World world, LivingEntity entity, ItemStack crossbow, ItemStack arrow)
- Mappings:
Namespace Name Mixin selector official aLboi;a(Lbvr;Lasy;Lbpr;Lbpr;)Lbjj;intermediary method_18814Lnet/minecraft/class_1764;method_18814(Lnet/minecraft/class_1937;Lnet/minecraft/class_1309;Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;)Lnet/minecraft/class_1665;named createArrowLnet/minecraft/item/CrossbowItem;createArrow(Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;)Lnet/minecraft/entity/projectile/PersistentProjectileEntity;
-
shootAll
public static void shootAll(World world, LivingEntity entity, Hand hand, ItemStack stack, float speed, float divergence)
- Mappings:
Namespace Name Mixin selector official aLboi;a(Lbvr;Lasy;Larf;Lbpr;FF)Vintermediary method_7777Lnet/minecraft/class_1764;method_7777(Lnet/minecraft/class_1937;Lnet/minecraft/class_1309;Lnet/minecraft/class_1268;Lnet/minecraft/class_1799;FF)Vnamed shootAllLnet/minecraft/item/CrossbowItem;shootAll(Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/util/Hand;Lnet/minecraft/item/ItemStack;FF)V
-
getSoundPitches
private static float[] getSoundPitches(Random random)
- Mappings:
Namespace Name Mixin selector official aLboi;a(Ljava/util/Random;)[Fintermediary method_7780Lnet/minecraft/class_1764;method_7780(Ljava/util/Random;)[Fnamed getSoundPitchesLnet/minecraft/item/CrossbowItem;getSoundPitches(Ljava/util/Random;)[F
-
getSoundPitch
private static float getSoundPitch(boolean flag, Random random)- Mappings:
Namespace Name Mixin selector official aLboi;a(ZLjava/util/Random;)Fintermediary method_7784Lnet/minecraft/class_1764;method_7784(ZLjava/util/Random;)Fnamed getSoundPitchLnet/minecraft/item/CrossbowItem;getSoundPitch(ZLjava/util/Random;)F
-
postShoot
private static void postShoot(World world, LivingEntity entity, ItemStack stack)
- Mappings:
Namespace Name Mixin selector official aLboi;a(Lbvr;Lasy;Lbpr;)Vintermediary method_7769Lnet/minecraft/class_1764;method_7769(Lnet/minecraft/class_1937;Lnet/minecraft/class_1309;Lnet/minecraft/class_1799;)Vnamed postShootLnet/minecraft/item/CrossbowItem;postShoot(Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;)V
-
usageTick
public void usageTick(World world, LivingEntity user, ItemStack stack, int remainingUseTicks)
- 覆盖:
usageTick在类中Item- Mappings:
Namespace Name Mixin selector official aLbpn;a(Lbvr;Lasy;Lbpr;I)Vintermediary method_7852Lnet/minecraft/class_1792;method_7852(Lnet/minecraft/class_1937;Lnet/minecraft/class_1309;Lnet/minecraft/class_1799;I)Vnamed usageTickLnet/minecraft/item/Item;usageTick(Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;I)V
-
getMaxUseTime
public int getMaxUseTime(ItemStack stack)
- 覆盖:
getMaxUseTime在类中Item- Mappings:
Namespace Name Mixin selector official e_Lbpn;e_(Lbpr;)Iintermediary method_7881Lnet/minecraft/class_1792;method_7881(Lnet/minecraft/class_1799;)Inamed getMaxUseTimeLnet/minecraft/item/Item;getMaxUseTime(Lnet/minecraft/item/ItemStack;)I
-
getPullTime
public static int getPullTime(ItemStack stack)
- Mappings:
Namespace Name Mixin selector official kLboi;k(Lbpr;)Iintermediary method_7775Lnet/minecraft/class_1764;method_7775(Lnet/minecraft/class_1799;)Inamed getPullTimeLnet/minecraft/item/CrossbowItem;getPullTime(Lnet/minecraft/item/ItemStack;)I
-
getUseAction
public UseAction getUseAction(ItemStack stack)
- 覆盖:
getUseAction在类中Item- Mappings:
Namespace Name Mixin selector official d_Lbpn;d_(Lbpr;)Lbrg;intermediary method_7853Lnet/minecraft/class_1792;method_7853(Lnet/minecraft/class_1799;)Lnet/minecraft/class_1839;named getUseActionLnet/minecraft/item/Item;getUseAction(Lnet/minecraft/item/ItemStack;)Lnet/minecraft/util/UseAction;
-
getQuickChargeSound
private SoundEvent getQuickChargeSound(int stage)
- Mappings:
Namespace Name Mixin selector official aLboi;a(I)Laev;intermediary method_7773Lnet/minecraft/class_1764;method_7773(I)Lnet/minecraft/class_3414;named getQuickChargeSoundLnet/minecraft/item/CrossbowItem;getQuickChargeSound(I)Lnet/minecraft/sound/SoundEvent;
-
getPullProgress
private static float getPullProgress(int useTicks, ItemStack stack)- Mappings:
Namespace Name Mixin selector official aLboi;a(ILbpr;)Fintermediary method_7770Lnet/minecraft/class_1764;method_7770(ILnet/minecraft/class_1799;)Fnamed getPullProgressLnet/minecraft/item/CrossbowItem;getPullProgress(ILnet/minecraft/item/ItemStack;)F
-
appendTooltip
public void appendTooltip(ItemStack stack, @Nullable @Nullable World world, List<Text> tooltip, TooltipContext context)
- 覆盖:
appendTooltip在类中Item- Mappings:
Namespace Name Mixin selector official aLbpn;a(Lbpr;Lbvr;Ljava/util/List;Lbre;)Vintermediary method_7851Lnet/minecraft/class_1792;method_7851(Lnet/minecraft/class_1799;Lnet/minecraft/class_1937;Ljava/util/List;Lnet/minecraft/class_1836;)Vnamed appendTooltipLnet/minecraft/item/Item;appendTooltip(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Ljava/util/List;Lnet/minecraft/client/item/TooltipContext;)V
-
isUsedOnRelease
public boolean isUsedOnRelease(ItemStack stack)
- 覆盖:
isUsedOnRelease在类中Item- Mappings:
Namespace Name Mixin selector official lLbpn;l(Lbpr;)Zintermediary method_7838Lnet/minecraft/class_1792;method_7838(Lnet/minecraft/class_1799;)Znamed isUsedOnReleaseLnet/minecraft/item/Item;isUsedOnRelease(Lnet/minecraft/item/ItemStack;)Z
-
getRange
public int getRange()
- 指定者:
getRange在类中RangedWeaponItem- Mappings:
Namespace Name Mixin selector official dLbqf;d()Iintermediary method_24792Lnet/minecraft/class_1811;method_24792()Inamed getRangeLnet/minecraft/item/RangedWeaponItem;getRange()I
-
-