本篇教程由作者设定未经允许禁止转载。

    Scaling Health的有两个配置文件,分别是.minecraft/{versions}/{整合包名称}/config/scalinghealth-client.toml和.minecraft/{versions}/{整合包名称}/saves/{存档名称}/serverconfig/scalinghealth-server.toml

    首先来说client部分.

    [debug]调试工具,不用管

    [hearts]

        [hearts.health]

            [hearts.health.icons]

                #Heart style

                #血条样式

                #REPLACE_ALL: All rows replaced with Scaling Health style hearts

                #REPLACE_ALL:全部替换为Scaling Health的血条样式

                #REPLACE_AFTER_FIRST_ROW: Leave the first row vanilla style, Scaling Health style for additional rows

                #REPLACE_AFTER_FIRST_ROW:第一排血条仍让为原版样式,其他额外的血条为Scaling Health样式

                #VANILLA: Do not change heart rendering (use this if you want another mod to handle heart rendering)

                #VANILLA:不改变任何血条样式(如果你需要使用其他模组来修改血条样式,请使用该选项)

                #Allowed Values: REPLACE_ALL, REPLACE_AFTER_FIRST_ROW, VANILLA

                style = "REPLACE_ALL"

                #The color

 of each row of hearts. If the player has more rows than colors, it starts over from the beginning.

                #每一排血条的颜色,如果玩家血条数比下面颜色多,那么用完颜色后就将从第一个颜色重新开始。

                colors = ["#BF0000", "#E66000", "#E69900", "#E6D300", "#99E600", "#4CE600", "#00E699", "#00E6E6", "#0099E6", "#0000E6", "#9900E6", "#D580FF", "#8C8C8C", "#E6E6E6"]

                #The player's highest heart will get an outline around it.

                #玩家的最后一个心将会用一个轮廓围绕它。

                lastHeartOutline = true

                #The color of the last heart outline, if enabled (see lastHeartOutline)

                #最后一个心的轮廓的颜色。

                lastHeartOutlineColor = 16777215

                #If true, heart colors will 'loop around' to the first color after going through the

                #entire list. Set false to have every row after the last have the same color.

                #如果设置为true,心的颜色使用完整个列表后循环到第一个颜色。

                #如果设置为false,心的颜色使用完整个列表后保持与最后一行的颜色相同。

                colorLooping = true


            [hearts.health.tanks]

                #Enable heart tanks, the small icons above your hearts which indicate the number of filled health rows

                #启用heart tanks,这个血条上方的小图标,表示完整的血条行数(有几个heart tanks即有几条血条)

                enabled = true

        

            [hearts.health.text]

                #Style of health text

                #血条旁文本显示样式

                #Allowed Values: DISABLED, ROWS, HEALTH_AND_MAX, HEALTH_ONLY

                #DISABLED:禁用;ROWS:显示剩余生命值的剩余行数;HEALTH_AND_MAX:显示您的实际运行状况和最大生命值;HEALTH_ONLY:仅显示当前生命值

                style = "ROWS"

                #Health text scale, relative to its normal size (which varies by style)

                #文本大小

                #Range: 0.01 ~ 1.7976931348623157E308

                scale = 1.0

                #Fine-tune text position

                #Range: > -2147483648

                offsetX = 0

                #Fine-tune text position

                #Range: > -2147483648

                offsetY = 0


                [hearts.health.text.color]

                    #Health text color style.

                    #文本颜色样式

                    #TRANSITION: Gradually goes from full color to empty color as health is lost

                    #TRANSITION:随着心的减少,文本颜色逐渐变白

                    #PSYCHEDELIC: Taste the rainbow!

                    #PSYCHEDELIC:尝尝彩虹!!!

                    #SOLID: Just stays at full color regardless of health

                    #SOLID:无论心是否减少,都保持不变

                    #Allowed Values: TRANSITION, SOLID, PSYCHEDELIC

                    style = "TRANSITION"

                    #Color when health is full or style is SOLID

                    full = 5046092

                    #Color when health is empty and style is TRANSITION

                    empty = 16731212


        [hearts.absorption]

            [hearts.absorption.icons]

                #Style of absorption icons

                #伤害吸收心图标的样式

                #Allowed Values: SHIELD, GOLD_OUTLINE, VANILLA

                style = "SHIELD"

                #The color of each row of absorption hearts. If the player has more rows than colors, it starts over from the beginning.

                #每一行伤害吸收心的颜色,如果玩家血条数比颜色数多,用完颜色后将会从第一个颜色重新开始。

                colors = ["#BF0000", "#E66000", "#E69900", "#E6D300", "#99E600", "#4CE600", "#00E699", "#00E6E6", "#0099E6", "#0000E6", "#9900E6", "#D580FF", "#8C8C8C", "#E6E6E6"]


            [hearts.absorption.text]

                #Style for absorption text. Because there is no 'max' value, the options are more limited.

                #伤害吸收文本的样式。因为没有'max'值,所以选项更加有限

                #Allowed Values: DISABLED, ROWS, HEALTH_ONLY

                style = "DISABLED"

                #Fine-tune text position

                #Range: > -2147483648

                offsetX = 0

                #Fine-tune text position

                #Range: > -2147483648

                offsetY = 0

                #The color of the absorption text

                color = 16777215


    [difficulty]

        #Display a warning to players trying to sleep, to remind them their difficulty may change. Sleeping is still allowed.

        #向试着睡觉的玩家发出提示,在他们睡觉时难度任然可能发生变化。

        warnWhenSleeping = true


        [difficulty.meter]

            #When to show the difficulty meter.

            #什么时候显示难度表。

            #Allowed Values: ALWAYS, SOMETIMES, NEVER

            show = "SOMETIMES"

            #Show the difficulty meter for this many seconds (only on SOMETIMES mode)

            #显示几秒的难度表(只有在SOMETIMES模式时有用)

            #Range: 0.0 ~ 1.7976931348623157E308

            showDuration = 8.0


            [difficulty.meter.position]

                #Position of the difficulty meter.

                #难度表的位置

                #Allowed Values: TOP_LEFT, TOP_CENTER, TOP_RIGHT, CENTER_LEFT, CENTER, CENTER_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER, BOTTOM_RIGHT

                anchor = "BOTTOM_LEFT"

                #Fine-tune the difficulty meter's position

                #Range: > -2147483648

                offsetX = 5

                #Fine-tune the difficulty meter's position

                #Range: > -2147483648

                offsetY = -30


            [difficulty.meter.text]

                #Scale of text on the difficulty meter

                #难度表的显示大小

                #Range: 0.0 ~ 1.7976931348623157E308

                scale = 0.6


    [blights]

        #whether the purple flame should render on blights or not.

        #紫色火焰否在怪物blights时显示

        #This does not change whether the mob is a blight, only hides the effect.

        #这个不会改变怪物是否会不会blights,只是隐藏了显示效果

        render = true

Sever部分

    [features]

        #Enable player bonus hp by crystals.

        #使玩家可以通过使用心晶增加HP上限。

        crystalsAddHealth = true


        #Enable player bonus hp by xp.

        #使玩家可以通过经验增加HP上限。

        xpAddHealth = true


        #Enable player regen hp by crystals.

        #使玩家可以通过使用心晶恢复HP。

        crystalsRegenHealth = true


        #Enable pet add hp by crystals.

        #使宠物可以通过使用心晶增加HP上限。

        crystalsAddPetHealth = true


        #Enable player add damage by crystals.

        #使玩家可以通过使用力晶增加基础攻击伤害。

        crystalsAddDamage = true


        #Enable ore gen of health crystals. Still drops as loot.

        #启用心晶矿石的生成。仍然作为战利品掉落。

        hpCrystalsOreGen = true


        #Enable ore gen of power crystals. Still drops as loot.

        #启用力晶矿石的生成。仍然作为战利品掉落。

        powerCrystalsOreGen = true


        #Mobs will gain bonus health with difficulty.

        #伴随难度值的变化生物将获得额外的HP。

        mobHpIncrease = true


        #Mobs will gain bonus damage with difficulty.

        #伴随难度值的变化生物将获得额外的基础攻击力伤害。

        mobDamageIncrease = true


        #Enable player damage scaling.

        #启用玩家伤害变化。

        playerDamageScaling = true


        #Enable mob damage scaling.

        #启用生物伤害变化。

        mobDamageScaling = true

        #Enable difficulty system. If disabled, everything will have 0 difficulty.

        #启用难度值系统。如果禁用,任何时刻难度值都将为0.

        enableDifficulty = true


        #Enable blights. If disabled, no blights will spawn.

        #启用blights。如果禁用,将不会有blights生物生成。

        enableBlights = true


制作数据包

    创建如下格式的zip压缩包。或者右键Scaling Health.jar模组文件选择预览压缩包,将data文件夹和pack.memeta文件解压出来放到任意文件夹(如111,名字任意取)中,将data文件夹中的forge和minecraft文件夹删去,打开scalinghealth文件夹,将除sh_mechanics的文件夹删去,然后将(111)文件夹压缩。

    Scaling Health.zip

        ∟ pack.mcmeta

        ∟ data

                ∟ scalinghealth

                        ∟ sh_mechanics

                                ∟ difficulty.json

                                ∟ items.json

                                ∟ mobs.json

                                ∟ player.json

    difficulty.json

"startingValue" : 0,
  "minValue" : 0,
  "maxValue" : 250,
  "changePerSecond" : 0.0011575,
  "mode" : {
    "type" : "distance_and_time",
    "distance" : {
      "distanceFactor" : 0.0025
    },
    "average" : {
      "radius" : 256
    }

    startingvalue:初始难度值;minValue:最小难度值;maxValue:最大难度值;changePerSecond:每秒难度值变化;

    mode结构中的字段:

        type:困难值增加的方式,目前有:extrema, average, distance, distance_and_time 和 server_wide.

            exteeam:1.需要大于等于64的半径字段(radius)。2.可以选择且默认为true的字段(min),可以使极值改为难度的最大值(默认情况下为你设置的最小值)。

            average:1.需要大于等于64的半径字段(distance radius)。2.可以选择且默认为true的字段(weighted),如果为false,则半径内使用正太平均值,而不是加权平均值。

            distance:可以选择且默认为false的字段,如果为true,则难度将会从原点(x=0,z=0)开始计算,而不是从世界生成点开始计算。

            distance_and_time:包括了上一点,并且有时间的因素。

            sever_wide:不需要任何字段。

"groupBonus" : "1 + 0.05 * (areaPlayerCount - 1)",
"groupBonusRadius" : 128,
"idleMultiplier" : 0.5,
"afkMessage" : true,
"timeBeforeAfk" : 120,
"sleepWarningMessage": true,

    groupBonus:团队奖励

    groupBonusRadius:团队奖励半径(这两个我不太确定是什么意思)

    idleMultipliper:空闲乘数

    afkMessage:指“away from keyboard”的提示信息

    timeBeforeAfk:Afk之前的时间

    sleepWarningMessage:睡觉警告提示

"multipliers" : {
    "lunarMultipliers" : [1.1, 1.075, 1.05, 1.0, 0.95, 1.0, 1.05, 1.075],
    "locationMultipliers" : [
      {
        "scale" : 1.05,
        "dimensions" : ["minecraft:the_end", "minecraft:the_nether"]
      },
      {
        "scale" : 1.025,
        "dimensions" : ["minecraft:overworld"],
        "biomes" : ["minecraft:swamp", "minecraft:swamp_hills"]
      }
    ]
  },

    lunarMultipliers:月相乘数,对应我的世界的八个月相如果我的世界wiki搬迁完成请联系我更改超链接:满月、亏凸月、下弦月、残月、新月、峨眉月、上弦月、盈凸月,在对应的月相时难度会乘以对应的数字。

    locationMultipliers:位置乘数,可以是维度,可以是群系。

"mutators" : {
    "onBlightKilled" : "difficulty",
    "onHostileKilled" : "difficulty",
    "onPeacefulKilled" : "difficulty",
    "onPlayerKilled" : "difficulty + 1",
    "onPlayerDeath" : "difficulty",
    "onPlayerSleep" : "difficulty",
    "byEntity" : [
      {
        "entities" : ["minecraft:villager"],
        "onKilled" : "difficulty + 0.05"
      },
      {
        "entities" : ["minecraft:wither", "minecraft:ender_dragon"],
        "onKilled" : "difficulty"
      }
    ]
  }

    触发这些事件时改变难度值:

  1.     onBlightKilled:杀死Blight生物;

  2.     onHostileKilled:杀死敌对生物;

  3.     onPeacefulKilled:杀死友好生物;

  4.     onPlayerKilled:杀死玩家;

  5.     onPlayerDeath:玩家死亡;

  6.     onPlayerSleep:玩家睡觉;

  7.     byEntity:对于单独的实体,上面的例子就是杀死村民(villager)是增加0.05的难度和杀死凋灵和末影龙时难度不变。

    player.json

{
  "startingHealth" : 20,
  "minHealth" : 2,
  "maxHealth" : 200,
  "setOnDeath": "maxHealth",
  "levelsPerHp": 10,
  "hpPerLevel":  1,
  "maxAttackDamage" : 50,
  "regen" : {
    "initialDelay": 20,
    "tickDelay": 5,
    "exhaustion": 0.1,
    "minFood": 10,
    "maxFood": 2147483647,
    "minHealth": 0,
    "maxHealth": 2147483647,
    "proportionalToMaxHealth": false
  }
}

    startingHealth:初始生命值。

    minHealth:最小生命值。

    maxHealth:最大生命值。

    setOnDeath:死后重生的生命值。

    levelsPerHp:每的等级。

    hpPerLevel:每级生命值。

    maxAttackDamage:最大攻击伤害。

    regen:回复

        initialDelay:初始延迟。

        tickDelay:每游戏刻延迟。

        exhaustion:疲惫值。

        minFood:最小的食物回复的生命值。

        maxFood:最大的食物回复的生命值。

        minHealth:最小回复的生命值。

        maxHealth:最大回复的生命值。

        proportionalToMaxHealth:比例与最大生命值。

    mobs.json

这这里面修改生物的效果,词条挺简单的就不再多说了。

如有指教请指出,谢谢!