Magic

Magic

190k Downloads

CheckInventory action doesn't work on non-player entities

NightScythe1 opened this issue · 2 comments

commented

Unsure if this is a bug or intended, but 'CheckInventory' does not seem to be able to check entities inventories at the moment. I'm currently trying to run a spell on mobs that will check what item they are wearing/holding and to run actions depending on the result (mostly as a way to set and save data to work around the issue #1217 ). Unfortunately through most of my attempts, the spells don't seem to recognize/pass an entity other than a player for CheckInventory.

E.g. I tried casting a test spell that checks if the target has 'leather_leggings' in their inventory and sends the message "true" to the caster. I tested on both a player and a zombie wearing leggings, but it only worked for the player

commented

That action is not made to look at non-players.

It could probably be re-worked to do so, but would time be better spent trying to figure out #1217?

commented

I just viewed your comment in #1298 about the save_non_player_mages configuration which actually turned out to solve the entirety of #1217 for my usecase! I feel silly for not noticing the config option previously, but it has completely fixed the issues I was having with attributes not saving. 😭