top of page

Morph

This tutorial I will show how to make the morph. A bit of history. I made the morph command specifically because I thought it would be easier than any of my current creations to make in 1.13 and announce that I am working on transferring to 1.13. It turned out to be my hardest one at the time to make in 1.12 or 1.13.

This creation will not require any use of previous ones. It will use the same command block format. Repeat (needs redstone or always active depending what you want) for the first and chain always active for the rest.

​

This creation will not require any other commands besides the ones inside the creation itself unlike the magic carpet and super pig. The first command is tag @e[type=item,nbt={Item:{id:"minecraft:ender_eye"},OnGround:1b}] add MorphItem. This command will tag all item entities that have a specific nbt. This was not covered in the selectors page so don't worry if this is new to you. Basically it requires the stated nbt values to be correct. Notice how it is no longer the equal sign inside curly brackets it is a colon. The nbt tag has an item tag which leads into more open brackets. This checks the id of the item. You can also check lore and the display name here. Then we go outside the item but still in the nbt. We check if the item is on the ground. It is so we say 1b. That means true (0b is false). That was probably the most complicated command so don't worry.

​

execute at @e[tag=MorphItem] run tag @e[type=cow,distance=..5] add Morph is our next command. It tags any cow in a radius of 5. Since it is only a single execute there is no need to add the if but it would be good practice for you.

​

execute at @e[tag=Morph] run kill @e[tag=MorphItem,distance=..5] is the next command. It will execute from the morph and since anything within a radius of anything is also in the other thing's radius of 5. I hope that made sense. Well it works that's all you need to know. This removes the item and since items don't have drops or death animations just killing it will do.

​

execute at @a[scores={Sneak=1..}] run tag @e[tag=Morph,distance=..2] remove Morph is our next command. If your sneaking remove the morph tag. This requires you to have the sneaking scoreboard set already. It can be found in the magic carpet link below.

Our next command is execute as @a[scores={Sneak=1..}] run scoreboard players set @s Sneak 0. This command we have used before in the magic carpet. It is needed for the sneak to work properly.

​

After we have to do this command execute at @e[tag=Morph] run tag @p add Morphed. It will choose the nearest player to be the Morphed person. To make it multiplayer compatible you have to do this command execute at @e[tag=MorphItem] run tag @p add Morphed as the third command before you kill the MorphItem.

​

Next up is effect give @e[tag=Morphed] invisibility 1 0 true. This will make the Morphed player invisible so that only the Morph mob will show.

​

Next is execute at @e[tag=Morph] run tp @e[tag=Morph] @e[tag=Morphed,limit=1]. This command is the main command. It teleports the Morph cow to the Morphed player. You might not know about the "limit=1" bit so I'll explain. @e organises entities by default by nearest to farthest. To pick the first x do "limit=x" and to pick the last x do "limit=-x". You can change how you sort it. For example "sort=random" will make it random. Since as of 1.13 you can no longer do @r[type=your_type] you now have to do @e[sort=random,limit=1]. You don't need a specific type now and you can do more than 1.

​

This next command can have two different versions depending on multiplayer compatibleness. For singleplayer it is tag @e[tag=Morphed] remove Morphed. This will remove the morphed tag from the player. If its in single player it will be added in the next cycle. For multiplayer we have to be more specific however. execute at @e[tag=Morphed] unless entity @e[tag=Morph,distance=..5] run tag @p remove Morphed. This is using the trick I showed you about at and @p. It will execute unless there is a Morph in a distance of 5.

​

You are now done! As usual the command blocks will be repeat needs redstone or always active (depends what you want) and the rest chain always active. This is the last page of the tutorial so you can click below to go to the next tutorial. I do consider it more advanced but you should manage if you have understood so far.

bottom of page