跳到正文

[Cobblemon] TrainerAttributesLib

Integrates Minecraft's attributes with Cobblemon.

收藏

截图

介绍

中文介绍正在准备中,下面暂时显示原文。

Integrates Minecraft’s attribute system with Cobblemon.

Things such as catch chance, shiny chance, and experience earned per battle can be modified.

Mostly intended for use with Accessories or Curios, though the attributes do apply when on pieces of armor. (but not tools)

If I ever truly decide to stop being lazy I’ll port it over to forge as well.

Free for use whereva.

Features

Current Attributes Supported:

  • Pokemon Experience Boost (+ Various types)
  • Catch Chance Boost (+ Various Types)
  • Shiny Chance Boost (+ Various Types)
  • Hidden Ability Chance Boost (+ Various Types)
  • Crit Catch Chance Boost (+ Various types)
  • Spawn Chance Boost (+ Various Types)
  • Bonus IVs (+ Various Types / For Specific Stats)

Example

class MudkipCharm() : AccessoryItem(
    Item.Settings().component(
        DataComponentTypes.ATTRIBUTE_MODIFIERS as ComponentType<AttributeModifiersComponent>,
        AttributeModifiersComponent.builder()
            .add(
                Registries.ATTRIBUTE.getEntry(TrainerAttributes.TYPED_SPAWN_CHANCE_ATTRIBUTE.getAttributeOfType(
                    ElementalTypes.FIRE
                )),
                EntityAttributeModifier(
                    TrainerAttributes.TYPED_SPAWN_CHANCE_ATTRIBUTE.getIdentifierOfTypedAttribute(ElementalTypes.FIRE),
                    5.50,
                    EntityAttributeModifier.Operation.ADD_MULTIPLIED_BASE
                ),
                AttributeModifierSlot.ANY
            )
            .add(
                Registries.ATTRIBUTE.getEntry(TrainerAttributes.TYPED_BONUS_IVS_ATTRIBUTE.getAttributeOfType(
                    ElementalTypes.WATER
                )),
                EntityAttributeModifier(
                    TrainerAttributes.TYPED_BONUS_IVS_ATTRIBUTE.getIdentifierOfTypedAttribute(ElementalTypes.WATER),
                    5.0,
                    EntityAttributeModifier.Operation.ADD_VALUE
                ),
                AttributeModifierSlot.ANY
            )
            .add(
                Registries.ATTRIBUTE.getEntry(TrainerAttributes.STAT_BONUS_IVS_ATTRIBUTE.getAttributeOfStat(Stats.HP)),
                EntityAttributeModifier(
                    TrainerAttributes.STAT_BONUS_IVS_ATTRIBUTE.getIdentifierOfStatAttribute(Stats.HP),
                    5.0,
                    EntityAttributeModifier.Operation.ADD_VALUE
                ),
                AttributeModifierSlot.ANY
            )
            .add(
                Registries.ATTRIBUTE.getEntry(TrainerAttributes.BONUS_IVS_ATTRIBUTE),
                EntityAttributeModifier(
                    TrainerAttributesLib.getIdentifier("bonus_ivs"),
                    5.0,
                    EntityAttributeModifier.Operation.ADD_VALUE
                ),
                AttributeModifierSlot.ANY
            )
            .add(
                Registries.ATTRIBUTE.getEntry(TrainerAttributes.CATCH_CHANCE_BOOST_ATTRIBUTE),
                EntityAttributeModifier(
                    TrainerAttributesLib.getIdentifier("catch_chance_boost"),
                    0.05,
                    EntityAttributeModifier.Operation.ADD_MULTIPLIED_BASE
                ),
                AttributeModifierSlot.ANY
            )
            .add(
                Registries.ATTRIBUTE.getEntry(
                    TrainerAttributes.TYPED_CATCH_CHANCE_BOOST_ATTRIBUTE.getAttributeOfType(ElementalTypes.WATER)
                ),
                EntityAttributeModifier(
                    TrainerAttributes.TYPED_CATCH_CHANCE_BOOST_ATTRIBUTE.getIdentifierOfTypedAttribute(ElementalTypes.WATER),
                    0.10,
                    EntityAttributeModifier.Operation.ADD_MULTIPLIED_BASE
                ),
                AttributeModifierSlot.ANY
            )
            .build()
    )
) {
}

常见问题

[Cobblemon] TrainerAttributesLib 支持哪些 Minecraft 版本?

[Cobblemon] TrainerAttributesLib 支持 Minecraft Java 版 1.21.1,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。

[Cobblemon] TrainerAttributesLib 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端和服务端都要装。

评论

登录后评论和评分

the_number_two 的其他作品

查看全部 →