#How to spawn baby in the latest version like
1 messages · Page 1 of 1 (latest)
What do you exactly want? In the latest version it is possible to spawn babies with the spawnegg of the mob and right clicking their parent.
I just made a Script, that lets you spawn baby animals, when sneaking and right clicking on another animal. It is one of my first scripts, so there is room for improvement:
import { system, world } from "@minecraft/server";
world.beforeEvents.playerInteractWithEntity.subscribe((data) => {
const player = data.player;
const target = data.target;
if (player.isSneaking) {
system.run(() => {
player.dimension.spawnEntity(target.typeId, target.location, { spawnEvent: "minecraft:entity_born" });
});
}
return;
});```
Can you send some examples how can I execute the components
I'm using bridge for coding Minecraft extension