Quellcode durchsuchen

Merge branch 'master' of https://github.com/LTCatt/LTW3

LTCatt vor 5 Jahren
Ursprung
Commit
ef633d8df1

+ 4 - 1
data/item/functions/bonus_item/call_each.mcfunction

@@ -24,4 +24,7 @@ execute if data storage item:bonus item.tag.bonus_give_items[0] run function ite
 execute if data storage item:bonus item.tag.bonus_random_bonus[0] run function item:bonus_item/random_bonus
 
 # 执行特定函数
-execute if score $state mem matches 7 run function item:bonus_item/pickup_1
+execute if score $state mem matches 7 run function item:bonus_item/pickup_1
+
+# 处理下一个
+execute if data storage item:bonus item_buff[0] run function item:bonus_item/call_each

+ 1 - 0
data/item/functions/bonus_item/random_bonus.mcfunction

@@ -1,5 +1,6 @@
 #as player
 setblock 0 0 1 shulker_box replace
+tellraw 00ll00 {"nbt":"item.tag.bonus_random_bonus","storage": "item:bonus"}
 data modify storage item:bonus random_bonus set from storage item:bonus item.tag.bonus_random_bonus[0]
 data remove storage item:bonus item.tag.bonus_random_bonus[0]
 execute store result score $item.random.count mem run data get storage item:bonus random_bonus.count

+ 1 - 1
data/mini/functions/trade/game/villager_update_trade.mcfunction

@@ -2,7 +2,7 @@
 function mini:trade/game/villager_level_up
 
 # 判断空交易
-function mini:trade/game/remove_trade
+execute if entity @s[nbt={Offers:{Recipes:[{uses:2,maxUses:2}]}}] run function mini:trade/game/remove_trade
 
 # 判断是否增加交易
 execute if entity @s[tag=upgradeVillager] run function mini:trade/game/villager_new_trade

+ 1 - 0
data/mini/functions/trade/game_init.mcfunction

@@ -35,6 +35,7 @@ gamerule doEntityDrops true
 gamerule doMobLoot true
 
 # 生成实体
+kill @e[type=villager,tag=TradeMarker]
 summon villager 1000 5 5000 {NoAI:1b,Tags:["TradeMarker","TradeOrigin"],Invulnerable:1b,Silent:1b,Offers:{},CustomName:'{"text":"使用生物雷达是作弊行为哦!","color":"red"}'}
 # 设置交易列表
 execute as @e[type=villager,tag=TradeOrigin] at @s run function mini:trade/game/set_trade