Skip to content

custom_type_effectiveness

LyquidQrystal edited this page Sep 23, 2026 · 2 revisions

Custom Type Effectiveness

What's this?

This system allows you to add weakness/resitance/immune to a non-Pokemon entity.

Attention

The basic concepts about the json or datapack will not be introduced here. Check Minecraft wiki for help or just ask AI for help.

Steps to create an example datapack

  • Create a file named pack.mcmeta.
  • Enter the following content and save it. { "pack": { "pack_format": 15, "description": "Example datapack" } }
  • Create a folder named data and open it.
  • Inside the data folder, create a folder named fightorflight and open it.
  • Inside the fightorflight folder, create a folder named fof_type_data and open it.
  • Now you can create a JSON file. For example, we will create a file named illager.json; you can change the name to whatever you prefer.
  • Open the file, enter the following content, save it, and then close the file. { "id": [ "any" ], "entityTypeTag": [ "minecraft:illager" ], "attachedElementalType": [ "Dark" ], "weakness": [], "resistance": [], "immune": [], "ignoredByMoldBreaker": false }
  • Now the folder structure should look like this.
    • pack.mcmeta
    • data
      • fightorflight
        • fof_type_data
          • illager.json
  • After confirming everything, compress these files into a single compressed file. We will name this file example.zip. Thus, we have created a datapack.
  • Install this datapack like the others, all the Illagers will be considered as Dark type when hurt.

Description of available parameters

  • id: The ID of the entity, such as "minecraft:pig". If you simply enter "any", the contents of this file will be applied to all entities (although it may not take effect).
  • entityTypeTag: The type tag of the entity; for specific tags, refer to the wiki. Only entities with all the tags in this list will have the effects of the file take place.
  • attachedElementalType: The types you wish to add to the entity; The first letter must be capitalized (the following items are the same, so it won’t be repeated). This can be combined with the following.
  • weakness: Attacks from these types will have a significant effect on the entity.
  • resistance: Attacks from these types will have a minor effect on the entity.
  • immune: Attacks from these types will have no effect on the entity.
  • ignoredByMoldBreaker: If set to true,Pokemon with Mold Breaker ability attacking the entity will not trigger the contents of this file.

TODO

Allowing the entity to hit Pokemon with elemental type attack sounds cool, but I need to spend my time on the other important features currently. Hope that I won't forget this system.

自定义属性

这是什么?

这个系统允许你给非宝可梦实体添加弱点/抵抗/免疫。

注意

关于json和数据包的基础概念不会在这里被提及。可以查看Minecraft Wiki或直接问AI。

创建一个演示的数据包的步骤

  • 创建一个名为pack.mcmeta的文件
  • 输入以下内容并保存 { "pack": { "pack_format": 15, "description": "Example datapack" } }
  • 创建一个名为data的文件夹并打开
  • 在data文件夹中创建一个名为fightorflight的文件夹并打开
  • 在fightorflight文件夹中创建一个名为fof_type_data的文件夹并打开
  • 现在你可以创建一个json文件,这里我们创建一个名为illager.json的文件作为例子。你可以将illager改为自己喜欢的文件名。
  • 打开该文件并输入以下内容,保存,关闭文件。 { "id": [ "any" ], "entityTypeTag": [ "minecraft:illager" ], "attachedElementalType": [ "Dark" ], "weakness": [], "resistance": [], "immune": [], "ignoredByMoldBreaker": false }
  • 现在的文件结构应该是
    • pack.mcmeta
    • data
      • fightorflight
        • fof_type_data
          • illager.json
  • 确定之后,将这些文件压缩到一个压缩文件,这里我们命名为example.zip,至此,我们已经实现了一个数据包。
  • 像安装其他数据包一样安装数据包,所有刌民在受伤时都会被视为恶系

可用参数说明

  • id:实体的id,如minecraft:pig,如果直接写“any”,该文件的内容会被添加到所有实体(但不一定生效)
  • entityTypeTag:实体类型标签,具体有什么标签可以查看wiki,具有这个列表内全部标签的实体才会使得该文件的内容生效。
  • attachedElementalType:你想给这个实体添加的属性,只支持英文名,首字母要大写(后面几项都一样,就不重复了)。可以和后面几项叠加。
  • weakness:受到这些属性的攻击会效果绝佳。
  • resistance:受到这些属性的攻击会效果不好。
  • immune:受到这些属性的攻击会没有效果。
  • ignoredByMoldBreaker:如果为true,特性是破格的宝可梦攻击实体不会触发这个文件里的内容。

可能会更新的内容

让实体攻击宝可梦带属性效果我觉得是个挺酷的特性,但我需要先把时间放在别的更需要的特性上。希望我别忘了这件事。