sisby-folk / inventory-tabs

A minecraft mod that allows swapping to other in-world screens (blocks, entities, etc) via tabs. A fourth-generation rewrite of CakeWhip's InventoryTabs.
https://modrinth.com/mod/inventory-tabs
GNU Lesser General Public License v3.0
6 stars 3 forks source link

Reuse TabProvider proclusions in Tabs #9

Closed sisby-folk closed 8 months ago

sisby-folk commented 9 months ago

Tab providers use the proclusion predicate map to prevent tabs from being added that are chest blocked, shulker blocked, not tame, etc.

The same proclusion maps should be passed down to the tabs themselves, so that identical logic can be used to check whether the tab should be removed.

InRange checks should also be added to the proclusions list, so that it's easier for subclasses to modify. (should proclusions receive whether the screen is already open as an input?)