当前位置:网站首页>Minecraft 1.16.5模组开发(五十二) 修改原版生物战利品 (Loot Table)
Minecraft 1.16.5模组开发(五十二) 修改原版生物战利品 (Loot Table)
2022-07-26 14:35:00 【Jay_fearless】
我们今天尝试对原版中的一些生物的掉落物进行修改
1.我们本次修改的是原版中Zombie的掉落物,所以我们需要找到原版Zombie的战利品表:
zombie.json
{
"type": "minecraft:entity",
"pools": [
{
"rolls": 1.0,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"functions": [
{
"function": "minecraft:set_count",
"count": {
"type": "minecraft:uniform",
"min": 0.0,
"max": 2.0
},
"add": false
},
{
"function": "minecraft:looting_enchant",
"count": {
"type": "minecraft:uniform",
"min": 0.0,
"max": 1.0
}
}
],
"name": "minecraft:rotten_flesh"
}
]
},
{
"rolls": 1.0,
"bonus_rolls": 0.0,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:iron_ingot"
},
{
"type": "minecraft:item",
"name": "minecraft:carrot"
},
{
"type": "minecraft:item",
"functions": [
{
"function": "minecraft:furnace_smelt",
"conditions": [
{
"condition": "minecraft:entity_properties",
"predicate": {
"flags": {
"is_on_fire": true
}
},
"entity": "this"
}
]
}
],
"name": "minecraft:potato"
}
],
"conditions": [
{
"condition": "minecraft:killed_by_player"
},
{
"condition": "minecraft:random_chance_with_looting",
"chance": 0.025,
"looting_multiplier": 0.01
}
]
}
]
}
战利品的基本参数:
"type": "item",
"name": "minecraft:gold_nugget", # 掉落物的具体名称
"weight": 5, # 掉落权重
"functions": [
{
"function": "set_count",
"count": {
"min": 0, # 一次最少掉几个
"max": 2 # 一次最多掉几个
}
}
2.找到模组的资源包,在src\main\resources\data下新建minecraft包->在minecraft包中新建loot_tables包->在loot_tables包中新建entities包->在entities包中新建我们的zombie.json文件:

zombie.json
{
"type": "minecraft:entity",
"pools": [
{
"name": "main",
"rolls": 1,
"entries": [
{
"type": "item",
"name": "minecraft:gold_nugget",
"weight": 5,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 2
}
}
]
},
{
"type": "item",
"weight": 5,
"name": "minecraft:diamond",
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 2
}
}
]
},
{
"type": "item",
"weight": 3,
"name": "minecraft:iron_ingot",
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
},
{
"type": "item",
"weight": 5,
"name": "minecraft:emerald",
"functions": [
{
"function": "set_count",
"count": {
"min": 2,
"max": 3
}
}
]
}
]
}
]
}
3.进入游戏调试:
我们给zombie设置为掉落钻石、绿宝石、铁锭等物品:
击杀后掉落情况:

所有掉落物都出现了,符合预期!
边栏推荐
- go开发调试之Delve的使用
- Transc knowledge representation model
- What is restful style and its four specific implementation forms
- Seata deployment and microservice integration
- PyTorch中 torch.nn与torch.nn.functional的区别
- The difference between torch.nn and torch.nn.functional in pytorch
- How to do app upgrade test?
- 31. Opinion based relational pivoting forcross domain aspect term extraction reading notes
- 1-to-1 live broadcast source code - 1-to-1 voice chat source code
- C# Winfrom 常用功能整合
猜你喜欢

全校软硬件基础设施一站式监控 ,苏州大学以时序数据库替换 PostgreSQL

Instructions for various interfaces of hand-held vibrating wire collector vh03

PyTorch的简单实现

Arithmetic operation and logic operation of image in opencv

中部“第一城”,长沙“人才引力”从争先到领先

CAS based SSO single point server configuration

Usage of nn.conv2d and nn.convtranspose2d functions in pytorch

OpenCV中图像算术操作与逻辑操作

【2022国赛模拟】白楼剑——SAM、回滚莫队、二次离线

【干货】MySQL索引背后的数据结构及算法原理
随机推荐
As the "first city" in Central China, Changsha's "talent attraction" has changed from competition to leadership
winscp传输文件和VNC连接问题
Would you please tell me if there is a way for Flink SQL not to output update_ before?
Difference between filter and interceptor
Annotation and reflection
【2022国赛模拟】白楼剑——SAM、回滚莫队、二次离线
Summary of target tracking related knowledge
【常微分方程求解及绘图之求解小船行走轨迹】
Use of URL download resources
TDengine 助力西门子轻量级数字化解决方案 SIMICAS 简化数据处理流程
maya将模型导入到unity
UDP multithreaded online chat
JS analog clock with text label
31. Opinion-based Relational Pivoting forCross-domain Aspect Term Extraction 阅读笔记
Unity learning notes – infinite map
Fill in the questionnaire and receive the prize | we sincerely invite you to fill in the Google play academy activity survey questionnaire
Tdengine helps Siemens' lightweight digital solution simicas simplify data processing process
[ostep] 03 virtualized CPU - restricted direct execution mechanism
图神经网络Core数据集介绍
WPF 常用功能整合