Skip to content

Commit

Permalink
fix1.20.X
Browse files Browse the repository at this point in the history
谓词战利品表修复
  • Loading branch information
friends-xiaohuli committed Oct 21, 2023
1 parent 3265246 commit 3c962f0
Show file tree
Hide file tree
Showing 73 changed files with 570 additions and 226 deletions.
5 changes: 0 additions & 5 deletions .vscode/settings.json

This file was deleted.

120 changes: 119 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,122 @@
# 连锁矿工数据包
# 连锁矿工数据包fix

1.20.X谓词战利品表修复版本

原仓 by Ph-苯 | 修复 fix 霜澪是只白狐ya

### 注意!该分支仅支持1.20.X,其余版本请前往原仓库下载


## 连锁矿工数据包
[MCBBS](https://www.mcbbs.net/thread-843464-1-1.html)

[MCMOD](https://www.mcmod.cn/class/2331.html)

# 概要

在生存或冒险模式下(创造模式无效),主手持有相应工具,潜行(可选)挖掘方块,即可挖掘与其相连的全部同类方块,并消耗对应工具耐久。

支持耐久、时运和精准采集。

快速落叶。

砍树或收割时自动补种(可选)。

一次连锁消耗挖掘所有方块的饥饿值(以饥饿效果的形式实现,如果你发现自己挖掘后突然出现饥饿效果,请勿惊慌),但统计只增加一个方块。

一次最多连锁64*27个方块。如果掉落物需要占用超过27个物品格子,多出的会消失,这种情况只发生在挖掘巨量单个方块掉落超过1个物品的方块时,所以正常玩家不必担心。


所有设置条目,绿色表示开启,灰色表示关闭,用鼠标单击这些文本可以切换开关。

开启:开启连锁挖掘。每个玩家的设置互相独立。

需要潜行:潜行时挖掘方块才能连锁。

自动补种:砍树后自动补种树苗。

显示连锁的方块数:在挖掘方块后用标题显示连锁的方块数量。

显示消耗的耐久:在挖掘方块后用副标题显示消耗的工具的耐久。

# 工具-方块对应表

##

消耗耐久:各类原木(会自动补种)、巨型蘑菇方块、下界菌柄、南瓜、西瓜、树叶。

不消耗耐久:小麦、胡萝卜、马铃薯、甜菜、地狱疣、甘蔗(会留下一格)、草丛、高草丛、蕨、大型蕨。

##

各类矿石及其深板变种、远古残骸、黑曜石、萤石、紫水晶簇、各种铁轨、岩浆块。

精准采集:冰、浮冰、蓝冰。

##

沙子、红沙、沙砾、黏土、灵魂沙、灵魂土、雪片。

##

消耗耐久:疣块、菌光体、干草块。

不消耗耐久:草、高草丛、蕨、大型蕨。

不消耗耐久且自动补种:小麦、胡萝卜、马铃薯、甜菜、地狱疣。

## 剪刀

树叶、藤蔓、蜘蛛网、草、高草丛、蕨、大型蕨、发光地衣。

## 被一起连锁的方块

草、高草丛、蕨、大型蕨

红色蘑菇方块、棕色蘑菇方块、蘑菇梗

矿石及其深板变种

下界疣块、诡异疣块、菌光体

各类铁轨

# 添加对其它方块的支持的一般方法

打开数据包,进入data/vimi/functions文件夹。

在其中的load文件里加入新的一行命令:scoreboard objectives add <记分板名(名称自拟,不能包含中文或空格,尽量以vimi开头,且必须在16个字符以内)> mined:<方块ID(如果不知方块ID,请在游戏中按F3+H,确认聊天栏出现提示,然后把鼠标悬浮在物品栏里的方块上面,显示的悬浮框的下面就会显示该方块的ID)>。

在其中的reset_score文件里加入新的一行命令:scoreboard players reset @e <你上面取的记分板名>。

在其中的clone_block/<你想要使用来连锁挖掘的工具的名称(axe斧,hoe锄,pickaxe镐,shears剪刀,shovel锹)>里的最下面添加新的一行指令:execute if score @s <你上面取的记分板名> matches 1.. run setblock 20000016 1 20000016 <方块ID>。

进入data/vimi/tags/blocks/single_state.json文件,在最后一个引号后面添加一个英文逗号,并另起一行,写上"<方块ID>"(包括英文双引号)。

保存以上修改。

【注】每次更新数据包都要重新进行以上操作。

# 已知BUG

(若发现bug请回复)

耐久附魔的处理使用的随机数不够随机。

# 兼容性

命名空间为vimi,所有记分板以vimi开头。

强加载位于20000016 20000016的区块,并占用一定的方块。

轻微修改了潜影盒、棕色蘑菇方块、红色蘑菇方块、蘑菇梗、六种树叶、草丛、高草丛、蕨、大型蕨的战利品表。

可连锁的方块必须掉落物品,否则不能连锁。

# 计划更新

锄头连锁耕地。

# 声明

本数据包允许在单机、服务器和地图中使用,在服务器和地图中使用时请标明出处。
157 changes: 80 additions & 77 deletions data/minecraft/loot_tables/blocks/acacia_leaves.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,52 @@
"type": "minecraft:block",
"pools": [
{
"rolls": 1.0,
"bonus_rolls": 0.0,
"rolls": 1,
"bonus_rolls": 0,
"entries": [
{
"type": "minecraft:alternatives",
"children": [
{
"type": "minecraft:item",
"name": "minecraft:acacia_leaves",
"conditions": [
{
"condition": "minecraft:alternative",
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:match_tool",
"predicate": {
"items": [
"minecraft:shears"
]
}
},
{
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
}
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:match_tool",
"predicate": {
"items": [
"minecraft:shears"
]
}
},
{
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
]
}
}
]
}
]
}
],
"name": "minecraft:acacia_leaves"
]
},
{
"type": "minecraft:item",
"name": "minecraft:acacia_sapling",
"conditions": [
{
"condition": "minecraft:survives_explosion"
Expand All @@ -56,90 +62,87 @@
0.1
]
}
],
"name": "minecraft:acacia_sapling"
]
},
{
"type": "item",
"name": "minecraft:stone_button",
"functions": [
{
"function": "minecraft:set_nbt",
"tag": "{vimiMarker:1b}"
}
]
"type": "minecraft:item",
"name": "minecraft:stone_button",
"functions": [
{
"function": "minecraft:set_nbt",
"tag": "{vimiMarker:1b}"
}
]
}
]
}
]
},
{
"rolls": 1.0,
"bonus_rolls": 0.0,
"rolls": 1,
"bonus_rolls": 0,
"entries": [
{
"type": "minecraft:item",
"conditions": [
{
"condition": "minecraft:table_bonus",
"enchantment": "minecraft:fortune",
"chances": [
0.02,
0.022222223,
0.025,
0.033333335,
0.1
]
}
],
"name": "minecraft:stick",
"functions": [
{
"function": "minecraft:set_count",
"count": {
"type": "minecraft:uniform",
"min": 1.0,
"max": 2.0
"min": 1,
"max": 2
},
"add": false
},
{
"function": "minecraft:explosion_decay"
}
],
"name": "minecraft:stick"
"conditions": [
{
"condition": "minecraft:table_bonus",
"enchantment": "minecraft:fortune",
"chances": [
0.02,
0.022222223,
0.025,
0.033333335,
0.1
]
}
]
}
],
"conditions": [
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:alternative",
"terms": [
{
"condition": "minecraft:match_tool",
"predicate": {
"items": [
"minecraft:shears"
]
}
},
{
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
}
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:match_tool",
"predicate": {
"items": [
"minecraft:shears"
]
}
},
{
"condition": "minecraft:match_tool",
"predicate": {
"enchantments": [
{
"enchantment": "minecraft:silk_touch",
"levels": {
"min": 1
}
]
}
}
]
}
]
}
}
]
}
]
}
]
}
}

4 changes: 2 additions & 2 deletions data/minecraft/loot_tables/blocks/azalea_leaves.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"type": "minecraft:item",
"conditions": [
{
"condition": "minecraft:alternative",
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:match_tool",
Expand Down Expand Up @@ -113,7 +113,7 @@
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:alternative",
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:match_tool",
Expand Down
4 changes: 2 additions & 2 deletions data/minecraft/loot_tables/blocks/birch_leaves.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"type": "minecraft:item",
"conditions": [
{
"condition": "minecraft:alternative",
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:match_tool",
Expand Down Expand Up @@ -113,7 +113,7 @@
{
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:alternative",
"condition": "minecraft:any_of",
"terms": [
{
"condition": "minecraft:match_tool",
Expand Down
Loading

0 comments on commit 3c962f0

Please sign in to comment.