EditableEdibles 是一个简单的整合包工具模组,用于为食物物品添加自定义效果。
原版食物在食用时通常只能提供单一的效果,除非编写额外的代码,否则一般无法修改。
EditableEdibles 允许你定义玩家食用食物时应施加的效果,包括持续时间、等级和应用概率。
通过 EditableEdibles 的配置系统,你可以为单个食物物品定义多个效果条目(包含各自的应用概率),而不是仅限于单一的概率和效果。此外,还可以根据物品的元数据(metadata)来应用效果,适用于由元数据定义的食物物品(例如鱼类)。
此外,你还可以定义哪些食物物品应取消默认的效果处理逻辑(例如生鸡肉),以便移除原有效果或将其替换为你自定义的效果,以及使用下方列出的其他选项。
配置选项可以通过 Forge 配置菜单在游戏内直接编辑,并会自动同步更新到游戏中。
配置选项(格式说明也显示在游戏内的提示文本中):
-
食物效果与概率:包含物品、药水效果和食用时应用概率的条目列表
格式:String itemId, Int metadata (-1 表示任意), String potionId, Int duration, Int amplifier, Boolean showParticles, Float chance
示例:minecraft:chicken, -1, minecraft:hunger, 120, 0, false, 0.25
-
食物默认效果覆盖:包含物品及其是否应取消默认效果处理的条目列表
格式:String itemId, Int metadata, Boolean shouldCancel
示例:minecraft:chicken, -1, true
-
食物治愈效果与概率:包含物品、药水效果以及食用时被治愈的概率的条目列表
格式:String itemId, Int metadata (-1 表示任意), String potionId, Int maxDuration (-1 表示任意), Int maxAmplifier (-1 表示任意), Float chance
示例:minecraft:carrot, -1, minecraft:blindness, -1, -1, 1.0
-
食物治愈类型与概率:包含物品、药水类型以及食用时被治愈的概率的条目列表
格式:String itemId, Int metadata (-1 表示任意), CureType cureType (ALL, POSITIVE, NEGATIVE), Float chance
示例:minecraft:poisonous_potato, -1, POSITIVE, 0.25
-
始终可食用的食物物品:列出应始终被视为可食用的食物物品
格式:String itemId, Int metadata (-1 表示任意)
示例:minecraft:apple, -1
-
覆盖始终可食用设置:允许将所有食物物品设置为始终可食用
模组兼容性:
-
MistyWorld 食物醉酒值与概率:包含物品及向“醉酒值”(Intoxication)添加指定值的概率的条目列表
醉酒值范围在 0 到 10000 之间,添加的值可以为负数
格式:String itemId, Int metadata (-1 表示任意), Int intoxicationAddValue, Float chance
示例:minecraft:poisonous_potato, -1, -2000, 0.75
-
MistyWorld 食物污染值与概率:包含物品及向“污染值”(pollution)添加指定值的概率的条目列表
污染值范围在 0 到 10000 之间,添加的值可以为负数
格式:String itemId, Int metadata (-1 表示任意), Int pollutionAddValue, Float chance
示例:minecraft:apple, -1, 1000, 0.5
欢迎在页面顶部链接的 GitHub Issue 跟踪器中请求其他与食物相关的配置选项。
Logo 由 rainyafternoon 制作
需要联系我或支持我?请点击下方的徽章:
需要服务器?点击下方横幅并使用代码 "fonny" 可在 Bisect Hosting 首月享受 25% 折扣:

EditableEdibles is a simple modpack utility for adding custom effects to food items.
Vanilla food items are normally limited to a single effect when eaten without additional coding, and this is not generally modifiable without writing your own mod.
EditableEdibles allows you to define effects to be applied to the player when they eat the food, along with the duration, amplifier, and chance of that effect applying.
Instead of foods being limited to a single chance and effect, with EditableEdibles config system you can define multiple effect chance entries for a single food item, as well as apply the effects based on the item metadata for food items that are defined by metadata such as fish.
Additionally, you can define food items and if their default handling of effects, such as raw chicken, should be cancelled, for if you want to remove an effect or replace it with your custom effects, as well as the other options below.
Config options can be edited in-game through the Forge config menu, and will automatically update in-game.
Config Options (Formatting also defined in tooltip):
-
Food Effects and Chances: List of entries including the item, potion effect, and chance to be applied when eaten
Format: String itemId, Int metadata (-1 for any), String potionId, Int duration, Int amplifier, Boolean showParticles, Float chance
Example: minecraft:chicken, -1, minecraft:hunger, 120, 0, false, 0.25
-
Food Default Effect Override: List of entries including the item and if their default effect handling should be cancelled
Format: String itemId, Int metadata, Boolean shouldCancel
Example: minecraft:chicken, -1, true
-
Food Cure Effects and Chances: List of entries including the item, potion effect, and chance to be cured when eaten
Format: String itemId, Int metadata (-1 for any), String potionId, Int maxDuration (-1 for any), Int maxAmplifier (-1 for any), Float chance
Example: minecraft:carrot, -1, minecraft:blindness, -1, -1, 1.0
-
Food Cure Types and Chances: List of entries including the item, types of potions, and chance to be cured when eaten
Format: String itemId, Int metadata (-1 for any), CureType cureType (ALL, POSITIVE, NEGATIVE), Float chance
Example: minecraft:poisonous_potato, -1, POSITIVE, 0.25
-
Always Edible Food Items: List of food items that should always be edible
Format: String itemId, Int metadata (-1 for any)
Example: minecraft:apple, -1
-
Override Always Edible: Allows for setting all food items to always be edible
Mod Compat:
-
MistyWorld Food Intoxication and Chances: List of entries including the item and chance to add defined value to Intoxication
Intoxication values are between 0 and 10000, added values can be negative
Format: String itemId, Int metadata (-1 for any), Int intoxicationAddValue, Float chance
Example: minecraft:poisonous_potato, -1, -2000, 0.75
-
MistyWorld Food Pollution and Chances: List of entries including the item and chance to add defined value to pollution
Pollution values are between 0 and 10000, added values can be negative
Format: String itemId, Int metadata (-1 for any), Int pollutionAddValue, Float chance
Example: minecraft:apple, -1, 1000, 0.5
Feel free to request additional food-related config options on the Github issue tracker linked at the top of the page.
Logo created by rainyafternoon
Need to get in contact with me, or want to support me? Click the badges below:
Need a server? Click the banner below and use code "fonny" for 25% off your first month with Bisect Hosting:

评论 0
登录后参与评分
还没有评论,来抢沙发吧