TransWikia.com

Run setblock command in Minecraft to change villager into pig

Arqade Asked by Zach Reed on July 5, 2021

Is there a way to use /setblock or another command to convert a villager into a pig, similar to how you can use /setblock to change one block to another?

One Answer

It is not possible to directly convert an entity into a different entity. The best workaround is to summon a pig at the villager and kill the villager.

Like so:

execute as @e[type=villager,tag=villager1] at @s run function namespace:convert_to_pig

function convert_to_pig:

summon pig ~ ~ ~
 
tp @s ~ -500 ~
kill @s

Answered by ginkgo on July 5, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP