Removing items from entity inventoy?

Started by Automation_UZ1 on

Topic category: Help with MCreator software

Joined Oct 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Removing items from entity inventoy?

Im attempting to remove 1 of a specific item from an entities inventory, however i cant figure it out for non player entities.

Ive successfully gotten it to check for the item being present, but i cant remove it without deleting the whole stack. 

Is there any way i can remove one from an entities inventory the same way it can be done with players? 

 

Joined Oct 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Additionally im also…
Tue, 12/03/2024 - 00:31

Additionally im also wondering if i can set a chest like inventory on an entity to only open when right clicked with a specific item, ive got the inventory set up to always open on right click currently, but cant get it to only open with a specific item in the main hand

 

Joined Oct 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Managed to figure it out a…
Tue, 12/03/2024 - 03:32

Managed to figure it out a few hours later, so incase anyone else finds this and needs to know how i did it:
Instead of trying to use "remove (1) (item) from main inventory" i used "set (x) in slot of event/target if has inventory"
X in this case being where i swapped the default number to "Get number of items in (get slot of event/target) -1"

Deeply sorry about my poor explanation, i can not figure out any image hosting sites