大家好,今天教大家如何在地上放一个指令方块,之后里面会出现自定义指令的方法。这个也不光是指令方块,可以在刷怪笼上运行,目的是可以放置一个刷钻石套装僵尸的刷怪笼。这个是使用了1.8的新NBT:BlockEntityTag。指令例子:
- /give @p minecraft:command_block 1 0
- {BlockEntityTag:{Command:"/setblock ~ ~1 ~ minecraft:gold_block 0 replace"}}
- /give @p minecraft:mob_spawner 1 0
- {BlockEntityTag:{EntityId:Zombie,SpawnData:{ActiveEffects:[{Id:1,Amplifier:4,Duration:9999999},
- {Id:5,Amplifier:9999999,Duration:9999999},
- {Id:10,Amplifier:9999999,Duration:9999999},
- {Id:11,Amplifier:9999999,Duration:9999999},
- {Id:12,Amplifier:9999999,Duration:9999999},
- {Id:13,Amplifier:9999999,Duration:9999999}],
- Equipment:[{id:276,Count:1,tag:{ench:[{id:16,lvl:90000000},{id:19,lvl:90000000},{id:20,lvl:90000000},{id:17,lvl:90000000},{id:18,lvl:90000000},{id:34,lvl:90000000}]}},
- {id:313,Count:1,tag:{ench:[{id:0,lvl:90000000},{id:1,lvl:90000000},{id:2,lvl:90000000},{id:3,lvl:90000000},{id:4,lvl:90000000},{id:7,lvl:90000000},{id:34,lvl:90000000}]}},
- {id:312,Count:1,tag:{ench:[{id:0,lvl:90000000},{id:3,lvl:90000000},{id:1,lvl:90000000},{id:4,lvl:90000000},{id:7,lvl:90000000},{id:34,lvl:90000000}]}},
- {id:311,Count:1,tag:{ench:[{id:0,lvl:90000000},{id:3,lvl:90000000},{id:1,lvl:90000000},{id:4,lvl:90000000},{id:7,lvl:90000000},{id:34,lvl:90000000}]}},
- {id:52,Count:1,AttributeModifiers:[{Operation:0,UUIDLeast:1,UUIDMost:1,Amount:950.0,AttributeName:generic.attackDamage,Name:Attack_Cage},
- {Operation:0,UUIDLeast:2,UUIDMost:2,Amount:950.0,AttributeName:generic.knockbackResistance,Name:Knockback_Cage},
- {Operation:0,UUIDLeast:4,UUIDMost:4,Amount:990.0,AttributeName:generic.maxHealth,Name:Health_Cage}]}],
- Attributes:[{Name:generic.attackDamage,Base:1000},
- {Name:generic.followRange,Base:250},
- {Name:generic.knockbackResistance,Base:700},
- {Name:generic.movementSpeed,Base:0.7},
- {Name:generic.maxHealth,Base:1000}],
- CustomName:"PotatoMaster101",CustomNameVisible:1},
- SpawnCount:2,SpawnRange:6,RequiredPlayerRange:128,Delay:10,MinSpawnDelay:10,MaxSpawnDelay:100,MaxNearbyEntities:20}}
=========END==========