Skript:
恳求大佬解决问题。
( 注释有些忘记改了
)
复制代码
采集农作物脚本,右键需要通过对准成熟农作物的情况下执行 ( 配好了成熟种类的 , 在 18 行 ) 但是对准的农作物周围如果有 种类不同 的农作物时,会随着变成 air 但并不会掉落,是被类似吞掉?
恳求大佬解决问题。
( 注释有些忘记改了

- # 玩家道具指到农作物的位置 , 右键清除 4 格以内农作物 , 并随机掉落 {@Number} 里的数量
- options:
- # 特定 Lore 才可进行以下操作
- Lore: &f稿子
- # 检测多少的格数
- Radius: 4
- # 掉落 1 ~ 5 的掉落物
- Number: 4 to 10
- # 删除多少的耐久
- Durability: 1
- aliases:
- # 设置成熟的材质都是为 ripe carrot plant , 其中 ripe ... plant 不变 , 自己把材质补上
-
- plant = ripe carrot plant, ripe wheat plant, ripe beetroot plant, ripe potato plant
- variables:
- # 道具耐久变量 不用管
- {_ItemsDurability.%player%} = false
- on right click:
- # 如果 Lore 包括 {@Lore} 里面的才可执行操作
- if lore of player's tool contain "{@Lore}":
-
-
- # 循环玩家身边 4 格方块
- loop blocks in radius {@Radius} of block:
-
- # 方块是耕地
- loop-block is farmland:
-
- # 方块上面是植物需要设置 plant 里面的
- block above loop-block is plant:
-
- set {_ItemsDurability.%player%} to true
-
- # 修改 {_type} 为循环 4
- set {_location} to location above loop-block
-
- # 修改 {_location} 为循环 4 格的农作物
- set {_type} to type of the block above loop-block
-
- # 修改掉落的数量是 {@Number} 的设置数量
- set {_drop} to random integer from {@Number}
-
- # 把右键的 4 格方块改为空白 也就是消除农作物
- set block above loop-block to {_location}
-
- # 给予被消除的农作物 , 掉落到被删除的位置
- drop {_drop} of {_type}
-
- # 如果觉得多余可直接删除
- # send "&f采集成功! &a&o( %{_location}%
-
- send "&f采集成功! &a&o( %{_location}% )" # 提示采集的位置
-
- # 减少 1 的耐久
- add {@Durability} to durability of player's tool
-
- # 如果耐久为 0 则删除该道具
- if (max durability of player's tool - durability of player's tool) is equal to 0:
- delete player's tool
-
- # 设置 {_ItemsDurability::%player%} 方便损坏时给予提示
- set {_ItemsDurability::%player%} to true
-
- # 工具损坏了的提示信息
- if {_ItemsDurability::%player%} is true:
-
- send "&f道具&e损坏&f了。"
-
- set {_ItemsDurability::%player%} to false
-
-
本帖最后由 六月奈 于 2022-2-7 21:40 编辑
原封不动写进去后台报错无法掉落空气,怀疑是sk本身的判定bug
但是有个曲线救国的方法,取消alias,给四种植物分别写脚本即可
真的是稿子而不是镐子吗?(
复制代码
原封不动写进去后台报错无法掉落空气,怀疑是sk本身的判定bug
但是有个曲线救国的方法,取消alias,给四种植物分别写脚本即可
真的是稿子而不是镐子吗?(
- options:
- Lore: &f镐子
- Radius: 4
- Number: 4 to 10
- Durability: 1
- variables:
- {_ItemsDurability.%player%} = false
- on right click:
- if lore of player's tool contain "{@Lore}":
- loop blocks in radius {@Radius} of block:
- loop-block is farmland:
- block above loop-block is ripe wheat plant:
- set {_ItemsDurability.%player%} to true
- set {_location} to location above loop-block
- set {_type} to type of the block above loop-block
- set {_drop} to random integer from {@Number}
- set block above loop-block to {_location}
- drop {_drop} of wheat
- send "&f采集成功! &a&o( %{_location}% )" # 提示采集的位置
- add {@Durability} to durability of player's tool
- if (max durability of player's tool - durability of player's tool) is equal to 0:
- delete player's tool
- set {_ItemsDurability::%player%} to true
- block above loop-block is ripe carrot plant:
- set {_ItemsDurability.%player%} to true
- set {_location} to location above loop-block
- set {_type} to type of the block above loop-block
- set {_drop} to random integer from {@Number}
- set block above loop-block to {_location}
- drop {_drop} of carrot
- send "&f采集成功! &a&o( %{_location}% )" # 提示采集的位置
- add {@Durability} to durability of player's tool
- if (max durability of player's tool - durability of player's tool) is equal to 0:
- delete player's tool
- set {_ItemsDurability::%player%} to true
- block above loop-block is ripe beetroot plant:
- set {_ItemsDurability.%player%} to true
- set {_location} to location above loop-block
- set {_type} to type of the block above loop-block
- set {_drop} to random integer from {@Number}
- set block above loop-block to {_location}
- drop {_drop} of beetroot
- send "&f采集成功! &a&o( %{_location}% )" # 提示采集的位置
- add {@Durability} to durability of player's tool
- if (max durability of player's tool - durability of player's tool) is equal to 0:
- delete player's tool
- set {_ItemsDurability::%player%} to true
- block above loop-block is ripe potato plant:
- set {_ItemsDurability.%player%} to true
- set {_location} to location above loop-block
- set {_type} to type of the block above loop-block
- set {_drop} to random integer from {@Number}
- set block above loop-block to {_location}
- drop {_drop} of potato
- send "&f采集成功! &a&o( %{_location}% )" # 提示采集的位置
- add {@Durability} to durability of player's tool
- if (max durability of player's tool - durability of player's tool) is equal to 0:
- delete player's tool
- set {_ItemsDurability::%player%} to true
-
- if {_ItemsDurability::%player%} is true:
- send "&f道具&e损坏&f了。"
- set {_ItemsDurability::%player%} to false
六月奈 发表于 2022-2-7 21:37
原封不动写进去后台报错无法掉落空气,怀疑是sk本身的判定bug
但是有个曲线救国的方法,取消alias,给四种 ...
那可能是我个人糊涂的问题把 gao 没区分清楚