Spawning an Entity from the new Local Entity Variables

Started by ShadowPlayer51 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Spawning an Entity from the new Local Entity Variables

What the title says: is there any way I can use the data from local entity variables to summon an entity? I don't see a codeblock that could work for it anywhere, so would it be possible to do with code?

Joined Nov 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm not talking about a…
Sun, 05/08/2022 - 17:00

I'm not talking about a number local variable, I'm taking about an ENTITY local variable (one of the new ones in the 2022.1 release). I see the ability to save an entity to a local variable, but I don't see much use of the variable if you can't summon an entity using that variable.

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yea mcreator should make it…
Sun, 05/29/2022 - 00:24

Yea mcreator should make it so you could put variables in the dropdown menu

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This still isn't added, it…
Wed, 11/29/2023 - 19:48

This still isn't added, it would be very useful for spawning entities from other mods.

Joined May 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
definitely too late, but i…
Fri, 05/30/2025 - 02:10

definitely too late, but i was looking for a solution and came up with this and it seems to work just fine!

https://imgur.com/a/KLqNEdZ

saving the entity as whatever variable, then substituting the registry name in a command using the replace

string block using the registry name of the entity variable (get registry name of block)

Joined Feb 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
gqstavo, this is a really…
Fri, 05/30/2025 - 20:17

gqstavo,

this is a really nice solution!

Joined Jan 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Do you have any ideas how to…
Thu, 08/07/2025 - 11:30

Do you have any ideas how to refine this so that you can summon the entity while maintaining its state?(The amount of health, profession, tameness.)

Joined Apr 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
AFAIK its now possible to…
Thu, 08/07/2025 - 14:48

AFAIK its now possible to spawn an entity, and get its reference, so you can manually get the original entities nbt data and copy them over 

tame "get spawned entity", by get entity that tamed targetevententity.

or something like that.