适用于1.9版本的彩字
引言:
不少玩家可能早已得知了禁用样式代码(§)的事情。【在此后本文中出现的'样式代码'会用符号'§'代替】
其实§并非为玩家本身就能输入的代码,而是Unicode(万国码)的副产品,曾经不少模组(例如Nihongo Mod)以此开发。
如今§禁用只是为了配合文本输入中的Json标签。
但是除了Json外,不少项目为了美观可能需要央视代码的帮助。
在曾经版本中,输入(单引号与加号不用输入,其间没有空格)
- '§'+'颜色值'
可以达到更改一行后全部(除非找到了另一个'§')文字的颜色。
(有关颜色值和样式代码,Wiki有详解:Wiki样式代码)
§的输入方法为
"Key.Alt"+"Num.0"+"Num.1"+"Num.6"+"Num.7"
但是在MC中不能直接输入(原因是MC禁用了输入万国码,除了英文字符其他特殊字符都无法输入)
但是感谢万国码在计算机中的强大的兼容性,复制(Ctrl+c)+粘贴(Ctrl+v)还是有效的。
到后来,Mojang声明了禁用后,上面CV大法也无法工作,而事情正好发展在指令快速发展的时期;
为了配合研究,大部分玩家也许放弃了样式代码,也许有些玩家依旧通过 内置NBT(CustomNBT Mod) 或者 外置NBT(NBTExplorer)修改
但是结果是麻烦。
其实原版是存在方法的,因为万国码的强大的兼容性,通过外置或者内置NBT都能达到修改效果,
所以虽然禁用了输入,但是依然能调用万国码中§的源码:
- \\\u00a7
然而又因为第三方的强制更改成功,说明样式代码其实是能够通过第三方修改的。
所以自然我们想到了游戏中第三方修改的指令——' /blockdata ' 与 ' /entitydata '
为了避免指令强制修改中指令被禁用,可以通过Json的' runcommand '代替实施,
所以最后便出现了本贴将介绍的牌子强更法(牌子指令强行更改)
- summon FallingSand ~ ~1 ~ {Block:command_block,Time:1,TileEntityData:{Command:/setblock ~1 ~ ~ wall_sign 5 replace {Text1:"{text:\\"Click\\",clickEvent:{action:\\"run_command\\",value:\\"blockdata ~-1 ~ ~ {Command:summon ArmorStand ~ ~1 ~ {Marker:1,NoGravity:1,Invisible:1,CustomNameVisible:1,CustomName:\\\u00a79fucker},}\\"}}"}}}
- summon ArmorStand ~ ~1 ~ {Marker:1,NoGravity:1,Invisible:1,CustomNameVisible:1,CustomName:\\\u00a79fucker}
- '§'+'颜色值'
- '\\\u00a7'+'颜色值'
- summon FallingSand ~ ~1 ~ {Block:command_block,Time:1,TileEntityData:{Command:/setblock ~1 ~ ~ wall_sign 5 replace {Text1:"{text:\\"Click\\",clickEvent:{action:\\"run_command\\",value:\\"blockdata ~-1 ~ ~ {Command:give @p minecraft:potato 1 0 {display:{Name:\\\u00a74PotatoMaster101,Lore:[\\\u00a75PotatoMaster101]}},}\\"}}"}}}
- give @p minecraft:potato 1 0 {display:{Name:\\\u00a74PotatoMaster101,Lore:[\\\u00a75PotatoMaster101]}}
- summon FallingSand ~ ~1 ~ {Block:command_block,Time:1,TileEntityData:{Command:/setblock ~1 ~ ~ wall_sign 5 replace {Text1:"{text:\\"Click\\",clickEvent:{action:\\"run_command\\",value:\\"blockdata ~-1 ~ ~ {Command:/replaceitem entity @p slot.hotbar.8 minecraft:diamond 1 0 {display:{Name:\\\u00a7bCBL,Lore:[0:\\\u00a73CommandBlockLogic,1:\\\u00a7eis A,2:\\\u00a72Great Team]}},}\\"}}"}}}
- /replaceitem entity @p slot.hotbar.8 minecraft:diamond 1 0 {display:{Name:\\\u00a7bCBL,Lore:[0:\\\u00a73CommandBlockLogic,1:\\\u00a7eis A,2:\\\u00a72Great Team]}}
a:["1","2","3"……"n"]
但是由于引号无法调用字符,所以我们不得不使用逗号隔开文本,或者使用行的序列号。
- a:[1,2,3……n]
- a:[0:"1",1:"2",2:"3"……n:"n+1"]
- summon FallingSand ~ ~1 ~ {Block:command_block,Time:1,TileEntityData:{Command:/setblock ~1 ~ ~ wall_sign 5 replace {Text1:"{text:\\"Click\\",clickEvent:{action:\\"run_command\\",value:\\"blockdata ~-1 ~ ~ {Command:setblock ~ ~1 ~ minecraft:dropper 0 keep {CustomName:\\\u00a76lol,Items:[{Slot:4b,id:minecraft:iron_sword,Count:1b,Damage:0s,tag:{display:{Name:\\\u00a77Sword,Lore:[1:\\\u00a7c中国制造]}}}]},}\\"}}"}}}
- setblock ~ ~1 ~ minecraft:dropper 0 keep {CustomName:\\\u00a76lol,Items:[{Slot:4b,id:minecraft:iron_sword,Count:1b,Damage:0s,tag:{display:{Name:\\\u00a77Sword,Lore:[1:\\\u00a7c中国制造]}}}]}
\\\u00a7c中国制造
可以得知样式代码兼容万国码。
- summon FallingSand ~ ~1 ~ {Block:command_block,Time:1,TileEntityData:{Command:/setblock ~1 ~ ~ wall_sign 5 replace {Text1:"{text:\\"Click\\",clickEvent:{action:\\"run_command\\",value:\\"blockdata ~-1 ~ ~ {Command:summon Villager ~ ~1 ~ {NoAI:1b,Equipment:[{},{},{},{},{id:skull,Damage:3,Count:1,tag:{SkullOwner:songfeitong}}],CustomName:\\\u00a7b\\\u00a7lSOFT,Profession:1,Willing:1,Silent:1b,Offers:{Recipes:[{maxUses:2147483647,uses:0,buy:{id:minecraft:potato,Count:1b,Damage:0s,tag:{display:{Name:\\\u00a74PotatoMaster101,Lore:[\\\u00a75PotatoMaster101]}}},buyB:{id:minecraft:diamond,Count:1b,Damage:0s,tag:{display:{Name:\\\u00a7bCBL,Lore:[0:\\\u00a73CommandBlockLogic,1:\\\u00a7eis A,2:\\\u00a72Great Team]}}},sell:{id:minecraft:sign,Count:1b,Damage:0s,tag:{display:{Name:\\\u00a73\\\u00a7l\\\u00a7nCBL,Lore:[0:\\\u00a7c?\\\u00a7c?\\\u00a7c?\\\u00a7c? \\\u00a79?\\\u00a79?\\\u00a79? \\\u00a72?,1:\\\u00a7c? \\\u00a79? \\\u00a79? \\\u00a72?,2:\\\u00a7c? \\\u00a79?\\\u00a79?\\\u00a79? \\\u00a72?,3:\\\u00a7c? \\\u00a79? \\\u00a79? \\\u00a72?,4:\\\u00a7c?\\\u00a7c?\\\u00a7c?\\\u00a7c? \\\u00a79?\\\u00a79?\\\u00a79? \\\u00a72?\\\u00a72?\\\u00a72?\\\u00a72?,]}}}}]}},}\\"}}"}}}
- summon Villager ~ ~1 ~ {NoAI:1b,Equipment:[{},{},{},{},{id:skull,Damage:3,Count:1,tag:{SkullOwner:songfeitong}}],CustomName:\\\u00a7b\\\u00a7lSOFT,Profession:1,Willing:1,Silent:1b,Offers:{Recipes:[{maxUses:2147483647,uses:0,buy:{id:minecraft:potato,Count:1b,Damage:0s,tag:{display:{Name:\\\u00a74PotatoMaster101,Lore:[\\\u00a75PotatoMaster101]}}},buyB:{id:minecraft:diamond,Count:1b,Damage:0s,tag:{display:{Name:\\\u00a7bCBL,Lore:[0:\\\u00a73CommandBlockLogic,1:\\\u00a7eis A,2:\\\u00a72Great Team]}}},sell:{id:minecraft:sign,Count:1b,Damage:0s,tag:{display:{Name:\\\u00a73\\\u00a7l\\\u00a7nCBL,Lore:[0:\\\u00a7c?\\\u00a7c?\\\u00a7c?\\\u00a7c? \\\u00a79?\\\u00a79?\\\u00a79? \\\u00a72?,1:\\\u00a7c? \\\u00a79? \\\u00a79? \\\u00a72?,2:\\\u00a7c? \\\u00a79?\\\u00a79?\\\u00a79? \\\u00a72?,3:\\\u00a7c? \\\u00a79? \\\u00a79? \\\u00a72?,4:\\\u00a7c?\\\u00a7c?\\\u00a7c?\\\u00a7c? \\\u00a79?\\\u00a79?\\\u00a79? \\\u00a72?\\\u00a72?\\\u00a72?\\\u00a72?,]}}}}]}}
§cX§nY (§c X §n Y)
其结果将会显示为: XY。然而,
§nX§cY (§n X §c Y)
则会显示为:XY
改为:
\\\u00a7cX\\\u00a7nY (\\\u00a7c X \\\u00a7n Y)
其结果将会显示为: XY。然而,
\\\u00a7nX\\\u00a7cY (\\\u00a7n X \\\u00a7c Y)
则会显示为:XY
首先需要学习牌子强行更改发,基本格式为:
- summon FallingSand ~ ~1 ~ {Block:command_block,Time:1,TileEntityData:{
- Command:/setblock ~1 ~ ~ wall_sign 5 replace {
- Text1:"{text:\\"Click\\",clickEvent:{
- action:\\"run_command\\",value:\\"
- blockdata ~-1 ~ ~ {Command:指令},
- }\\"
- }}"
- }}}
再就是最终修改的指令:
修改后的指令可以直接通过复制进入文本框。
Soft仅为彩蛋,并未给予出场费。
彩蛋:
如果你看到这里,那就给你一个
' 贰 ':
- summon FallingSand ~ ~1 ~ {Block:command_block,Time:1,TileEntityData:{Command:/setblock ~1 ~ ~ wall_sign 5 replace {Text1:"{text:\\"Click\\",clickEvent:{action:\\"run_command\\",value:\\"blockdata ~-1 ~ ~ {Command:summon ArmorStand ~ ~-7.53 ~ {Marker:1,NoGravity:1,Invisible:1,CustomNameVisible:1,CustomName:\\\u00a70?\\\u00a75?\\\u00a70?\\\u00a72?\\\u00a70?\\\u00a70?\\\u00a70?\\\u00a76?},}\\"}}"}},Riding:{id:FallingSand,Time:1,Block:command_block,TileEntityData:{Command:/setblock ~1 ~ ~ wall_sign 5 replace {Text1:"{text:\\"Click\\",clickEvent:{action:\\"run_command\\",value:\\"blockdata ~-1 ~ ~ {Command:summon ArmorStand ~ ~-6.3 ~ {Marker:1,NoGravity:1,Invisible:1,CustomNameVisible:1,CustomName:\\\u00a70?\\\u00a70?\\\u00a75?\\\u00a70?\\\u00a70?\\\u00a70?\\\u00a76?\\\u00a7e?},}\\"}}"}},Riding:{id:FallingSand,Time:1,Block:command_block,TileEntityData:{Command:/setblock ~1 ~ ~ wall_sign 5 replace {Text1:"{text:\\"Click\\",clickEvent:{action:\\"run_command\\",value:\\"blockdata ~-1 ~ ~ {Command:summon ArmorStand ~ ~-5.08 ~ {Marker:1,NoGravity:1,Invisible:1,CustomNameVisible:1,CustomName:\\\u00a70?\\\u00a79?\\\u00a75?\\\u00a79?\\\u00a70?\\\u00a76?\\\u00a70?\\\u00a7e?},}\\"}}"}},Riding:{id:FallingSand,Time:1,Block:command_block,TileEntityData:{Command:/setblock ~1 ~ ~ wall_sign 5 replace {Text1:"{text:\\"Click\\",clickEvent:{action:\\"run_command\\",value:\\"blockdata ~-1 ~ ~ {Command:summon ArmorStand ~ ~-3.85 ~ {Marker:1,NoGravity:1,Invisible:1,CustomNameVisible:1,CustomName:\\\u00a70?\\\u00a79?\\\u00a75?\\\u00a79?\\\u00a70?\\\u00a76?\\\u00a70?\\\u00a70?},}\\"}}"}},Riding:{id:FallingSand,Time:1,Block:command_block,TileEntityData:{Command:/setblock ~1 ~ ~ wall_sign 5 replace {Text1:"{text:\\"Click\\",clickEvent:{action:\\"run_command\\",value:\\"blockdata ~-1 ~ ~ {Command:summon ArmorStand ~ ~-2.65 ~ {Marker:1,NoGravity:1,Invisible:1,CustomNameVisible:1,CustomName:\\\u00a70?\\\u00a79?\\\u00a79?\\\u00a79?\\\u00a70?\\\u00a76?\\\u00a70?\\\u00a70?},}\\"}}"}},Riding:{id:FallingSand,Time:1,Block:command_block,TileEntityData:{Command:/setblock ~1 ~ ~ wall_sign 5 replace {Text1:"{text:\\"Click\\",clickEvent:{action:\\"run_command\\",value:\\"blockdata ~-1 ~ ~ {Command:summon ArmorStand ~ ~-1.42 ~ {Marker:1,NoGravity:1,Invisible:1,CustomNameVisible:1,CustomName:\\\u00a70?\\\u00a7a?\\\u00a7a?\\\u00a7a?\\\u00a70?\\\u00a76?\\\u00a70?\\\u00a70?},}\\"}}"}},Riding:{id:FallingSand,Time:1,Block:command_block,TileEntityData:{Command:/setblock ~1 ~ ~ wall_sign 5 replace {Text1:"{text:\\"Click\\",clickEvent:{action:\\"run_command\\",value:\\"blockdata ~-1 ~ ~ {Command:summon ArmorStand ~ ~-0.2 ~ {Marker:1,NoGravity:1,Invisible:1,CustomNameVisible:1,CustomName:\\\u00a71?\\\u00a71?\\\u00a71?\\\u00a71?\\\u00a71?\\\u00a76?\\\u00a71?\\\u00a71?},}\\"}}"}},Riding:{id:FallingSand,Time:1,Block:command_block,TileEntityData:{Command:/setblock ~1 ~ ~ wall_sign 5 replace {Text1:"{text:\\"Click\\",clickEvent:{action:\\"run_command\\",value:\\"blockdata ~-1 ~ ~ {Command:summon ArmorStand ~ ~1 ~ {Marker:1,NoGravity:1,Invisible:1,CustomNameVisible:1,CustomName:\\\u00a70?\\\u00a74?\\\u00a74?\\\u00a74?\\\u00a70?\\\u00a76?\\\u00a70?\\\u00a7b?},}\\"}}"}},Riding:{id:FallingSand,Time:1,Block:command_block,TileEntityData:{Command:fill ~1 ~ ~ ~1 ~8 ~ redstone_block}}}}}}}}}}
' 逼 ':
- summon FallingSand ~ ~1 ~ {Block:command_block,Time:1,TileEntityData:{Command:/setblock ~1 ~ ~ wall_sign 5 replace {Text1:"{text:\\"Click\\",clickEvent:{action:\\"run_command\\",value:\\"blockdata ~-1 ~ ~ {Command:summon ArmorStand ~ ~-7.53 ~ {Marker:1,NoGravity:1,Invisible:1,CustomNameVisible:1,CustomName:\\\u00a70?\\\u00a74?\\\u00a7d?\\\u00a7d?\\\u00a7d?\\\u00a7d?\\\u00a7d?\\\u00a7d?},}\\"}}"}},Riding:{id:FallingSand,Time:1,Block:command_block,TileEntityData:{Command:/setblock ~1 ~ ~ wall_sign 5 replace {Text1:"{text:\\"Click\\",clickEvent:{action:\\"run_command\\",value:\\"blockdata ~-1 ~ ~ {Command:summon ArmorStand ~ ~-6.3 ~ {Marker:1,NoGravity:1,Invisible:1,CustomNameVisible:1,CustomName:\\\u00a74?\\\u00a70?\\\u00a79?\\\u00a79?\\\u00a79?\\\u00a79?\\\u00a79?\\\u00a70?},}\\"}}"}},Riding:{id:FallingSand,Time:1,Block:command_block,TileEntityData:{Command:/setblock ~1 ~ ~ wall_sign 5 replace {Text1:"{text:\\"Click\\",clickEvent:{action:\\"run_command\\",value:\\"blockdata ~-1 ~ ~ {Command:summon ArmorStand ~ ~-5.08 ~ {Marker:1,NoGravity:1,Invisible:1,CustomNameVisible:1,CustomName:\\\u00a70?\\\u00a74?\\\u00a79?\\\u00a70?\\\u00a79?\\\u00a70?\\\u00a79?\\\u00a70?},}\\"}}"}},Riding:{id:FallingSand,Time:1,Block:command_block,TileEntityData:{Command:/setblock ~1 ~ ~ wall_sign 5 replace {Text1:"{text:\\"Click\\",clickEvent:{action:\\"run_command\\",value:\\"blockdata ~-1 ~ ~ {Command:summon ArmorStand ~ ~-3.85 ~ {Marker:1,NoGravity:1,Invisible:1,CustomNameVisible:1,CustomName:\\\u00a74?\\\u00a74?\\\u00a79?\\\u00a79?\\\u00a79?\\\u00a79?\\\u00a79?\\\u00a70?},}\\"}}"}},Riding:{id:FallingSand,Time:1,Block:command_block,TileEntityData:{Command:/setblock ~1 ~ ~ wall_sign 5 replace {Text1:"{text:\\"Click\\",clickEvent:{action:\\"run_command\\",value:\\"blockdata ~-1 ~ ~ {Command:summon ArmorStand ~ ~-2.65 ~ {Marker:1,NoGravity:1,Invisible:1,CustomNameVisible:1,CustomName:\\\u00a70?\\\u00a74?\\\u00a79?\\\u00a70?\\\u00a79?\\\u00a70?\\\u00a79?\\\u00a70?},}\\"}}"}},Riding:{id:FallingSand,Time:1,Block:command_block,TileEntityData:{Command:/setblock ~1 ~ ~ wall_sign 5 replace {Text1:"{text:\\"Click\\",clickEvent:{action:\\"run_command\\",value:\\"blockdata ~-1 ~ ~ {Command:summon ArmorStand ~ ~-1.42 ~ {Marker:1,NoGravity:1,Invisible:1,CustomNameVisible:1,CustomName:\\\u00a74?\\\u00a74?\\\u00a79?\\\u00a78?\\\u00a78?\\\u00a78?\\\u00a79?\\\u00a70?},}\\"}}"}},Riding:{id:FallingSand,Time:1,Block:command_block,TileEntityData:{Command:/setblock ~1 ~ ~ wall_sign 5 replace {Text1:"{text:\\"Click\\",clickEvent:{action:\\"run_command\\",value:\\"blockdata ~-1 ~ ~ {Command:summon ArmorStand ~ ~-0.2 ~ {Marker:1,NoGravity:1,Invisible:1,CustomNameVisible:1,CustomName:\\\u00a70?\\\u00a70?\\\u00a70?\\\u00a78?\\\u00a70?\\\u00a78?\\\u00a70?\\\u00a70?},}\\"}}"}},Riding:{id:FallingSand,Time:1,Block:command_block,TileEntityData:{Command:/setblock ~1 ~ ~ wall_sign 5 replace {Text1:"{text:\\"Click\\",clickEvent:{action:\\"run_command\\",value:\\"blockdata ~-1 ~ ~ {Command:summon ArmorStand ~ ~1 ~ {Marker:1,NoGravity:1,Invisible:1,CustomNameVisible:1,CustomName:\\\u00a76?\\\u00a70?\\\u00a77?\\\u00a77?\\\u00a77?\\\u00a77?\\\u00a77?\\\u00a70?},}\\"}}"}},Riding:{id:FallingSand,Time:1,Block:command_block,TileEntityData:{Command:fill ~1 ~ ~ ~1 ~8 ~ redstone_block}}}}}}}}}}
相关链接
Wiki样式代码
CP自定义头颅网站
Labs的8*8像素画
我的索引贴
依照此方法的编辑器:在线编辑器
软件下载:http://www.mcbbs.net/thread-443447-1-1.html
作者:空白(id:kongbaiyo)
使用方法:http://www.mcbbs.net/thread-443447-1-1.html
地址:http://www.mcbbs.net/thread-443447-1-1.html
指令复制编辑器
作者:本人
使用方法:
CBL at大法
@kongbaiyo @PotatoMaster101 @乾.坤 @pca006132 @songfeitong @sylqiuyifeng @C-青皮君
[groupid=546]Command Block Logic[/groupid]