minecraft防爆指令 tp指令

《我的世界》命令方块指令大全一览
日 来源:mcbbs 编辑:纯真
& &《》游戏中命令方块可以帮助玩家实现很多功能,游戏中命令方块该怎么用呢。都有哪些命令方块?下面小编为大家带来详细介绍,以供玩家参考。
& &命令方块用法:把命令方块放在地上,右击它,出来一个框框,然后输入想要的指令,再用红石激活它就可以了。
& &《我的世界》命令方块指令大全:
& &/give 给予人 物品id 数量 - 给予某人物品,如果不写数量则给予数量默认为64
& &/nick ID 名称 -给某人改一个名 ID是加白名单的名字
& &/backup -运行备份命令
& &/fireball -发射一个火球(会破坏方块)
& &/heal name -治疗某人
& &/invsee name -查看某人的包裹
& &/lingtning name -天谴(不填写名字会雷击鼠标指向的地方)
& &/mute name -禁言某人
& &/ping -乒乓
& &/seen name -查看某人最后退出的时间
& &/tp name1 name2 -将人物1传送至人物2身旁
& &/tp name -将自己传送至某人身旁
& &/tphere name -将某人传送至自己身旁
& &/tpall -将服务器内的所有人传送至自己身旁(大传送阵)
& &(上面四个命令需要对方在线,不需要对方同意)
& &/unlimited id -给予自己无限的某物品
& &/weather storm/sun time -改变天气,雷或晴天
& &/mmoedit name skname rank -如果安装了MC插件可以用这个命令改变某人的某项技能等级unarmed
& &【箭术】 - Archery
& &【斧头技能】 - Axes
& &【采矿】- mining
& &【修理】 - Repair
& &/foreen -在自己身旁形成
& &/pumpkins -在自己身旁形成南瓜林(带叶子的南瓜林)
& &/snow -在自己的身旁成为雪后的样子
& &/thaw -融雪(和冰)
& &/butcher -杀死附近的怪物
& &/tree 树形 -生成一棵树(树形不填也可以)
& &树形:big - 大树 ewquoia - 红木 Tall sequoia - 高大的红木
& &Birch - 衫树 Random - 随机
& &/up 高度 - 将自己提升到某高度,脚下用一块可能悬空的玻璃支撑
& &WorldEdit:
& &手拿木斧,左键一角,右键一角,两角之间的长方体为选择区域:
& &//set id - 将选中的区域变为某物品(如果是不可或者没有放置点的物品会成为被扔出的状态)
& &//undo - 还原上一次的WorldEdit行动
& &//redo - 还原上一次的//undo(这个说明可能有误)
& &//move x - 将区域移动x块。移动时需正对着区域与NEWS。
& &//move x up - 将区域向上移动x块
& &//move x down - 将区域移动x块
& &替换指令://replace xxx yyy(xxx是原来方块,yyy是替换方块)
& &复制指令//copy(你站在哪里复制的,等一下粘贴也会是相同位置出现)
& &粘贴指令://paste(注意站好位置)
& &输入围墙指令://walls xxx
& &ascend - 把自己提升到上一个平台
& &bind &命令& {命令关键字} - 设置一键命令
& &clear - 清空控制台
& &damage - 关闭或者开启伤害 即无敌
& &descend - 把自己移动到下面一个的平台
& &destroy [all] - 破坏当前的东西(背包)
& &defuse [all] - 拆弹(拆除已经点燃了的TNT炸药)
& &diff - X
& &difficulty - 设置游戏难度
& &drotore - 在身边创建一个储物柜
& &*drops - 开关物品掉落,关闭的话采矿打怪不掉东西。
& &dupe [all] - 复制东西
& &duplicate [all] - 复制手上的东西并丢出来
& &explode [范围] - 设置一个地方爆炸(在自家慎用)
& &extinguish [all] - 熄灭周围所有的火
& &ext [all] - 一样是熄灭火
& &falldamage - 开关高空落下伤害
& &firedamage - 开关火的伤害
& &fly - 模式
& &*freeze - 冻结怪物
& &give &物品& [数量] - 给一样物品
& &goto &名字& - 去一个地方
& &grow [all] - 让立即小麦成长
& &h [COMMAND] - 命令列表/帮助
& &heal - 补指定的血
& &health - 设置生命值
& &help [COMMAND] - 命令列表/帮助
& &home 回到出生点
& &i &物品代码& [数量] - 刷东西
& &instantmine - 开关采矿(采矿无延迟)
& &item &物品代码|物品名称& [数量] [费用] 给玩家物品, 如果不指定则是最大的数量
& &itemname - 显示当前手上的物品名称
& &itemstack &物品代码& [数量] - 给玩家指定数量的物品
& &kill 自杀不解释
& &jump - 瞬移到鼠标所指的地方
& &killnpc [all] - 杀死周围全部NPC 或者叫 杀了附近所有除自己外的活体生物
& &*light - 把光永久性关闭
& &listwaypoints - 列出所有路径点
& &macro &文件名& {参数} - 允许运行宏
& &maxstack [物品ID|物品名称|全部] [数量] - 最大的把某物品堆起来
& &*mobdamage - 怪物不会给你伤害
& &msg &消息& - 添加一个消息到控制台
& &music [] - 播放
& &noclip - 穿墙
& &p - 显示当前坐标
& &pos 现在玩家的坐标
& &reach - 玩家到指定地方
& &return - 传送到之前传送的地方
& &rem - 删除指定路点
& &removedrops [all] - 删掉地上物品
& &*rename - 修改命令名称
& &replenish [all] - X
& &repair [all] - 修复当前物品耐久
& &reset - 恢复默认设置
& &s &名字& - Same as /set
& &search &关键词& - 搜索物品名称
& &set &名字& - 在这世界标记一个路径点
& &setjump [JUMP|reset] - 设置跃的高度 落地伤害和移动 1:1
& &setspawn [ ] 设置当前位置 X轴 Y轴 Z轴
& &setspeed [速度|重置] - 设置移动速度
& &setspeed [速度|重置] - 设置移动速度
& &spawn [QTY] - 产生一个生物
& &spawnstack {NAME|ID|random} - 产生一个合体的怪物NPC
& &*superheat [all] - Turns items which are furnace-able into their furnaced form
& &t - Same as /tele
& &tele - 传送到此坐标
& &time [set|get|day|night [minute|hour|day [TIME]]] - 设置指定时间得到物品
& &timeschedule & - 设定一段时间段,让世界永远保持在这段时间之间- - 《凉宫春日漫无止境的八月》
& &unbind - 解除一个命令
& &useportal - 传送到地狱
& &waterdamage - 开关潜水伤害
& &world - 世界情报
& &world load - 加载指定的文件
& &world save - 保存退出游戏
& &world seed [SEED] - 给你看看你世界里有多少个方块
& &world new [FILENAME] [SEED] - 在指定位置创建新地图
& &world exit - 不保存退出游戏
& &world list - 列出所有存档 你可以去这看 &.minecraft/saves&
我的世界你感兴趣吗?
看完这篇文章有何感觉?
相关攻略及下载:8-178-168-168-158-157-307-297-287-287-27
48小时热门评论
一周热点资讯
小姐姐,人家也要这样的惊喜!你给我好不好? 玩了这么多年游戏,这些热武器的真相竟然是这样!
售价199元的“VR神器”,性能出色佩戴舒适。 约合人民币1700元,6.2英寸显示屏、4GB机身存储。
CopyRight&2004年-年 < 游迅网 All Rights Reserved
备案编号:沪ICP备号-6我的世界we指令大全 we所有指令一览_魔方网我的世界专区
你正在访问:
我的世界we指令大全 we所有指令一览
我的世界we指令大全由魔方网夏天精心整理,我的世界we指令大全为小伙伴们展现we所有指令一览,如果对于我的世界we指令有需要的玩家来看一看吧。
  我的世界we指令大全由魔方网夏天精心整理,我的世界we指令大全为小伙伴们展现we所有指令一览,如果对于我的世界we指令有需要的玩家来看一看吧。
  //limit
- 设置最大变化方块数(用于防止手贱多打几位数)
  //undo [#] - 撤销步
  //redo [#] - 重做步
  /clearhistory - 清除历史记录
  选择类指令
  //wand - 设定手中的 物品为选区工具(默认为木斧)左键选择第一个点,右键选择第二个点
  /toggleeditwand - 关闭选区功能,允许正常使用工具
  //sel - 选择你的选区形状
  cuboid: 立方体,左键选第一个点,右键选第二个点,选区为包括这两点的最小立方体
  extend: 扩展,左键选第一个点,右键选其他点,选区为包括所有点的最小立方体
  poly: 多边形,左键选第一个点,右键选其他点,选区为包括所有点的最小棱柱
  ellipsoid:椭圆体,左键选第一个点,右键选其他点,选区为包括所有点的最小椭圆体
  sphere: 球体,左键选第一个点,右键第二个点,选区为以第一个点为中心,两点连线为半径的球体
  cyl: 圆柱体,左键选第一个点,右键选其他点,选区为以第一个点为中心,包括所有点的最小圆柱体
  convex: 凸面体,左键选第一个点,右键选其他点,生成弧线专用选区工具(如果没有该指令请去下载最新版本的World Edit)
  //desel - 取消当前的选区
  //pos1 - 选择你脚下上方一格的方块为第一个点
  //pos2 - 选择你脚下上方一格的方块为第二个点
  //hpos1 - 选择你准星瞄准的方块为第一个点
  //hpos2 - 选择你准星瞄准的方块为第二个点
  //chunk - 选择你所在的区块(16&16&256)
  //expand
- 将选取向你正在看的方向延伸#格
  //expand
- 将选区向指定方向延伸#格 (north, east, south, west, up, down).
  //expand
[方向] - 将选区同时向两个方向延伸 (#1为选择的方向,#2为反方向)
  //expand vert - 将选区垂直延伸至最大(基岩到天空)
  //contract
- 将选取向你正在看的方向收缩#格
  //contract
[方向] - 将选区向指定方向收缩#格 (north, east, south, west, up, down).
  //contract
[方向] - 将选区同时向两个方向收缩(#1为选择的方向,#2为反方向)
  //outset
- 将选区向所有方向延伸#格
  //outset -h
- 将选区向东西南北方向延伸#格
  //outset -v
- 将选区向上下方向延伸#格
  //inset
- 将选区向所有方向收缩#格
  //inset -h
- 将选区向东西南北方向收缩#格
  //inset -v
- 将选区向上下方向收缩#格
  //shift
[方向] - 将选区向该方向移动#格
  //size - 显示所选择的区块大小
  //count
- 计算选区中该方块的数量
  //distr - 计算选区全部方块的信息
  //distr -c - 计算剪贴板中全部方块的信息
  选区变化指令
- 选区内填充方块
  //replace
- 将选区内非空气方块替换成该方块
  //replace
- 将选区内指定方块替换成该方块
  //overlay
- 将选区内覆盖一层该方块
  //walls
- 在选区内一圈生成围墙(没有屋顶和天花板)
  //outline - 生成墙,屋顶和天花板
  //smooth [#] - 将选区内地面平滑
  //deform - 以一定表达式变换选区
  //hollow - 将选区包含的区域挖空
  //regen - 重新生成选择区域
  //move [#] [方向] - 将选区向指定方向移动#格
  //move [#] [方向] [方块ID] - 将选区向指定方向移动#格,同时在原选区内填充方块
  //stack [#] [方向] - 向指定方向堆叠#次选区(不输入方向,默认为准星所对方向)(可以斜着堆叠)
  //naturalize - 将选区内地面覆盖三层泥土,下面是石头
  剪贴指令
  //copy - 复制选区到剪贴板,复制点相对于你所在的位置
  //cut - 剪切选区到剪贴板
  //paste [-ao] [-a] - 黏贴剪贴板内的选区,如果使用//paste -a 空气将被排除
  //rotate
- 旋转剪贴板内的选区
  //flip [方向] - 翻转剪贴板内的选区
  //schematic or //schem save []
- 储存剪贴板内选区到.schematic. (mcedit 是唯一可用格式)
  //schematic or //schem load []
- 载入schematic文件
  //schematic or //schem list - 列出所有schematics.文件
  //schematic or //schem formats - 显示所有可用格式
  /clearclipboard - 清空剪贴板
  生成指令
  //generate [公式] - 按照公式生成形状
  //hcyl
[高度] - 生成中空的垂直圆柱体
[高度] - 生成垂直圆柱体
  //sphere
[raised? true|false (default) - 生成球体
  //hsphere
[raised? true|false (default)] - 生成空心球体
  //pyramid
- 生成金字塔
  //hpyramid
- 生成空心金字塔
  /forestgen [半径] [种类] [密度] - 生成森林
  /pumpkins [半径] - 生成南瓜地
  基本命令:
  //set 方块ID - 放置
  //replace 方块ID 新方块ID - 替代
  //undo - 撤销操作,可以撤销多次
  //redo - 还原上一次操作
  //walls 方块ID - 造围墙
  可以在代码后跟方块ID,比如//walls 33%35,33%35:7,33%35:8,1%35:15 这样便可以生成四面材料按照比例随机分配位置的墙
  //sphere 物品ID 半径 - 实心球体
  //hsphere 物品ID 半径 - 空心球体
  //hcyl 方块ID 半径 - 圆圈
  //hcyl 方块ID 半径 高度 - 空心圆柱
  //cyl 物品ID 半径 高度 - 实心圆柱
  高级命令:
  //copy - 拷贝(记得站好位置)
  //paste - 粘贴
  //move x - 将区域移动x块。移动时需正对着你要移动的区域,他就会帮你移动到你正对的地方
  //move x up - 将区域向上移动x块
  //move x down - 将区域向下移动x块
  //rotate 角度 - 旋转
  //filps west、south、north、east、up、down - 翻转
  //brush smooth 半径 - 地形平滑
  //regen - 重新生成地形
  以上就是魔方网夏天带来的我的世界we指令大全,we所有指令一览,对此感兴趣的玩家不妨看一看。更多资讯请关注魔方网我的世界专区。
  传送门:
游戏类型:模拟经营运营商:Microsoft()游戏版本:8.56
魔方游戏宝
跨服交友 实时语音边玩边聊
定制工具 PK辅助解放双手
独家福利 超值礼包元宝道具
已领&100个
已领&250个
已领&500个
3D坦克争霸2
突破经典的飞行射击类精品手机游戏。继承了经典飞机大战简单爽快的操作体验,玩法更多样。这么好玩的游戏,确定不玩吗?来自Minecraft Wiki
此页面的(部分)内容需要被翻译。
你可以帮助我们来此页面
该文章需要整理以符合。
如果您可以,请帮我们来让它符合样式要求。
是一种帮助支持,SMP的自动化,和自定义地图。了解更多细节,请参见页。如果你不知道在某些命令中如何设置x,y,z的值最好先看看。
可以使用在许多事情,改变,改变的状态,或者给你预先指定的。他们在这些领域特别有用:/weather 和 /time set x 命令。他们只能在作弊模式之外。 /time set x 命令很有用,它允许你改变当前预定时间再按下一个开关。
命令方块也可以被用来使文本出现在人的聊天菜单。命令是 tell @p &message&, 或者 tell &username& &message&.,那么只有最近的玩家会看到信息. 而如果制定了一个username,那么对应的玩家会看到信息. 你也可以输入: /tell &your username& @p ,当有人走过时,它会跟你说:"@ whispers to you: &username&.
你可以用已下命令去改变难度 /difficulty x 0=和平,1=简单,2=普通,3=困难,或者在后面直接打上难度的名字。(例如:/difficulty peaceful)
另外一种使用命令方块的方法是使用代码/tp @p &目的地坐标&在两个不同的基地之间传送。
曲奇给予器 5000X
这个装置会给予一个随机玩家五个曲奇,然后告诉所有人。
首先创建一个(名字任意,注意除非在你测试时,不要显示它),比如说“cookie”(曲奇)
/scoreboard objectives add cookie dummy cookie
第一个命令方块的指令:
/scoreboard players set @r cookie 1
第二个和第三个指令(两者可颠倒,但要同时被激活)
/say @a[score_cookie_min=1] has been given 5 cookies.
/give @a[score_cookie_min=1] minecraft:cookie 5
第四个命令方块的指令
/scoreboard players set @a[score_cookie_min=1] cookie 0
"I" 代表输入红石信号端。(建议可使用循环红石电路)
You can teleport by using the /tp command, where y is the vertical difference between the upper and lower elevator entrances. The elevator can also be made to tp a player to any x y z coordinate just by leaving out the ~ before the numbers. When ~ is left in the command, the normal x y z is set to 0 0 0 where the command was made, such as standing on a pressure plate or wherever the player is standing when the command block received power. If a pressure plate was at the x y z coordinates of -36 96 -12 that ran to a command block with a command of /tp @p ~3 ~4 ~5 it would tp the player to the coordinates of -33 100 -7. The same outcome can be achieved by having the command of /tp @p -34 100 -8 one block must be subtracted from the x and z axis to get to the right coordinates.
Command blocks can also be used to make a security system. Just put a pressure plate which triggers a command block in front of an iron door, which will be the entrance to your house. Insert the command: /tp @p[r=&radius&,name=!&yourname&] &x& &y& &z&. For mobs, a simple fence or lava moat will do.
A similar concept to the elevator but made to move a player along the x or z coordinates. This can be created by:
Use the /fill command with your coordinates. (/fill x y z x2 y2 z2)
For the block you fill it with, use this:
command_block 1 replace {Command:/tp @p ~-1 ~ ~}
Edit the coordinates inside the brackets to change the direction you will move
Place pressure plates on top of all the command blocks.
Step on it
You might want to turn command block output off....the chat will explode in your face.
Note: As of 13w24a, there is a gamerule, doDaylightCycle, which can be used to obtain eternal day by typing in the chat, /gamerule doDaylightCycle false, and then /time set 6000.
and a minecart, you can skip nights using /time set 0. A minecart takes 31 seconds to fall through a cobweb. Therefore, by using 23 stacked cobweb with a
and several
will keep the sun in the sky.
Alternatively you can use an item de-spawning on a wooden pressure pad. The item de-spawns off of the pad every 5 mins, at this time it triggers a command block reset of the time to 0, also it triggers a dispenser (or dropper) to drop a new item on the wooden pad. 5 Mins is the day cycle and will trigger before mobs spawn. This method however is limited to 64x9 = 576 cycles = 48 IRL hours of gameplay with that chunk loaded. In the snapshot 13w01a and higher, hoppers are added into the game that can pick up items and deposit them into blocks with an inventory. A mob grinder can keep the dispenser full with gunpowder, arrows, and zombie flesh. Another technique is to simply use a command block to create the item out of thin air (e.g.: /summon Item ~1 ~0 ~1 {Item:brown_mushroom}). The advantage to this is that it has no 64x9 item limit like using dispensers does.
Both of these methods require the chunk to be loaded to allow the system to work.
Alternatively, you could connect the command block to a repeating redstone pulse, such as a five-clock, some type of loop, or a daylight sensor as seen on the right. To prevent this filling up the chat box, set the gamerule "commandBlockOutput" to false using the command /gamerule commandBlockOutput false. Note: This method can be used to set a variety of things by using a different command. (I.E. to have eternal sun, add another command block to the loop and use the command /weather clear)
Also, to make it toggle-able, use one of these designs, but put an
before the command block, with a lever on one side, and the mechanism on the other side.
is a more direct approach for eternal day.
The sensor deactivates the Redstone torch which will activate the Command Block which will set the time to 8000 when there's not enough light for the sensor to power the Redstone torch across the far distance. In other words, the Command Block will set the time to Noon when it's dark enough. The light level when the command will be activated varies with the distance of the Redstone wire. The time it sets to varies with the time typed in the Command Block.
To make it, first, you place the Daylight Sensor on an open area. Then you place some Redstone wire away from it. The distance of the Redstone wire depends on your need of precious time. You can only have a max of 15 blocks worth of Redstone wire away from the daylight sensor to send the signal to its destination. Next, you put a block on the other end of the Redstone. Put a Redstone Torch on the block's side and a Command Block on top of the torch. Right click the command block and start with "/time set" and enter a valid time value and the end. The value depends on when you want to set the time to. 14000 is night and 8000 is noon.
This design can be used in maps to keep it a certain time of day/night. This simple contraption can only be used in Creative mode or when you enable Cheats.
There is an alternative, more compact design. If you put a comparator facing away from the sunlight detector and a 15 strength redstone line (one redstone with a torch) into the second input. Then set the comparator to subtraction mode. The comparator will activate right after noon.
then right-click on it to set it to a night sensor. Add "/time set day" to the . Or if you want it to always be night, add a
and don't right-click it, then add "/time set night" to the .
Wireless Redstone can be achieved using s and the
system. The process involves using a scoreboard variable that is searched for by a command block attached to the output of a . A
is then used on the wireless output command block that will trigger when the variable is found true.
Wireless Redstone can also be achieved by using objectives instead of variables. If the output command block is set to try and remove a non-existent objective, a redstone signal can be created by adding said objective via command block or chat command. The advantage to this method over the variable method is that it is not dependent on players.
To do this, place a command block at the input and type the command: /scoreboard objectives add &objective name& dummy. At the output location, place a command block, type /scoreboard objectives remove &objective name&, hook it up to a clock, and put a comparator then a repeater leading out of the command block. Then just use the repeater as an output.
Off state.
On state command.
Off state command.
Wireless output setup.
Wireless output command.
Another way of having wireless redstone using the "/summon" command. The command used here is /summon FallingSand -118 150 -60.5 {TileID:76,Time:1,DropItem:0}
You can also achieve wireless redstone by using the / command instead of the scoreboard system. All you have to do is let the command block set a redstone_block to the destination coordinates - together with an air block (or anything that does not output a signal) being set to the same coordinates from a command block connected to the inverted signal.
This can be done with any block, technically, but buttons, levers, and other interchangeable blocks add an interesting effect. It's surprisingly simple, despite the mysteriousness on servers. It uses the 1.8 command testforblock. The setup is simply a command block, a comparator to translate the command into a redstone signal, a block to be tested for, and a clock to repeatedly activate the command block. Here's the example for a button:/testforblock 123 12 123 stone_button 10. You use the coordinates and name for the specific block you want to test for, in this case a stone button located at 123 12 123. This can be interchangeable for any block that changes data value. The number 10 after the coordinates corresponds the data value of the button that we want the command block to test for. In this case we want the command block to activate when a button facing west is pushed, so we set the value to 10.
Note: this value changes depending on which direction the button/lever is facing. The initial value for a button facing west that is not pressed is 2. When a button is pressed, it adds a value of 8 to the initial state, so a button facing west when pressed would then have a data value of 10. Refer to:
for the data values.
By using m=, you can make a kit on a server/custom map that can only be obtained once! First, dig 3 squares down in the ground, then place a row of command blocks (one for each item in the kit). In the GUI, type /give[m=&starting gamemode, in number form&] &item id& &amount&. Do this for each item you wish to give. Make an extra command block that has the command /gamemode &a different gamemode than the starting mode&, then string redstone across all of the command blocks (this can be done easily by sneaking and placing). Fill in the hole and place a pressure plate over it. When players walk over it, they will get the desired kit of items and it will change their gamemode so they cannot receive it anymore (unless cheats are used) (Note: This method can also be done by using the method above only using (First name your kit do /scoreboard objectives add &kitName& dummy &kitName&) scoreboard commands! /give @p[score_&kitName&=0] &item id& &amount& for the row of command blocks giving you the items and /scoreboard players add @p &kitName& &any number greater than 0& to make it a one time use. Also you can make more than one kit if you repeat the steps and use a different &kitName&).
是不是已经厌烦了压力板只有四种材质可用了呢(石质,橡木质,铁质和金质)?现在你可以不再为这个问题困扰了。你可以使用包含指令/,区域大小的带有时钟电路的命令方块来代替压力板了。命令/testfor @p[r=2]会检测2格内(朝任意方向两个方块加上命令方块本身的区域内)是否有任意玩家。当命令方块在一层地板下面的时候,r=2刚好是希望达到的效果。记住玩家是在一个球形区域内(而不是方形区域)触发这个命令的,所以r=2的区域大约是5*5*5,r=1的区域大约是3*3*3(其实更像是一个+号上下各加一个方块)。你可以用dx,dy,dz这些参数来编辑指令。你也可以在代码里指定xyz坐标(比如/testfor @p[x=50,y=64,z=46,r=1]),但是注意不能把区域缩小到一个方块。因为在不包含坐标的指令中区域大小代表着命令方块本身加上周围r个方块厚的区域,对于命令方块来说比较合理(如果缩小到只有一个中心方块,那就只有你站在命令方块那个位置时才会触发指令了,所以并不合理)。至少来说一个r=1的触发区域(即+号上下各加一个方块)可以被埋在地层下,只露出上表面,前提是你知道玩家不可能在地表下两层的位置行走。如果实现这一效果且不使用xyz坐标则要求命令方块嵌在地表上,可以被玩家看到。
By swapping gamemode it is possible to use command blocks in single player outside of creative mode. Simply swap to creative mode with the /gamemode 1 command, set the command block command to whatever you want, then swap back to /gamemode 0. The command block only needs to be set in creative, but will still function once back in normal.
It can also be used to teleport to certain areas (for ex. a far-away Stronghold, a deep mining operation, or a floating island). If it took you a very long time to get there, and if you don't mind sort-of cheating, then you can set up a teleport system. Make sure that you are on Creative mode while setting it (use the command /gamemode 1. If you don't have cheats enabled, open the LAN and set the cheats on), but you can still activate it in Survival mode. Type this command in when having the Command Block GUI open /tp @p x y z . Then, activate the command block with redstone (including buttons, levers, and pressure plates), and you will be sent to your far-away destination. You can set up multiple different teleports. This can also be used when doing a big project that spans over a very large area or if you are transferring chests to from an old house to a newer house.
如果一个人希望创造一个单人玩家的探险地图,做 /publish命令来让其他的命令(见下方)被使用。
这个章节详细介绍了在多人游戏中的应用。
通过 /tp指令,可以制作一个所有人都可以使用的传送装置。可以在每个地方都使用。 例如,在整个世界里做一个庞大的传送系统,所有的传送点入口都汇集到传送大厅中,而传送大厅可以进入每个传送点入口处进而达到出口。这样就可以建造一个“快速交通中心”了。
"定格动画"
通过使用/tp,或者Minecraft地图编辑器,例如MC地图编辑器可以复制一张图片(利用方块做出来的绘画),然后粘贴到一处遥远的地方,并变动绘画的一些方块,利用一些压力板或者绊线钩,在玩家短时间欣赏绘画后,命令方块做出/tp指令,将玩家传送到下一张绘图点. 如果大量的复制粘贴这样的零件,让玩家按顺序的在这些之间传送并稍稍弄出一点点的延迟,那么玩家就会产生幻觉,认为这个绘画是在运动的(甚至认为是某MOD做出来),这就是利用命令方块来实现定格动画技术。
1.7+里可以使用/setblock来直接放置和删除方块,利用/setblock还可以免除传送时不必要的卡顿和一大堆的房间,而1.8+的/fill更是可以极其方便地放置大量的方块。
用/give @r命令,可以创造一个抽奖。但是记住, /give命令是直接把物品放进他们的背包,而不是放在他们面前。
通过连接高频红石到一个命令方块和用/tp命令,你可以强制玩家留在某个地方。如果你想让这个方法成为可行的,在你的聊天窗内使用指令/gamerule commandBlockOutput false.。使用"Range"(最大范围)和"Minimum Range"(最小范围)两个参数,你可以在玩家离开一定距离后再将他们传送回来。
只针对管理员
如果使用参数[m=1],那么只有创造模式的玩家才会受到这条命令的影响,当然输入m=0既只对生存模式的玩家有效。
戏弄创造模式玩家
你可以放置一个命令方块,输入“/tp @p[m=1] &坐标&”或者一些整人命令。当创造模式的玩家激活这个命令方块就会被传送到某个地方或者变成生存模式,好无聊的恶作剧!
注:使用AutoMessage等服务端插件就可以达到自动公告的功能
通过在命令方块中使用 /me,可以创造一个无人自动广播(需要连接循环红石等不断发出激活信号的红石元件),不需要OP,用1.7+的新指令/tellraw {text:"&信息&"}可以免除开头的[@]并且可以做到悬浮事件和点击事件等。
注:大部分服务器管理插件支持封禁危险物品。
使用 /clear指令, 你可以清除玩家背包中的某物品。具体步骤是这样的,使用 /clear @a(或者某玩家ID) &清除的物品名&。如果想实现自动清理危险品需要连接循环红石。
使用/say @p,命令方块就能报告最近的玩家。如果命令方块放在终点线后,他会很方便的说出赢家,但是/say会给所有玩家发送信息,为了防止刷屏,建议使用/tell或/tellraw。
建立保护区域
注:Residence等服务器领地插件的拓展插件可以实现领地内游戏模式的变化。
你可以通过命令方块创造一个“创造/生存模式区域”,但是很繁琐。可以通过用命令方块的范围限制来制作一个“围栏”,通过围栏的玩家会变成生存或创造模式。在命令方块中输入指令 /gamemode 2 @a[x=&区域中心坐标& y=&区域中心坐标& z=&区域中心坐标& r=&最大的玩家搜索半径& rm=&最小的玩家搜索半径&] 这样放置两个搜索区域不重合的命令方块,就可以将规定半径内的玩家改变模式。
使用指令 /gamerule keepInventory true 来关闭玩家死亡后的物品掉落(同样在重生后会保留物品和经验等,所以需要在玩家重生后清空背包) 。使用 /give @p &物品ID&可以给予玩家武器(可以添加NBT标签),你可以设计一套完善的职业系统,玩家选择不同的职业会有不同的装备。使用 /spawnpoint [x y z坐标] 设置玩家重生地点,使用 /tp [x y z坐标]移动地图中的玩家到指定区域。
新手工具包
你可以很简单的给新手工具包不用任何插件使用命令方块: "/give @p[r=2] 274". 为了防止有人第二次按下按钮得到他们的工具包,您可以设置按钮激活两个命令方块:: 1. "/give @p[r=2,m=2] 274" 2."/gamemode 0 @p[r=2]"(玩家一开始是冒险模式,获得工具包后调成生存模式,然后再限定工具包仅限冒险模式能拿即可)
特殊的彩字
虽然你不能够直接输入彩色/粗体/斜体文本到命令方块中,但是通过McEdit滤器可以编辑那些服务器内的文本。
同时/tellraw可以直接利用color等参数来弄出彩色字体
当玩家走上踏板时,他能触发命令方块 /say @p &警告内容&
如果某个玩家在服务器有着过人的贡献或者有元老资历,但却不足给他管理,你可以奖励他一组钻石或者一些奇怪的东西.... 创建一个只有通过传送指令才能进入的房间,将有卓越贡献的玩家传送进去,玩家会激活房间中的命令方块从而获得奖励,而后他又会被另一个命令方块传送回原地,如果服务器允许/back的话,连续2次传送到原点,这样/back就无效了。(可以避免玩家二次领取奖励)
使用/toggledownfall和/weather thunder来开始或者结束降雨(雷雨。)合理安排这个指令的权限会十分有用, 你可以顺随自己的意愿开始或停止降雨。这个技术可以用于村民和一些由降水控制的红石机械,不用输入任何指令就可以控制天气(需要管理员激活命令方块自动执行), 合理利用将会十分有效,比如在森林火灾时或者在雨天刷怪
使用/tp @p 和 /give @p,你可以制作一个障碍赛跑或者奖励迷宫,游戏结束后就将玩家传送汇出生点或其他地方。
在地图上模拟两个十分相似的环境,通过命令方块将玩家从一个传送到另一个,并且时间也会被设置为开始的时刻,这就好像是时间倒退。 注:可以广泛用于剧情RPG地图。
使用指令/testfor @p[r=&检测范围&,name=&玩家名(如果没有限制可不写)&] 使用红石中继器连接命令方块和TNT,当命令方块检测到有玩家经过就会激活TNT!Boom! 注:命令方块的/testfor指令为一次性指令,命令方块检测到一次就会一直输出信号,如果需要多次性的话,你可以直接使用/summon召唤出TNT。
通过使用 /testfor @p[r=5,name=&房主&],命令方块会在一定范围内检测房主并且为他开门,也只会为他开门。 注:命令方块的/testfor指令为一次性指令,命令方块检测到一次就会一直输出信号。
这一节详细介绍了命令方块在自定义地图的应用。
Minecraft中使用大量命令方块的地图有很多优势。 比如:SethBling's TF2 Map
另一个优秀的应用例子是 Hypixel's Gladiator Arena,这个地图中的战斗职业系统完全依赖于命令方块。
“沉默的”命令方块
在地图中控制命令方块不输出提示信息很重要,这可以保持玩家对地图的未知性和剧情的隐蔽性,如果玩家看到了各种指令的提示信息,地图将会索然无味。 关闭命令方块输出信息(除非是/say这类的指令)使用/gamerule commandBlockOutput false就可以实现。
庇护所/角斗场
使用压力板或者绊线 (以安全城堡为例)设置进入城堡内的玩家为和平模式(对于不同区域视情况而定)。城堡大门可以有连接命令方块的绊线,玩家一旦走过绊线,激活命令方块,就会变为和平模式,这样就可以创造一个“避难所”。反之,你可以用同样的方法创造一个“困难模式区域”,所有玩家进入会变为困难模式。
对于不同游戏模式玩家的控制
使用值[m=1]你就可以设置指令只对创造模式的玩家有效,生存模式就是[m=0]。 例:传送所有创造模式的玩家到254,47,-874,使用的指令为 /tp @a[m=1] 254 47 -874
“联合”住宅
在房间的入口或者出口设置一个 /tp 指令的命令方块,你不必将你的建筑都在同一个地方建设,它们可以在任何地方,只需要入口的命令方块传送过去,玩家会忽然觉得外面感觉很小的建筑内部空间竟如此之大。用这种方法联合多个建筑,可用作与服务器或单人地图中的场景瞬移。
使用 /spawnpoint 可以设定玩家出生地点。(应用十分广泛,PVP地图,RPG地图等等)
之前的内容提到过,/gamerule keepInventory true可以在玩家死后保存背包物品。 在跑酷地图的出发点设置一个这样的命令方块,就可以使掉落熔岩死亡的玩家不会丢失物品,同时记录点可以用/spawnpoint来做。
我要睡觉!
使用 /spawnpoint 可以直接设置出生点,但是要跳过白天就需要 /time set &时间& 指令,18000为夜晚(并非绝对,可以按喜好设置,不要少于12500),这样就可以模拟出睡觉的效果了。(可用/time set 700 直接转为白天,/spawnpoint指令和/time set 700配合不就行了么?)
时间和天气下的场景
比方说,你的地图开始在一个寒冷的暴风雨之夜,你可以设置突然天晴了,外面有灿烂的阳光(光影mod么?)!或者,如果你想开始一个光明的一天,想让雨突然下起来又没办法?不要怕,有/weather指令。只需使用/weather,输入就行了!你也可以使用/time set输入:0是凌晨,6000是中午,12000是黄昏,18000是午夜(月亮还挂在头上呐!)。
检测玩家是否切换到了和平模式
创建一个攻击型生物,把它放在压力板上。(请确保它会保持始终按下状态,所以一定要确保它不能跳或走开)。做一个红石电路,让压力板在没有接收到红石信号的时候激活命令方块。命令方块里设置一个消息,通知玩家的地图由于和平模式了已经损坏,需要的怪物已经消失,必须重新下载这个地图。你甚至可以做一个隐形传输命令方块,把那些故意切换到和平模式的玩家换成冒险模式后传送到一间基岩屋内,并让他不能使用/kill或/tp指令,并把他的重生点设在那个房子里,让他永生见不得光明!(单人的话,可以点“对局域网开放”,或用修改器)
Talking Adventure Map(featuring an easy Quest System!)
/say指令非常有用因为它可以直接给玩家发送消息. 用将会更好,这样你就不需要放很多的告示牌和编页码长到不行的书来告诉玩家游戏规则. 你只需要把命令方块放成一条线然后在中间铺中继器来弄各个语段之间的延迟(so the player isn't spammed)接着你就可以把那堆告示牌和放着书的箱子移走。
有一些是和NPC配合使用的. 想象一下你进了铁匠铺并且你想要让里面的铁匠说些什么。在命令方块出现之前, 你需要一些书和告示牌来充当对话的效果, 然后在铁匠铺里造些房间并放些杂物,这样会让这个铁匠铺看起来变得非常乱,但是现在,你只需要使用/say命令来制造铁匠说话的效果. Maybe a pig behind the counter will even beg for mercy! Let's take another example: you are in a factory and an alarm suddenly rings and says that it's going to explode. Having it in the chat, especially if the text is long, keeps the same thing works for bomb timers. The player will get more into the map's mood if the chat displays '10...' '9...' '8...' also.
Last but not least, it makes it easier to create a Quest System. Let's say the player gets in a butchery. He activates through a pressure plate connected to a RS NOR Latch (so it can't be activated twice) and a command block with the /say command in which the butcher asks for the player's help: he needs to kill a pig (shame on him). The player gets to the pig that is standing on a stone pressure plate, that turns off when the pig is dead. So, when the player gets back to the butchery, he activates another circuit containing yet another RS NOR Latch and two command blocks with two commands. First, the /say command in which the butcher thanks the player, and other one, the /give command, so the player gets the reward. Along with that, don't forget to use the @p command so the butcher says the player's name. For example, if the command block is set to do this: /say Thanks, @p. You helped me a lot killing that pig., the channel will say: "@]: Thanks, &name of the player&. You helped me a lot killing that pig." This makes the map way cooler and looks like it's made for the player as it says his/her name!
使用/give @p[lm=(等级)] (物品) (数量)和/xp -(等级)l @p[lm=(等级)] ,你可以创建一个使用经验交易物品的商店系统。例如,如果你创建了一个使用/give @p[lm=5] 2 64的命令方块以及一个使用/xp -5l @p[lm=5]的命令方块,并把它们连接到同一个红石电路,那么激活时就会从最近的玩家身上扣除5级经验并给他64个草方块。
* Subtracting xp CAN work as a currency, by using the command /xp -3l @p[lm=3] where l (L for level) is subtracted. The minimum xp for the command to work can be listed inside the brackets, where lm is short for minimum level necessary.
You can make a Store using xp as a currency. Just place a command block before all the others with the following instructions: /testfor @p[lm=5] with a Comparator in front of the command block. That way you can only do the trade if you're at least at level 5 (in this case, but you can choose what level you want).
*The last two "updates" are pointless, as the [lm=(level)] in the first post will keep players from getting the item or losing their xp unless they are that level or higher. so if the command says [lm=5], they will NOT be able to use the "store" if they are level 4 or below, but WILL be able to if they are level 5 or above.
The blocks must be in order for this to work. If the blocks are powered at the same time, the cost block will subtract as per normal, but the block giving the item will not function unless your level is double or higher what the cost of the block is. (example: item costs 5, you have 7 levels, you will lose the 5 levels, but will not gain the item. You would only receive the item if your starting level is 10 or higher) The fix for this is to power the blocks linearly, give block first followed by xp block.
Minecarts over floating rails created with the setblock command.
在1.7版本中, the command block gained an expanded potential. 也就是 /summon and /setblock 命令的添加, and can be used to automatically build structures, 填充箱子, 以及生成以前不能生成的实体。 下面是这些命令的语法: setblock的使用方法:/setblock &x& &y& &z& &方块名& [数据值] [旧方块处理方式] [数据标签] summon的使用方法:/summon &实体名& [x] [y] [z] [数据标签] setblock指令也可以用于做突然消失的地板或突然出现的墙。
setblock指令的例子:
* MobSpawners pt 1: The Basics This code will create a zombie spawner 2 blocks from you in the x direction. Note that the name given for mob spawners in this code ("minecraft:mob_spawner") is the long version and you can leave out the "minecraft:" part.
/setblock ~2 ~0 ~0 minecraft:mob_spawner 0 replace {EntityId:Zombie}
This next code is also pretty basic but it includes the 6 basic parameters that can be set.
/setblock ~0 ~-1 ~-3 mob_spawner 0 replace {EntityId:Skeleton,SpawnRange:4,RequiredPlayerRange:16,SpawnCount:4,MaxNearbyEntities:6,MinSpawnDelay:200,MaxSpawnDelay:800}
A few things to note:
A) All times are in game ticks (20ths of a second). 200-800 is 10-40 seconds.
B) Keep in mind that they are in groups of 2 and won't work if their partner is missing. SpawnRange requires RequiredPlayerRange (and vice-versa), MinSpawnDelay requires MaxSpawnDelay, and I assume SpawnCount needs MaxNearbyEntities (although I haven't actually heard confirmation on that last one).
C) There is also a parameter called "Delay" which contains the amount of time before next spawn (20 ticks for the first time, whatever random number it picks between MaxSpawnDelay and MinSpawnDelay every other time).
D) the coordinates given are ~0 ~-1 ~-3 (so 3 blocks in the negative Z direction from the commandblock's current position and 1 block down). This presumably will imbed it in the surface of the floor. Keep in mind that a spawners "SpawnRange" setting only applies horizontally not vertically. Vertically it will only spawn at the same height or 1 lower or higher, so imbedding it in the surface of the floor cuts the available spawn area by 2/3rds (but can help hide it). Naturally occuring spawners have their height cut by 1/3rd due to appearing 1 block above the floor instead of 2.
E) All the values used here are the defaults.
* MobSpawners pt 2: Custom monsters Now we get into the SpawnData. That's the stuff that tells the spawner you want a non-standard version of a monster, like a Zombie with a Diamond Sword and a Chainmail Helmet.
/setblock ~ ~1 ~ mob_spawner 0 replace {EntityId:Zombie,SpawnData:{Equipment:[{id:276,Count:1},{},{},{},{id:302,Count:1}]}}
Using ~ without any number after it in the coordinates counts as zero. Since none of those 6 parameters from last example are used they will all be defaults.
Note that the 5 equipment slots are: Hand, Boots, Legs, Chest, Helmet. You must even specify empty slots (the { }, parts) unless they're after the last non-empty slot. So if you want him to have a helmet you have to specify all 5 slots, but if it's just a weapon you can leave off the other 4. Or if you want him to have leg armor you have to specify weapon and boot slots but not chest and helmet slots.
By the way, creatures that burn in sunlight are safe if they have a helmet on, although it damages the helmet instead.
About the Count tag: most codes can get away with leaving it out, however it is important. An item without a count tag is a stack of zero, better known in the community as a "Ghost Item". A player trying to use a ghost item will have it disappear out of his hands with it's first use (which is a failure). While monsters can use ghost items without problem (hence why codes get away with leaving it out sometimes) if they drop the items the player who picks it up won't be able to use it, SO INCLUDE COUNT!
Next up we have a Skeleton with an enchanted bow (Flame), a custom mobhead (Spider, internet connection required or it's just steve) with Protection 2, and riding a Skeletal Horse.
/setblock ~2 ~1 ~2 mob_spawner 0 replace {EntityId:Skeleton,SpawnData:{Equipment:[{id:261,Count:1,tag:{ench:[{id:50,lvl:1}]}},{},{},{},{id:397,Count:1,Damage:3,tag:{ench:[{id:0,lvl:2}],SkullOwner:MHF_Spider}}],Riding:{id:"EntityHorse",Type:4,Tame:1,SaddleItem:{id:329,Count:1,Damage:0}}}}
Well actually sitting on a Skeletal Horse, since the lower creature controls the movement and the horse isn't hostile. Don't try zombies on horseback, they just sit there ineffectually while the horse eats grass and snorts. Luckily this is a skeleton and can shoot you from wherever the horse decides to wander.
As for the horse itself, it's type 4 (skeletal horse), Tame is set to 1 (yes), and it's got a saddle (and the fact that they make us specify which saddle hints that they may eventually have more than one type). Technically you can have multiple levels of riders, although this gets silly quickly.
MobSpawners pt 3: SpawnPotentials Using the SpawnPotentials tag lets us create a mobspawner with multiple mobs in it. It will randomly pick one each time it resets the timer (a second after spawning the previous mobs). Since these codes contain multiple mobs they tend to be quite long codes. Thanks to some youtuber whose name escapes me (Dragnoz) the fact that you can "break up" your code is known (command blocks ignore line breaks, so you can start a new line to clarify where one section ends and another begins and it won't ruin your code). Here's a more easy on the eye version of a SpawnPotentials code
/setblock ~0 ~1 ~1 mob_spawner 0 replace {EntityId:Zombie,SpawnRange:6,RequiredPlayerRange:12,SpawnCount:1,MaxNearbyEntities:6,MinSpawnDelay:100,MaxSpawnDelay:600,SpawnData:{Equipment:[{id:268,Count:1},{id:301,Count:1},{id:300,Count:1,tag:{display:{color:5013401}}},{id:299,Count:1,tag:{display:{color:6717235}}},{id:397,Count:1,Damage:3,tag:{SkullOwner:Reimac}}]},SpawnPotentials:[
{Type:Zombie,Weight:4,Properties:{Equipment:[{id:268,Count:1,Damage:58},{id:301,Count:1},{id:300,Count:1,tag:{display:{color:5013401}}},{id:299,Count:1,tag:{display:{color:6717235}}},{id:397,Count:1,Damage:3,tag:{SkullOwner:Reimac}}]}},
{Type:Skeleton,Weight:2,Properties:{Equipment:[{id:267},{id:301,Count:1,tag:{display:{color:1644825}}},{id:300,Count:1,tag:{display:{color:1644825}}},{id:299,Count:1,tag:{display:{color:1644825}}},{id:397,Count:1,Damage:3,tag:{SkullOwner:2insanepeople}}]}},
{Type:Zombie,Weight:4,Properties:{Equipment:[{id:272,Count:1},{id:305,Count:1},{id:304,Count:1},{id:303,Count:1},{id:397,Count:1,Damage:3,tag:{ench:[{id:0,lvl:2}],SkullOwner:Flixnore}}]}},
{Type:Zombie,Weight:4,Properties:{Fire:2400,Equipment:[{id:283,Count:1,tag:{ench:[{id:20,lvl:1}]}},{id:317,Count:1},{id:316,Count:1},{id:315,Count:1},{id:86,Count:1,tag:{ench:[{id:0,lvl:2},{id:1,lvl:10}]}}]}},
{Type:Zombie,Weight:4,Properties:{Equipment:[{id:267,Count:1,tag:{ench:[{id:16,lvl:2}]}},{id:309,Count:1},{id:308,Count:1},{id:307,Count:1},{id:397,Count:1,Damage:3,tag:{ench:[{id:0,lvl:2}],SkullOwner:2zqa}}]}},
{Type:Zombie,Weight:1,Properties:{Equipment:[{id:278,Count:1,tag:{ench:[{id:16,lvl:4},{id:17,lvl:4},{id:18,lvl:4},{id:21,lvl:3},{id:34,lvl:3}]}},{id:313,Count:1,tag:{ench:[{id:1,lvl:4},{id:2,lvl:4}]}},{id:312,Count:1,tag:{ench:[{id:3,lvl:4}]}},{id:311,Count:1,tag:{ench:[{id:0,lvl:4}]}},{id:397,Count:1,Damage:3,tag:{SkullOwner:MHF_Herobrine,ench:[{id:0,lvl:4},{id:1,lvl:4},{id:3,lvl:4},{id:5,lvl:3},{id:6,lvl:1}]}}],CustomNameVisible:1,CustomName:Herobrine,PersistenceRequired:1}},
Wow that's a mouthful! But then it is 6 separate mobs. In order we have:
0) Before the "SpawnPotentials" tag: The starter, which will never pop up again after the first time. If we want to see him again we have to include him a second time under SpawnPotentials. He is just some random dude in bluejeans (blue dyed leather leg armor) and a cactus green shirt (green dyed leather tunic) with a wooden sword. He's a zombie under that random-dood-mobhead of his of course. They all are.
1) Same random dood, only this time his wooden sword is 2 hits away from breaking.
2) Hey who let a ninja into the game?!? This one is a skeleton under his mask, but he's been given an iron sword. All his leather armor is dyed ninja-black. Skeletons with swords close the gap quicker than zombies so watch out.
3) Stone Sword and Chain Armor guy. Protection II on his mobhead.
4) One of my favorites. Gold Sword, Golden Armor, Pumpkin Helmet, and ON FIRE!!! Originally I wanted to give him a flaming pumpkin helmet but I realized the Fire tag only applies to entities not armor. The pumpkin is enchanted with Protection II and Fire Resistance X (10!) in a desperate attempt to keep him on his feet and threatening the player for more than 5 seconds. It works but if the player plays keepaway then Mr Pumpkinhead does tend to burn to death. Oh his sword has fire aspect too.
5) Iron Sword and Armor guy. Sharpness II on his Sword, Protection II on his mobhead.
6) Diamond Weapons and Armor guy. Wait who is that. Is...is that...Oh Em Gee it is! Run!...No of course it's not really him. Because he doesn't exist. FakeHB here has highly enchanted Diamond Armor (Boots with Fire Protection IV and Feather Falling IV, Leggings with Blast Protection IV, Chestplate with Protection IV, Mobhead with Protection IV, Fire Protection IV, Blast Protection IV, Respiration III) and a Diamond Pickaxe enchanted with Sharpness IV, Smite IV, Bane of Arthropods IV, Looting III and Unbreaking III. He's also got the previously unseen CustomNameVisible (set to 1 for yes), a CustomName, and PersistenceRequired (set to 1 for yes). That last one will prevent him from ever despawning, although he can be killed normally. If you can get through that Diamond Armor. And level 4 resistances. Luckily he's rarer (see below).
Other than the ninja it's a straight tour of the 5 tiers of swords and armor. Note the Weight tag, used right after the mob name in each SpawnPotential. That determines how rarely it's picked. Specific numbers don't mean anything, just the ratios between the numbers. For example if you want all the potentials to have an equal chance just set all the weights to 1. Changing them all to 8 wouldn't do anything different (they're still all the same size as each other), however changing all but one to 8 would make that one 1/8th as likely as the rest. In this code 4 is the default. The ninja only has a weight of 2 (making him half as likely to be picked) and FakeHB has a weight of 1 (making him 1/4th as likely to be picked, and thank god!)
* MobSpawners pt 4: Rideable Monsters Mobs can be ridden by using Minecarts or Boats on their heads. The command is fairly simple
/setblock ~ ~1 ~ mob_spawner {EntityId:MinecartRideable(or Boat), SpawnData:{Riding:{id:&Entity&}}}
Some mobs simply can't be spawned with a spawner, sad to say, like bosses and Iron Golems. Adding a Minecart isn't going to change that.
Hostile Mobs with shooting abilities can and will use them against survival players. Watch out.
Ghasts cannot be ridden. The minecart becomes stuck in their head, no use to anyone.
Endermen cannot be walked around, but they can be forced to teleport by shooting a projectile at them ( snowball).
Ocelots (Ozelots in the game format) are some of the fastest mobs to ride, seeing they're trying to get away from you. They can also be partially controlled, by pointing away from the place you want to go.
Spiders are the only mobs that slow down when ridden.
Slimes and their cousins, Magma Cubes (game format LavaSlime) cannot have their sizes changed.
New commands There are several new commands and tags added in 1.8. One of the most useful being @e. It allows the player to target entities. You can now teleport creepers, or kill a minecart. Others include /fill, /clone, /execute, /worldborder (set|health, etc}, /trigger, /title, /blockdata, /testforblocks, and /stats.. Check out the s page to see how they work.
You can now create passwords with command blocks, using /testforblock. Place a command block. This will be the one you put input in. Place another command block, and type in the command /testforblock (x,y,z of first command block) command_block 0 {Command:(input)}. Here's an example: /testforblock ~2 ~ ~ command_block 0 {Command:That's Numberwang!}. Place a comparator connected to the second command block, and place a button on or next to it to power the block. Now type "That's Numberwang!" (without quotes). If the second command block properly finds the first, the comparator will activate whatever it's wired to. If you want the first command block to reset so the password isn't used by someone else, also place a command block with /setblock that activates after the /testforblock.
If you don't want to let people edit your command block, you can test for a
instead, but this means having to test for the password separately on each of the sign's 4 lines. To add a touch, you can fill the sign with air, but remember to give it back using /give @p sign
This allows you to destroy a cube of materials around you as you walk, using /execute. Here's the command: /execute @p ~ ~ ~ fill ~1 ~2 ~1 ~-1 ~0 ~-1 air. Attach a clock or some sort of repeating device to it, and the cube of air will follow you wherever you go. Confused? fill takes out a specified amount of space, similar to setblock, but it uses two xyz's and fills the space in between them with the material you choose. In this case it's air. Now, every time you move, it will fill a 3x3 cube of air around you. Great for enemy bases, or simply being a crazy griefer.
This also deletes water, so you basically become a moving sponge.
This works in any game mode, even spectator.
This is a reversed version of Destroyer. /execute @p ~ ~ ~ fill ~1 ~-1 ~1 ~-1 ~-1 ~-1 grass. This puts a 3x3 grass square under your feet. Only problem: Don't jump. It becomes a mountain of a problem.
The player can make a kind of world guard using the command block. (e.g. code: / &mode:[0|1|2]& @a[r=&radius&])
Using the radius argument with a teleporter hooked up to a clock circuit can be used to create an exclusion zone ("forcefield") around an x y z coordinate (which should not be centered on the command block itself, otherwise it will be difficult to edit or disable it later). Simply program it to teleport any player within a certain range to a further away point, or just back 10 meters using relative coordinates. Note that such a forcefield wouldn't know which direction you were approaching from, and may result in pulling a player in before pushing them back out the other side.
The commands / Hello, @p, / @p Hello, @p, and / Hello, @p will cause the command block to say user name of the nearest player in the message.
You can also clear players inventories, to prevent griefing and/or cheating: / &player& &item& &data-value&
Command Blocks can create spawners using the setblock command, e.g.: / ~1 ~-1 ~0 mob_spawner 0 replace {EntityId:Zombie,SpawnData:{Equipment:[{id:276,Count:1}]}} Anything that counts as an entity can be spawned (except a player), which includes all hostile, neutral and passive mobs, as well as animals, minecarts, fireballs, arrows, snowballs, ender pearls, custom thrown potions, fireworks, primed TNT, falling sand, red sand, or gravel, paintings and item frames, experience orbs, and even dropped items of any type.
Pig/Cow/Chicken spawners can be placed in the butcher's backyard in a village to create a constant meat supply. E.g.: / ~1 ~-1 ~0 mob_spawner 0 replace {EntityId:Chicken,MaxNearbyEntities:10,RequiredPlayerRange:16,SpawnCount:6,SpawnRange:2,MinSpawnDelay:50,MaxSpawnDelay:200,SpawnData:{Riding:{id:"Pig"}}} Note that the spawner in the last code example will spawn a chicken riding a pig. There doesn't seem to be a limit to how many levels of riders you can use (e.g.: a chicken riding a pig riding a cow riding a horse riding a silverfish riding a villager ("Say, that's a mighty odd hat you have on, Farmer Brown")).
Please note that if you want to use the RequiredPlayerRange tag you have to use the MaxNearbyEntities tag as well. Same deal with MinSpawnDelay and MaxSpawnDelay. Lastly, note that the y value used in both of those spawner example codes was ~-1, which (assuming you're not flying) will put the spawner in the surface level of the ground at your feet.
If you don't want to target a specific player, you can use @a, @p, or @r instead of &player&. Keep in mind that you can use @p (which means "closest player") in player issued commands as an easy to type 2 character replacement for your own name as the closest player to you will always be you.
The most lethal booby trap would be a command block set to teleport someone into the .
As of 1.8 you can do / @e[r=2] in a command block below a block with a pressure plate to make a multi-use landmine that kills all nearby entities upon stepping on it (including players, item frames, and paintings)
Note that booby traps that use @p can be dangerous due to the fact that non-player entities could trigger them (if something like a
is used), resulting in the teleportation of the nearest player, no matter how far away they are and regardless of the fact that they haven't actually stepped on the plate. To get around this, you can either use the / command as an invisible pressure plate, or you can do / @p[r=radius] x y z. Hook a clock circuit up to a command block programmed with / @p[x=1, y=2, z=3, r=radius], with the coordinates changed as appropriate. Note that as of
a range of zero can now be specified.
It is possible to make teleporters using the command block. (e.g. code: / @p x y z) Taking it one step further, a teleporting station can be made, with multiple button-activated teleporters that each teleport to different locations. Scouting and testing teleportation destinations first is advisable, to make sure players don't end up stuck inside blocks or in other unintended places. If you appear in ground while testing coordinates, use / @p ~0 ~8 ~0 to get out (may require multiple uses).
If you use the teleport command with the command block, you can use relative coordinates in the destination coordinates by placing an ~ in front of a Coordinate (e.g. code: / @p ~0 ~8 ~0 This would teleport the player 8 blocks into the air).
Commands that use coordinates (e.g. / or /) add 0.5 to whole numbers when no decimal follows. This is so you appear centered over the block you appear on instead of at the edge or corner of it. For example, the number -33 would execute as -32.5, and 187 as 187.5. To prevent this behavior, add .0 (25.3, 90.0) after them, as these values are executed left as-is.
With the 1.8 update, you can now also teleport minecarts or boats, with you in them. The command is /tp @e[type=Boat] (coordinates).
There are several ways to combine groups of commands into just one command.
/execute will run its command as many times as the number of targets it selects. If it doesn't matter what entity runs a particular command, you can use @e[c=10] to ensure the code always runs 10 times (as long as there are always at least 10 entities in the loaded world).
To run multiple commands, /summon a command-block minecart riding another command-block minecart riding another, with the commands in reverse order, on an . There are also commands called one-command mods that use this tactic. Mr. Garretto makes one-commands and maps .
This will allow server owners to sell effects, items, and more to any player using level ups and exp. All they have to do is press one button
已根据您的简繁转换设置隐藏
为减少页面加载时间,被隐藏
已根据您的简繁转换设置隐藏
为减少页面加载时间,被隐藏
In his recent videos, Sethbling uses a
as a scroll to perform commands (summon creatures, teleport). He has an empty map in his inventory and when he uses it, it becomes a filled map which immediately disappears and a redstone task is done. In this tutorial I will show you how to build a redstone mechanism to detect the use of a map as a scroll and perform a task (give an effect, open a door,...).
Fast redstone interaction.
Compact system.
At-will triggered system, just right-click to activate it.
Single use&#160;: the map disappears during the inventory check, but you can give it back through a /give command
There can only be one purpose for the scroll. I.E. you cannot do a scroll of teleporting and a scroll of strength without using complicated data values.
You may see the map animation when activating the map before it gets deleted.
You cannot use the map item during your playthrough (showing a text message, a path, a drawing,...).
Building the mechanism
You can change the display name of an item to give the player a better understanding of the object and use the tooltip display. Use the following command to give the player a custom named map&#160;:
/give &player& map 1 0 {display:{Name:"&displayName&",Lore:["&tooltip&"]}}
player&#160;: the player you want to reach (@p, @a[arguments],...).
displayName&#160;: the name displayed when you scroll in the hotbar or when you hover the item with your mouse.
tooltip&#160;: the text below the item name when you hover it.
Detecting the activation of the map
The two hoppers form a redstone clock. You can use other clocks shown .
The Command block 1 contains the /give command described in the section above. It can be dismissed if you don't want the scroll to come back after being activated.
The Command block 2 contains the inventory check command&#160;:
/clear &player& filled_map
The Command block 3 is the output in case of success. You can do whatever you want&#160;: give an effect to the player, teleport him somewhere,... You can also wire this output to a door, a piston,...
Going further The /clear command can check for other interactive items&#160;:
check for a glass_bottle if the player just drank a potion.
Sethbling also uses a
which works when the line is reeled in. The /clear syntax involves another argument, the damage value, after the item name:
/clear &player& fishing_rod 2
Note that spamming the reel, or hooking a mob, may damage it more than 2, so make another one of these every 2.
Command block: /setblock x y z minecraft:sand
1st Piston Front: Showing to set /setblock x y z to that position
Repeaters are risen by 1 block from 1-3 so you can see them
1(Repeater): Set to 1
2(Repeater): Set to 3
3(2 Repeaters): Set to 4 and 2
4(Repeater): Set to 2(Default)
5(2 Repeaters): Set to 4 and 1
6(2 Repeaters): Set to 4 and 4
7(Repeater): Set to 2
8 and 9(Repeaters): Set to 4 and 4
1(Repeater): Set to 4
2(Repeater): Set to 4
3(Repeater): Set to 4
4(Repeater): Set to 1(Default)
5(Repeater): Set to 1
6(Repeater): Set to 1
8(Repeater): Set to 4
9(Repeater): Set to 2
10(Repeater): Set to 2
使用服务器
架设服务器
(IRC频道)
(仅限地图数据)
制作Minecraft媒体}

我要回帖

更多关于 minecraft指令大全 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信