#open entitys inventory

1 messages · Page 1 of 1 (latest)

tough sentinel
#

can i open an entitys inventory trough the Minecraft:interact component?

tough sentinel
#

Can someone help me please

stoic storm
#

Not that I know of, but you can allow the player to access the inventory through the inventory component.

#

what would you need it for? I may be able to help

fast lion
#

iirc minecraft:inventory already opens the inventory of the entity within interaction

tough sentinel
#

My problem is my entity when tamed can be made to sit but then I can’t access the inventory because I just make it stand with and sit with rightclick even when sneaking

#

@stoic storm

stoic storm
#

ahh, ive encountered the exact same issue

#

minecraft will prioritize sitting over accesing the inventory and theres no way to change that

#

but my solution was a false sit

#

basically you have an item that you use to make the entity sit

#

and have an entity sensor thatll detect if youre crouching and holding the item

#

if you are, interactions will be enabled, and on interact youll want to disable the mobs movement, and make sure it cannot teleport to the player

#

along with enabling interactions, youll make the inventory private to the entity so that theres no priority issue

#

you get where im going with this? if not i can try to find the code to show you

tough sentinel
#

Oh that’s smart thank you

#

I will do this