当前位置:网站首页>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设置为掉落钻石、绿宝石、铁锭等物品:
击杀后掉落情况:

所有掉落物都出现了,符合预期!
边栏推荐
- 4 kinds of round head arrangement styles overlay styles
- 研发了 5 年的时序数据库,到底要解决什么问题?
- 【2022国赛模拟】白楼剑——SAM、回滚莫队、二次离线
- C# Winfrom 常用功能整合
- Whaledi message queue stability improvement practice
- sqlDeveloper工具快速入门
- Matlab solution of [analysis of variance]
- CAS based SSO single point server configuration
- 全校软硬件基础设施一站式监控 ,苏州大学以时序数据库替换 PostgreSQL
- Flask send_ Absolute path traversal caused by file function
猜你喜欢

31. Opinion-based Relational Pivoting forCross-domain Aspect Term Extraction 阅读笔记

C nanui related function integration

Siamrpn++: evolution of deep network connected visual tracking

Maya imports the model into unity

填问卷,领奖品 | 诚邀您填写 Google Play Academy 活动调研问卷

My creation Anniversary - from the heart

CAS单点登录

Figure introduction to neural network core dataset

【使用工具条绘图】
![[Yugong series] July 2022 go teaching course 017 - if of branch structure](/img/e4/b3aa4b8bda738aadded3127a8b3485.png)
[Yugong series] July 2022 go teaching course 017 - if of branch structure
随机推荐
SSH that must be read on cloud native
Realize the full link grayscale based on Apache APIs IX through MSE
GOM登录器配置免费版生成图文教程
PyTorch中 torch.nn与torch.nn.functional的区别
自编码器 AE(AutoEncoder)程序
CAS单点登录
C# NanUI 相关功能整合
Seata的部署与微服务集成
创建Root权限虚拟环境
中值滤波器
JS wave animation effect menu style
selenium 代码存放
键盘快捷键操作电脑(自己遇到不会的)
图神经网络Core数据集介绍
Matlab solution of [analysis of variance]
"Baget" takes you one minute to build your own private nuget server
Create root permission virtual environment
如何评价测试质量?
[ostep] 02 virtualized CPU - process
10 schemes to ensure interface data security