#How to spawn baby in the latest version like

1 messages · Page 1 of 1 (latest)

potent ermine
#

How can spawn baby using the right click of my mouse direct to the parents, I mean what code should I use to execute that

abstract marten
#

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.

abstract marten
#

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;
});```
potent ermine
#

I will try this one i will just copy this bro

#

Thanks by the way

severe basin
#

Minecraft:spawn_egg_interaction component

#

It also uses the offspring component

potent ermine
#

Can you send some examples how can I execute the components

#

I'm using bridge for coding Minecraft extension

severe basin
#

Bedrock samples preview branch

#

The animal mobs have it

#

Well actually it’s stable now

#

Stable branch should have it