侧边栏壁纸
博主头像
绪山·真寻 的博客 博主等级

离谱🙃至极,博主是一只懒虫。

  • 累计撰写 27 篇文章
  • 累计创建 8 个标签
  • 累计收到 11 条评论

目 录CONTENT

文章目录

《从零开始的指令魔法课》第三期:实体编程与动态规则构建

绪山·真寻
2025-02-22 / 0 评论 / 0 点赞 / 10 阅读 / 0 字
温馨提示:
本站服务器由BUG 制造商提供服务器支持,CDN加速由绪山·真寻的资源站提供支持。
广告 广告

作者:绪山·真寻

第五章:人工智能核心——/execute条件分支革命

5.1 实体状态感知系统生物行为监控矩阵:// 检测跳跃中的玩家并给予缓降

execute as @a at @s if entity @s[nbt={OnGround:0b}] run effect give @s slow_falling 2 0 true

// 阻止末影人偷方块

execute as @e[type=enderman] at @s unless block ~ ~-1 ~ air run data merge entity @s {carriedBlockState:{}}

5.2 三维空间事件触发器动态天气告警系统:# 雷暴天气自动广播

execute unless weather clear run tellraw @a {"text":"⚡ 雷暴持续剩余时间:"+query.weather.remaining_time+"刻","color":"gold"}

# 雨天生成发光水母

execute if biome ~ ~ ~ minecraft:ocean if weather rain run summon glow_squid ~ ~1 ~ {Tags:["storm_jelly"]}

第六章:量子纠缠系统——/data指令与NBT操控6.1 实体记忆存取技术玩家行为分析器:// 记录最后交互的方块

execute as @a store result entity @s LastInteractedBlock string run data get entity @s SelectedItem.tag.display.Name

// 生成行为报告书

data modify block ~ ~-1 ~ Items[0].tag.pages append value '{"text":"玩家 "+@s+" 最后使用: "+LastInteractedBlock+"\\n"}'

6.2 动态属性重构术自定义重力系统:# 让鸡拥有铁砧下坠特性

execute as @e[type=chicken] run data merge entity @s {NoGravity:0b,Motion:[0.0,-2.0,0.0],OnGround:0b}

# 制作反重力药水

execute as @a[nbt={ActiveEffects:[{Id:25b}]}] run data merge entity @s {Motion:[0.0,0.5,0.0]}

第七章:跨次元通信工程——/trigger与JSON文本7.1 全服公告系统设计动态段位播报器:trigger set_scoreboard {objective:"Rank",min:1,max:5}

tellraw @a ["",{"selector":"@p"}," 的段位已提升至 ",{"score":{"name":"@p","objective":"Rank"}},"✨"]

7.2 NPC对话树架构智能村民交互系统:dialogue open @s villager.main {"text":"需要什么服务?","choices":[{"text":"交易","action":"run command tp @s ~ ~ ~1"},{"text":"闲聊","action":"run dialog villager.chat"}]}

下期预告《量子红石计算机》你将掌握:

•用 /blockdata 构建逻辑门阵列

•/scoreboard 实现32位整数运算

•配合结构方块加载可编程电路模板

维度改造训练(完成后可申请认证):

1. 创建当玩家手持玫瑰时脚下生成心形粒子的恋爱系统

2. 制作会根据昼夜变化切换材质的动态建筑

3. 搭建检测玩家移动方向自动旋转的机关迷宫

0

评论区