#Entity UI with Item
27 messages · Page 1 of 1 (latest)
Maybe offer what you have already tried to do?
I tried using the interact component but that canceled the inventory
Maybe the interaction could be used to cancel the inventory if they are not holding that specific item
That seems sound to me
{
"on_interact": {
"filters": {
"test": "has_equipment",
"subject": "other",
"operator": "!=",
"value": "specific_item"
}
}
}
You are welcome. If you have no additional questions, be sure to close your post
One more:
If my entity is at 0, 64, 0 and I'm at let's say 10k, 64, 10k, will that entity be able to tp to me? From my testing I assume so but then sometimes when crossing dimensions it Despawns...
Wait this is unrelated
To the posr
You're fine
As long as the chunk the entity is in remains loaded, it can be selected and it can teleport
I'm not sure why it would be despawning when crossing dimensions though, could you elaborate on how you are getting that behavior?
It's random. The entity tps to me when I hold an item and when I keeps entering and leaving dimensions the target is lost.
So I assume it depspawns.
Oh so you are leaving some dimension through a portal and are wanting it to teleport to you
Yes
From my understanding nether portals should keep both sides loaded for a short period of time after changing dimensions
What If I wait too long to tp the entity to me?
It will most likely get lost—it will not despawn in the most likely circumstance, but simply be unreachable because the chunks it is located in are now unloaded
Guess it's time to write a script to teleport it to the player once the player leaves or enter the dimension.
And what if the player simply walks a good distance from the last time they held the item? Are you teleporting the entity somewhere it will always remain loaded?
That I'm still trying to do. I want it to be like 20 blocks above the player when item is not held. But with scripts idk how I'd do that, maybe I can use Behavior Animations?