Hello, Inventory Tweaks Group.
I have a mod that contains a boomerang. When the player rights clicks the Item in inventory it creates an entity that flies off with a copy of the ItemStack and removes it from the player’s inventory until it returns. When it returns the entity places the ItemStack back in the empty spot that was left from the right click event. This is all typically done from the entity’s update method when collision is detected. This works very well until Inventory Tweak’s replace tool functionality is turned on and a second boomerang exists in the inventory.
When it is enabled there are race conditions that (infrequently) duplicate the boomerang or lose it because Inventory Tweaks is placing a new boomerang over the empty slot around the time the boomerang is returning and something gets overwritten. I can see the API doesn’t have methods for removing or placing ItemStacks on the player. Without having to pour over the code can somebody tell me the best way I can handle what I’m doing to avoid getting stepped on by the replace functionality?
Thanks in advance,
Ben
--
You received this message because you are subscribed to the Google Groups "Inventory Tweaks developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inventory-twea...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/inventory-tweaks/5cf741c4.1c69fb81.880bc.2613%40mx.google.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/inventory-tweaks/CAM7aJDzvrf8S6S%2BGzX4%2B72gMj3FBP2gsvMsBrb4iUjc_0U8NkA%40mail.gmail.com.