类 Gunsmith

java.lang.Object
mod.chloeprime.gunsmithlib.api.util.Gunsmith

public class Gunsmith extends Object
  • 构造器详细资料

    • Gunsmith

      public Gunsmith()
  • 方法详细资料

    • getGunInfo

      public static Optional<GunInfo> getGunInfo(net.minecraft.world.item.ItemStack gun)
      从以下版本开始:
      1.0.0
    • getAmmoInfo

      public static Optional<AmmoInfo> getAmmoInfo(net.minecraft.world.item.ItemStack ammo)
      从以下版本开始:
      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 entity
      gun - the gun stack
      reloadCount - 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

      public static Optional<net.minecraft.core.RegistryAccess> getRegistryAccess()