Spells

Spells

5.2k Downloads

ItemStacks removed for requirements with the helper methods in Spell only work on exact ItemStacks

Hypersonic opened this issue ยท 5 comments

commented

If you have a spell with a requirement:

1 bone
And do not have a stack with Exactly 1 bone (stack of 2 bones, 3, etc.), the requirements will not be met or removed.

commented

I'll look into it ASAP, but right now I have to finish a commit which is currently completely broken.

commented

Inventory.contains() and Inventory.removeItem() may be what we need here.

commented

That's what the helper methods use, so I'll need to add some code to fix the issue and probably do most of the removing/checking manually. I'm still trying to get groups to work, but I don't think that's going to happen tonight. Also, fyi these methods are being moved to SpellUtils a new class full of useful static methods for spell makers.

commented

I might add that they remove every instance of the stack too. ex. if you have 2 stacks of exactly one bone meal, both will be removed

commented

I don't know why there were 2 commits...