BloodMagic
BloodMagic copied to clipboard
added curios support for divination/seer sigil
Changed ElementDivinedInformation.shouldRender()
to consider Curios slots if the mod is loaded (BloodMagic.curiosLoaded
) as well as the main and off hand
Changed the check for the sigils in above function a bit to avoid basically duplicating what's inside the if/else clause
Added the divination and seer sigil to the charm and living armour socket curios tags
When I initially added Curios compatibility I reworked BM's inventory handler. It's set up to allow add-ons to be able to add their custom inventories via the API too.
I would also like to keep as much Curios related code as possible consolidate within https://github.com/WayofTime/BloodMagic/blob/1.18.2/src/main/java/wayoftime/bloodmagic/compat/CuriosCompat.java. The current PR ends up with a bit of duplicated code already present in that class.
Right now the Inventory Helper class (https://github.com/WayofTime/BloodMagic/blob/1.18.2/src/main/java/wayoftime/bloodmagic/util/helper/InventoryHelper.java) only has a single 'getAllInventories' method as when I wrote it that was the only check I needed a the time. Some kind of 'getActiveSlots' method would need to be added, preferably with a way in the API for add-ons to register which of their inventory providers should be considered 'active' as well (ex. "curiosInventory" from BloodMagicAPI.INSTANCE.registerInventoryProvider("curiosInventory", player -> getCuriosInventory(player));
).
Added registerActiveInventoryProvider(String)
to IBloodMagicAPI
and BloodMagicAPI
(since its just a list of strings maybe it shouldnt have provider in the name?)
Added getActiveInventoryProvider()
to BloodMagicAPI
Added getActiveInventories(Player)
to InventoryHelper
Changed CuriosCompat.registerInventory()
to also register the inventory as active
Changed ElementDivinedInformation.shouldRender()
to use InventoryHelper.getActiveInventories(player)
instead of the code I copied from CuriosCompat
before