类 GunLootFunctions

java.lang.Object
mod.chloeprime.gunsmithlib.api.common.GunLootFunctions

public final class GunLootFunctions extends Object
从以下版本开始:
3.2.0
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    static final net.neoforged.neoforge.registries.DeferredRegister<net.minecraft.world.level.storage.loot.predicates.LootItemConditionType>
     
    static final net.neoforged.neoforge.registries.DeferredRegister<net.minecraft.world.level.storage.loot.functions.LootItemFunctionType<?>>
     
    static final Supplier<net.minecraft.world.level.storage.loot.functions.LootItemFunctionType<InitAmmoInfo>>
    设置子弹 id
    static final Supplier<net.minecraft.world.level.storage.loot.functions.LootItemFunctionType<InitAttachmentInfo>>
    设置配件 id
    static final Supplier<net.minecraft.world.level.storage.loot.functions.LootItemFunctionType<InitGunInfo>>
    设置枪械 id 并初始化枪械 NBT(内部弹药量,开火模式,热量等)
    static final Supplier<net.minecraft.world.level.storage.loot.predicates.LootItemConditionType>
    检测某个子弹 id 是否存在(是否有对应的 index)
    static final Supplier<net.minecraft.world.level.storage.loot.predicates.LootItemConditionType>
    检测某个配件 id 是否存在(是否有对应的 index)
    static final Supplier<net.minecraft.world.level.storage.loot.predicates.LootItemConditionType>
    检测某个枪械 id 是否存在(是否有对应的 index)
  • 方法概要

    修饰符和类型
    方法
    说明
    static void
     
    static net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction.Builder<?>
    initAmmoInfo(net.minecraft.resources.ResourceLocation ammoId)
    设置弹药 id
    static net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction.Builder<?>
    initAttachmentInfo(net.minecraft.resources.ResourceLocation attachmentId)
    设置配件 id
    static net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction.Builder<?>
    initGunInfo(net.minecraft.resources.ResourceLocation gunId)
    设置枪械 id,默认枪内没有子弹
    static net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction.Builder<?>
    initGunInfo(net.minecraft.resources.ResourceLocation gunId, net.minecraft.world.level.storage.loot.providers.number.NumberProvider ammo)
    设置枪械 id
    static net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder
    isAmmoInstalled(net.minecraft.resources.ResourceLocation ammoId)
    检测某个弹药 id 是否存在(是否有对应的 index)
    static net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder
    isAttachmentInstalledInDatabase(net.minecraft.resources.ResourceLocation attachmentId)
    检测某个配件 id 是否存在(是否有对应的 index)
    static net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder
    isGunInstalled(net.minecraft.resources.ResourceLocation gunId)
    检测某个枪械 id 是否存在(是否有对应的 index)

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 字段详细资料

    • DFR_FUNC

      @Internal public static final net.neoforged.neoforge.registries.DeferredRegister<net.minecraft.world.level.storage.loot.functions.LootItemFunctionType<?>> DFR_FUNC
    • DFR_COND

      @Internal public static final net.neoforged.neoforge.registries.DeferredRegister<net.minecraft.world.level.storage.loot.predicates.LootItemConditionType> DFR_COND
    • INIT_GUN_INFO

      public static final Supplier<net.minecraft.world.level.storage.loot.functions.LootItemFunctionType<InitGunInfo>> INIT_GUN_INFO
      设置枪械 id 并初始化枪械 NBT(内部弹药量,开火模式,热量等)
    • INIT_AMMO_INFO

      public static final Supplier<net.minecraft.world.level.storage.loot.functions.LootItemFunctionType<InitAmmoInfo>> INIT_AMMO_INFO
      设置子弹 id
    • INIT_ATTACHMENT_INFO

      public static final Supplier<net.minecraft.world.level.storage.loot.functions.LootItemFunctionType<InitAttachmentInfo>> INIT_ATTACHMENT_INFO
      设置配件 id
    • IS_GUN_INSTALLED

      public static final Supplier<net.minecraft.world.level.storage.loot.predicates.LootItemConditionType> IS_GUN_INSTALLED
      检测某个枪械 id 是否存在(是否有对应的 index)
    • IS_AMMO_INSTALLED

      public static final Supplier<net.minecraft.world.level.storage.loot.predicates.LootItemConditionType> IS_AMMO_INSTALLED
      检测某个子弹 id 是否存在(是否有对应的 index)
    • IS_ATTACHMENT_INSTALLED_IN_DATABASE

      public static final Supplier<net.minecraft.world.level.storage.loot.predicates.LootItemConditionType> IS_ATTACHMENT_INSTALLED_IN_DATABASE
      检测某个配件 id 是否存在(是否有对应的 index)
  • 方法详细资料

    • initGunInfo

      public static net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction.Builder<?> initGunInfo(net.minecraft.resources.ResourceLocation gunId)
      设置枪械 id,默认枪内没有子弹
      参数:
      gunId - 枪械 id
    • initGunInfo

      public static net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction.Builder<?> initGunInfo(net.minecraft.resources.ResourceLocation gunId, net.minecraft.world.level.storage.loot.providers.number.NumberProvider ammo)
      设置枪械 id
      参数:
      gunId - 枪械 id
      ammo - 枪内总子弹数量(包含弹匣和膛内)
    • initAmmoInfo

      public static net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction.Builder<?> initAmmoInfo(net.minecraft.resources.ResourceLocation ammoId)
      设置弹药 id
      参数:
      ammoId - 弹药 id
    • initAttachmentInfo

      public static net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction.Builder<?> initAttachmentInfo(net.minecraft.resources.ResourceLocation attachmentId)
      设置配件 id
      参数:
      attachmentId - 配件 id
    • isGunInstalled

      public static net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder isGunInstalled(net.minecraft.resources.ResourceLocation gunId)
      检测某个枪械 id 是否存在(是否有对应的 index)
      参数:
      gunId - 待检测的枪械 id
      返回:
      该枪械 id 对应的枪械是否存在
    • isAmmoInstalled

      public static net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder isAmmoInstalled(net.minecraft.resources.ResourceLocation ammoId)
      检测某个弹药 id 是否存在(是否有对应的 index)
      参数:
      ammoId - 待检测的弹药 id
      返回:
      该弹药 id 对应的弹药是否存在
    • isAttachmentInstalledInDatabase

      public static net.minecraft.world.level.storage.loot.predicates.LootItemCondition.Builder isAttachmentInstalledInDatabase(net.minecraft.resources.ResourceLocation attachmentId)
      检测某个配件 id 是否存在(是否有对应的 index)
      参数:
      attachmentId - 待检测的配件 id
      返回:
      该配件 id 对应的配件是否存在
    • init

      @Internal public static void init()