类 GunLootFunctions
java.lang.Object
mod.chloeprime.gunsmithlib.api.common.GunLootFunctions
- 从以下版本开始:
- 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>> 设置子弹 idstatic final Supplier<net.minecraft.world.level.storage.loot.functions.LootItemFunctionType<InitAttachmentInfo>> 设置配件 idstatic 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 voidinit()static net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction.Builder<?> initAmmoInfo(net.minecraft.resources.ResourceLocation ammoId) 设置弹药 idstatic net.minecraft.world.level.storage.loot.functions.LootItemConditionalFunction.Builder<?> initAttachmentInfo(net.minecraft.resources.ResourceLocation attachmentId) 设置配件 idstatic 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) 设置枪械 idstatic net.minecraft.world.level.storage.loot.predicates.LootItemCondition.BuilderisAmmoInstalled(net.minecraft.resources.ResourceLocation ammoId) 检测某个弹药 id 是否存在(是否有对应的 index)static net.minecraft.world.level.storage.loot.predicates.LootItemCondition.BuilderisAttachmentInstalledInDatabase(net.minecraft.resources.ResourceLocation attachmentId) 检测某个配件 id 是否存在(是否有对应的 index)static net.minecraft.world.level.storage.loot.predicates.LootItemCondition.BuilderisGunInstalled(net.minecraft.resources.ResourceLocation gunId) 检测某个枪械 id 是否存在(是否有对应的 index)
-
字段详细资料
-
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- 枪械 idammo- 枪内总子弹数量(包含弹匣和膛内)
-
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()
-