Adding some new core dependencies for entities

Started by SkylieTuff on

Topic category: Feature requests and ideas for MCreator

Joined Mar 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Adding some new core dependencies for entities

Just Spawned 
Last Spawned 
First Spawned 
Spawned riding (event/target or immediate or source,)

Last spawned in this world

Last spawned by this player

Last spawned by this entity

Last spawned in this dimension

First spawned in this world

First spawned by this player

First spawned by this entity

First spawned in this dimension

Spawned riding (event/target or immediate or source,) in this world

Spawned riding (event/target or immediate or source,) by this player

Spawned riding (event/target or immediate or source,) by this entity

Spawned riding (event/target or immediate or source,) in this dimension

Direct cause entity
targeted block position

  • hit face (north/south/up etc.)
  • hit location vector

    Image

    Like say you want to target the entity you just spawned but if you use an entity iterator or the nearest entity you choose, it freezes. 
    Or say you want to find the last entity spawned and you'd have to tag every single entity with a tag then find that one tag with the correct tag and change it. Not easy and can cause lots of lag and issues. 

    I feel these be useful add ins for future of mcreator and makes things a bit easier. 


    refined asked question below by chatgpt cause I'm not good at speaking very well and people get confused by my asking. 


    [spoiler=refined asked question below by chatgpt cause I'm not good at speaking very well and people get confused by my asking. ]
  • Context / problem
  • Right now, targeting entities created by spawn-related triggers is harder than it should be.
  • If I want to modify the entity I just spawned (NBT, motion, riding, effects, etc.), the usual workarounds are:
  • entity iterators
  • nearest entity searches
  • tagging every spawned entity and then searching for the tag
  • All of these can freeze procedures, cause lag, or break when multiple entities spawn in the same tick or in multiplayer.

  • Core dependency ideas (spawn-focused)

  • I think MCreator would benefit from more spawn-aware entity dependencies, similar to Event/target or Source, but scoped.
  • Examples:
  • Last / First spawned
  • Last spawned in this world
  • Last spawned by this player
  • Last spawned by this entity
  • Last spawned in this dimension
  • First spawned in this world
  • First spawned by this player
  • First spawned by this entity
  • First spawned in this dimension
  • These would remove the need for global tags or scanning every entity.

  • Riding-related (based on spawned entities)

  • Sometimes the spawned entity immediately has passengers or a vehicle.
  • Examples:
  • Spawned riding (event/target / immediate / source) in this world
  • Spawned riding by this player
  • Spawned riding by this entity
  • Spawned riding in this dimension
  • This avoids guessing with iterators or nearest-entity logic, which can lock up procedures.

  • Missing but very useful dependencies

  • Some things that come up constantly in procedures but aren’t always available or consistent:
  • Direct cause entity
    (the entity ultimately responsible, not just the projectile or intermediary)
  • Targeted block position
  • Hit face (north / south / up / down, etc.)
  • Hit location vector
  • Image (for UI / display logic)

  • Why this matters

  • Without these, modders often:
  • loop over too many entities
  • rely on tags that must be cleaned up
  • accidentally affect the wrong entity
  • cause lag or freezes in large worlds
  • Having scoped spawn and hit dependencies would make procedures safer, clearer, and more multiplayer-friendly.

  • If you want to be extra safe against “wishlist pushback,” you can end with a soft close like:
  • Even just a subset of these (especially spawn-related ones) would help a lot.

  • If someone replies with “just use entity iterator / tags”, you already have the perfect response:
  • That works for simple cases, but it breaks down when multiple entities spawn in the same tick or in multiplayer. That’s why scoped dependencies would help.

    [/spoiler]