会员登录 立即注册

搜索

墨山游侠之熊孩子侦测器

[复制链接]
崎山小鹿 发表于 2025-2-10 11:26:42 | 显示全部楼层 |阅读模式
崎山小鹿
2025-2-10 11:26:42 3252 4 看全部
熊孩子在创造区拿了岩浆就会被困在传送点,房主会收到警报立刻远程处理。
微信截图_20250212220825.png

第一个命令方块(重复型 + 始终活动):
execute if entity @a[hasitem={item=minecraft:lava_bucket, quantity=1..}] run tellraw @a[hasitem={item=minecraft:lava_bucket, quantity=1..}] {"rawtext":[{"text":"⚠️ 警告!你携带了岩浆桶!"}]}

第二个命令方块(连锁型 + 始终活动):
execute if entity @a[hasitem={item=minecraft:lava_bucket, quantity=1..}] run title @a[hasitem={item=minecraft:lava_bucket, quantity=1..}] title  §c⚠️ 警告!你携带了岩浆桶!

第三个命令方块(连锁型 + 始终活动):
execute if entity @a[hasitem={item=minecraft:lava_bucket, quantity=1..}] run playsound random.orb @a[hasitem={item=minecraft:lava_bucket, quantity=1..}]

第四个命令方块(连锁型 + 始终活动):传送,出发方式有:1传送到创造区传送点,生存区传送点,禁闭室1传送点,熊孩子岛传送点,最终选择了比较温和的方式
execute if entity @a[hasitem={item=minecraft:lava_bucket, quantity=1..},scores={hasTotem=1}] run tp @a[hasitem={item=minecraft:lava_bucket, quantity=1..},scores={hasTotem=1}] 739 63 260

第五个命令方块(连锁型 + 始终活动):传送,出发方式有:1传送到创造区传送点,生存区传送点,禁闭室1传送点,熊孩子岛传送点,最终选择了比较温和的方式
execute if entity @a[hasitem={item=minecraft:lava_bucket, quantity=1..},scores={hasTotem=2}] run tp @a[hasitem={item=minecraft:lava_bucket, quantity=1..},scores={hasTotem=2}] 333 90 351

第六个命令方块(连锁型 + 始终活动):提醒房主
execute if entity @a[hasitem={item=minecraft:lava_bucket, quantity=1..}] run playsound random.orb 墨山游侠001

第七个命令方块(连锁型 + 始终活动):提醒房主,发送私信给 房主,告诉谁携带了打火石
execute if entity @a[hasitem={item=minecraft:lava_bucket, quantity=1..}] run tell 墨山游侠001 ⚠️ 发现玩家: @a[hasitem={item=minecraft:lava_bucket}] 携带岩浆!

微信截图_20250213114251.png

清除岩浆

/fill ~-15 ~-15 ~-15 ~15 ~15 ~15 air replace magma_block  不行

/fill ~-15 ~-15 ~-15 ~15 ~15 ~15 air replace lava   可以清除岩浆
/fill ~-15 ~-15 ~-15 ~15 ~15 ~15 air replace flowing_lava   可以清除流动岩浆



清除TNT
/kill @e[type=tnt,r=100]

这个命令会移除半径 100 格内的所有 已点燃的 TNT 实体(即爆炸倒计时中的 TNT)。

如果你想移除 未点燃的 TNT 方块,需要用 /fill 命令替换它们,例如:
/fill ~-100 ~-100 ~-100 ~100 ~100 ~100 air replace tnt  方块太多

/fill ~-50 ~-50 ~-50 ~50 ~50 ~50 air replace tnt   方块太多

/fill ~-100 ~-100 ~-100 ~0 ~0 ~0 air replace tnt   方块太多

/fill ~-20 ~-20 ~-20 ~20 ~20 ~20 air replace tnt 方块太多

/fill ~-15 ~-15 ~-15 ~15 ~15 ~15 air replace tnt  可以用,但是范围太小

/fill ~-10 ~-10 ~-10 ~10 ~10 ~10 air replace tnt  可以用
天不生墨翟,万古如长夜!以墨运商,以商助墨。金双石科技长期招聘科技研发人才!微信:qishanxiaolu   电话:15876572365   公司:深圳市金双石科技有限公司
回复

使用道具 举报

 楼主| 崎山小鹿 发表于 2025-2-10 11:33:18 | 显示全部楼层
崎山小鹿
2025-2-10 11:33:18 看全部
execute if entity <目标选择器> run <要执行的命令>
execute → 让命令有条件地执行。
if entity <目标选择器> → 检查是否存在符合条件的玩家或实体。
run <要执行的命令> → 如果找到了符合条件的实体,就运行这个命令。
天不生墨翟,万古如长夜!以墨运商,以商助墨。金双石科技长期招聘科技研发人才!微信:qishanxiaolu   电话:15876572365   公司:深圳市金双石科技有限公司
回复

使用道具 举报

 楼主| 崎山小鹿 发表于 2025-2-12 15:26:11 | 显示全部楼层
崎山小鹿
2025-2-12 15:26:11 看全部
在创造区拿了TNT就会被困在传送点,房主会收到警报立刻赶来处理。

第一个命令方块(重复型 + 始终活动):
execute if entity @a[hasitem={item=tnt, quantity=1..}] run tellraw @a[hasitem={item=tnt, quantity=1..}] {"rawtext":[{"text":"⚠️ 警告!你携带了TNT!"}]}

第二个命令方块(连锁型 + 始终活动):
execute if entity @a[hasitem={item=tnt, quantity=1..}] run title @a[hasitem={item=tnt, quantity=1..}] title  §c⚠️ 警告!你携带了TNT!

第三个命令方块(连锁型 + 始终活动):
execute if entity @a[hasitem={item=tnt, quantity=1..}] run playsound random.orb @a[hasitem={item=tnt, quantity=1..}]

第四个命令方块(连锁型 + 始终活动):传送,出发方式有:1传送到创造区传送点,生存区传送点,禁闭室1传送点,熊孩子岛传送点,最终选择了比较温和的方式
execute if entity @a[hasitem={item=tnt, quantity=1..},scores={hasTotem=1}] run tp @a[hasitem={item=tnt, quantity=1..},scores={hasTotem=1}] 739 63 260

第五个命令方块(连锁型 + 始终活动):传送,出发方式有:1传送到创造区传送点,生存区传送点,禁闭室1传送点,熊孩子岛传送点,最终选择了比较温和的方式
execute if entity @a[hasitem={item=tnt, quantity=1..},scores={hasTotem=2}] run tp @a[hasitem={item=tnt, quantity=1..},scores={hasTotem=2}] 333 90 351

第六个命令方块(连锁型 + 始终活动):提醒房主
execute if entity @a[hasitem={item=tnt, quantity=1..}] run playsound random.orb 墨山游侠001

第七个命令方块(连锁型 + 始终活动):提醒房主
execute if entity @a[hasitem={item=tnt, quantity=1..}] run tellraw 墨山游侠001 {"rawtext":[{"text":"⚠️ 警告!有人携带了TNT!"}]}

第七个命令方块(连锁型 + 始终活动):提醒房主,发送私信给 房主,告诉谁携带了打火石
execute if entity @a[hasitem={item=tnt, quantity=1..}] run tell 墨山游侠001 ⚠️ 发现玩家: @a[hasitem={item=tnt}] 携带打火石!
天不生墨翟,万古如长夜!以墨运商,以商助墨。金双石科技长期招聘科技研发人才!微信:qishanxiaolu   电话:15876572365   公司:深圳市金双石科技有限公司
回复

使用道具 举报

 楼主| 崎山小鹿 发表于 2025-2-12 15:51:05 | 显示全部楼层
崎山小鹿
2025-2-12 15:51:05 看全部
在创造区拿了打火石就会被困在传送点,房主会收到警报立刻赶来处理。

第一个命令方块(重复型 + 始终活动):
execute if entity @a[hasitem={item=flint_and_steel, quantity=1..}] run tellraw @a[hasitem={item=flint_and_steel, quantity=1..}] {"rawtext":[{"text":"⚠️ 警告!你携带了打火石!"}]}

第二个命令方块(连锁型 + 始终活动):
execute if entity @a[hasitem={item=flint_and_steel, quantity=1..}] run title @a[hasitem={item=flint_and_steel, quantity=1..}] title  §c⚠️ 警告!你携带了打火石!

第三个命令方块(连锁型 + 始终活动):
execute if entity @a[hasitem={item=flint_and_steel, quantity=1..}] run playsound random.orb @a[hasitem={item=flint_and_steel, quantity=1..}]

第四个命令方块(连锁型 + 始终活动):传送,出发方式有:1传送到创造区传送点,生存区传送点,禁闭室1传送点,熊孩子岛传送点,最终选择了比较温和的方式
execute if entity @a[hasitem={item=flint_and_steel, quantity=1..},scores={hasTotem=1}] run tp @a[hasitem={item=flint_and_steel, quantity=1..},scores={hasTotem=1}] 739 63 260

第五个命令方块(连锁型 + 始终活动):传送,出发方式有:1传送到创造区传送点,生存区传送点,禁闭室1传送点,熊孩子岛传送点,最终选择了比较温和的方式
execute if entity @a[hasitem={item=flint_and_steel, quantity=1..},scores={hasTotem=2}] run tp @a[hasitem={item=flint_and_steel, quantity=1..},scores={hasTotem=2}] 333 90 351

第六个命令方块(连锁型 + 始终活动):提醒房主
execute if entity @a[hasitem={item=flint_and_steel, quantity=1..}] run playsound random.orb 墨山游侠001

第七个命令方块(连锁型 + 始终活动):提醒房主,发送私信给 房主,告诉谁携带了打火石
execute if entity @a[hasitem={item=flint_and_steel, quantity=1..}] run tell 墨山游侠001 ⚠️ 发现玩家: @a[hasitem={item=flint_and_steel}] 携带打火石!

天不生墨翟,万古如长夜!以墨运商,以商助墨。金双石科技长期招聘科技研发人才!微信:qishanxiaolu   电话:15876572365   公司:深圳市金双石科技有限公司
回复

使用道具 举报

 楼主| 崎山小鹿 发表于 2025-2-12 16:32:43 | 显示全部楼层
崎山小鹿
2025-2-12 16:32:43 看全部
激活红石电路
execute if entity @a[hasitem={item=flint_and_steel}] run setblock ~ ~1 ~ redstone_block

还真行,厉害


天不生墨翟,万古如长夜!以墨运商,以商助墨。金双石科技长期招聘科技研发人才!微信:qishanxiaolu   电话:15876572365   公司:深圳市金双石科技有限公司
回复

使用道具 举报

  • 您可能感兴趣
您需要登录后才可以回帖 登录 | 立即注册 |

本版积分规则 返回列表

管理员给TA私信
以墨运商,以商助墨。

查看:3252 | 回复:4

金双石科技,软件开发20年,技术行业领先,您的满意,就是我们的目标,认真负责,开拓进取,让成品物超所值
关于我们
公司简介
发展历程
联系我们
本站站务
友情链接
新手指南
内容审核
商家合作
广告合作
商家入驻
新闻合作

手机APP

官方微博

官方微信

联系电话:15876572365 地址:深圳市宝安区西乡街道宝民二路宝民花园 ( 粤ICP备2021100124号-1 ) 邮箱:qishanxiaolu@qq.com
QQ|Powered by Discuz! X3.5 © 2001-2024 Discuz! Team.
快速回复 返回顶部 返回列表