Parcourir la source

还是杂项修改

龙腾猫跃 il y a 3 ans
Parent
commit
3e73d747e8

+ 1 - 2
data/item/functions/tick2.mcfunction

@@ -1,6 +1,5 @@
 # 防止玩家丢弃物品:如果物品存在 Thrower 则要求强制捡起
-execute unless score $survival mem matches 1.. as @e[type=item] if data entity @s Thrower run function item:disable_throw
-execute if score $survival mem matches 1.. unless score $state mem matches 5 as @e[type=item] if data entity @s Thrower run function item:disable_throw
+execute as @e[type=item] if data entity @s Thrower run function item:disable_throw
 
 # 检查玩家拾取奖励物品
 execute as @a if data entity @s Inventory[{"tag":{"bonus_new":1b}}] run function item:bonus_item/call

+ 3 - 0
data/mini/functions/iron/game/give_cobblestone.mcfunction

@@ -0,0 +1,3 @@
+give @s cobblestone
+scoreboard players remove #cobblestone_count temp 1
+execute if score #cobblestone_count temp matches 1.. run function mini:iron/game/give_cobblestone

+ 3 - 0
data/mini/functions/iron/game/give_raw_iron.mcfunction

@@ -0,0 +1,3 @@
+give @s raw_iron
+scoreboard players remove #raw_iron_count temp 1
+execute if score #raw_iron_count temp matches 1.. run function mini:iron/game/give_raw_iron

+ 21 - 1
data/mini/functions/iron/player_death.mcfunction

@@ -18,13 +18,33 @@ scoreboard players add #iron_count temp 2
 execute if score #iron_count temp matches 3.. at @e[type=armor_stand,tag=dead_marker,limit=1] run summon item ~ ~ ~ {Tags:["temp_iron"],Item:{id:"minecraft:iron_ingot",Count:1b},Glowing:1b}
 execute as @e[type=item,tag=temp_iron,limit=1] store result entity @s Item.Count byte 0.33334 run scoreboard players get #iron_count temp
 tag @e[type=item,tag=temp_iron,limit=1] remove temp_iron
+# 生成生铁物品
+execute store result score #raw_iron_count temp run clear @s raw_iron
+scoreboard players add #raw_iron_count temp 2
+execute if score #raw_iron_count temp matches 3.. at @e[type=armor_stand,tag=dead_marker,limit=1] run summon item ~ ~ ~ {Tags:["temp_raw_iron"],Item:{id:"minecraft:raw_iron",Count:1b},Glowing:1b}
+execute as @e[type=item,tag=temp_raw_iron,limit=1] store result entity @s Item.Count byte 0.33334 run scoreboard players get #raw_iron_count temp
+tag @e[type=item,tag=temp_raw_iron,limit=1] remove temp_raw_iron
+# 生成圆石物品
+execute store result score #cobblestone_count temp run clear @s cobblestone
+scoreboard players add #cobblestone_count temp 2
+execute if score #cobblestone_count temp matches 3.. at @e[type=armor_stand,tag=dead_marker,limit=1] run summon item ~ ~ ~ {Tags:["temp_cobblestone"],Item:{id:"minecraft:cobblestone",Count:1b},Glowing:1b}
+execute as @e[type=item,tag=temp_cobblestone,limit=1] store result entity @s Item.Count byte 0.33334 run scoreboard players get #cobblestone_count temp
+tag @e[type=item,tag=temp_cobblestone,limit=1] remove temp_cobblestone
 # 随机槽位掉落
 function mini:iron/game/random_slot
 function mini:iron/game/pop_slot
-# 返还剩余铁锭给玩家
+# 返还剩余物品给玩家
 scoreboard players remove #iron_count temp 2
 scoreboard players operation #iron_count temp *= #2 mem
 scoreboard players operation #iron_count temp /= #3 mem
 execute if score #iron_count temp matches 1.. run function mini:iron/game/give_iron
+scoreboard players remove #raw_iron_count temp 2
+scoreboard players operation #raw_iron_count temp *= #2 mem
+scoreboard players operation #raw_iron_count temp /= #3 mem
+execute if score #raw_iron_count temp matches 1.. run function mini:iron/game/give_raw_iron
+scoreboard players remove #cobblestone_count temp 2
+scoreboard players operation #cobblestone_count temp *= #2 mem
+scoreboard players operation #cobblestone_count temp /= #3 mem
+execute if score #cobblestone_count temp matches 1.. run function mini:iron/game/give_cobblestone
 # 删除marker
 kill @e[type=armor_stand,tag=dead_marker]

+ 1 - 1
data/mini/functions/phantom/game/give_trident.mcfunction

@@ -4,5 +4,5 @@ clear @s trident{game_item:1b}
 execute if data entity @s Inventory[{Slot:8b}] run scoreboard players set @s item_slot 8
 execute if data entity @s Inventory[{Slot:8b}] at @s run function item:pop_slot/return_item
 
-item replace entity @s hotbar.8 with trident{game_item:1b,Unbreakable:1b,HideFlags:63,display:{Name:'{"text":"三叉戟","italic":false}'}} 1
+item replace entity @s hotbar.8 with trident{game_item:1b,HideFlags:63,display:{Name:'{"text":"一次性三叉戟","italic":false}'},Damage:248} 1
 scoreboard players set @s countdown_fast -1

+ 0 - 2
data/mini/functions/phantom/tick2.mcfunction

@@ -1,5 +1,3 @@
-# 近战攻击不消耗三叉戟
-execute as @a[tag=mini_running,scores={use_trident=1..}] at @s if data entity @s Inventory[{Slot:8b,id:"minecraft:trident",tag:{game_item:1b}}] run scoreboard players set @s use_trident 0
 # 投掷三叉戟
 execute as @a[tag=mini_running,scores={use_trident=1..}] at @s run function mini:phantom/game/use_trident
 

+ 2 - 2
data/mini/functions/trade/game/paper_show.mcfunction

@@ -1,9 +1,9 @@
 # 清理物品
-clear @s paper{game_item:1b}
+clear @s flower_banner_pattern{game_item:1b}
 
 # 返还物品
 execute if data entity @s Inventory[{Slot:8b}] run scoreboard players set @s item_slot 8
 execute if data entity @s Inventory[{Slot:8b}] at @s run function item:pop_slot/return_item
 
 # 设置最后一格的物品
-item replace entity @s hotbar.8 with paper{game_item:1b,display:{Name:'[{"text":"交易契约","color":"white","italic":false}]',Lore:['[{"text":"当你手持该契约时,村民将会出现在你的面前","italic":false,"color":"gray"}]']}}
+item replace entity @s hotbar.8 with flower_banner_pattern{game_item:1b,display:{Name:'[{"text":"交易契约","color":"white","italic":false}]',Lore:['[{"text":"当你手持该契约时,村民将会出现在你的面前","italic":false,"color":"gray"}]']},HideFlags:32767}

+ 1 - 0
data/mini/tags/items/game_item.json

@@ -9,6 +9,7 @@
         "minecraft:crimson_planks",
         "minecraft:warped_planks",
         "minecraft:gold_block",
+        "minecraft:flower_banner_pattern",
         "minecraft:bricks",
         "minecraft:mossy_cobblestone",
         "minecraft:purpur_block",