类 Gunsmith
java.lang.Object
mod.chloeprime.gunsmithlib.api.util.Gunsmith
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static net.minecraft.world.item.ItemStackcreateAmmoItemFromId(net.minecraft.resources.ResourceLocation id) Create an ammo item for fetching gun/ammo data.static net.minecraft.world.item.ItemStackcreateGunItemFromId(net.minecraft.resources.ResourceLocation id, net.minecraft.core.HolderLookup.Provider registryAccess) Create a gun item for fetching gun/ammo data.getAmmoInfo(net.minecraft.world.item.ItemStack ammo) static Optional<AttachmentInfo> getAttachmentInfo(net.minecraft.world.item.ItemStack attachment) getGunInfo(net.minecraft.world.item.ItemStack gun) static net.minecraft.world.phys.Vec3getProximityMuzzlePos(net.minecraft.world.entity.LivingEntity shooter) static net.minecraft.world.phys.Vec3getProximityMuzzlePos(net.minecraft.world.entity.LivingEntity shooter, float partial) static Optional<net.minecraft.core.RegistryAccess> static intmagicReload(net.minecraft.world.entity.LivingEntity shooter, net.minecraft.world.item.ItemStack gun, int reloadCount, MagicReloadOptions... options) Instantly reloads some ammo from inventory to inside the gun
-
构造器详细资料
-
Gunsmith
public Gunsmith()
-
-
方法详细资料
-
getGunInfo
- 从以下版本开始:
- 1.0.0
-
getAmmoInfo
- 从以下版本开始:
- 3.4.0
-
getAttachmentInfo
public static Optional<AttachmentInfo> getAttachmentInfo(net.minecraft.world.item.ItemStack attachment) - 从以下版本开始:
- 3.4.0
-
createGunItemFromId
public static net.minecraft.world.item.ItemStack createGunItemFromId(net.minecraft.resources.ResourceLocation id, net.minecraft.core.HolderLookup.Provider registryAccess) Create a gun item for fetching gun/ammo data.Warning: The created gun item lacks necessarily data to be actually shootable.
- 参数:
id- gun id- 返回:
- a gun item with the given gun id.
-
createAmmoItemFromId
public static net.minecraft.world.item.ItemStack createAmmoItemFromId(net.minecraft.resources.ResourceLocation id) Create an ammo item for fetching gun/ammo data.- 参数:
id- ammo id- 返回:
- an ammo item with the given gun id.
- 从以下版本开始:
- 5.2.2
-
magicReload
public static int magicReload(net.minecraft.world.entity.LivingEntity shooter, net.minecraft.world.item.ItemStack gun, int reloadCount, MagicReloadOptions... options) Instantly reloads some ammo from inventory to inside the gun- 参数:
shooter- shooter entitygun- the gun stackreloadCount- ammo count to find and load.options- options.- 返回:
- actually loaded ammo count.
-
getProximityMuzzlePos
public static net.minecraft.world.phys.Vec3 getProximityMuzzlePos(net.minecraft.world.entity.LivingEntity shooter) -
getProximityMuzzlePos
public static net.minecraft.world.phys.Vec3 getProximityMuzzlePos(net.minecraft.world.entity.LivingEntity shooter, float partial) -
getRegistryAccess
-