Denizen icon indicating copy to clipboard operation
Denizen copied to clipboard

Cross-version `InventoryView` compatibility

Open tal5 opened this issue 1 year ago • 0 comments

Reported on Discord. Ended up going with reflection instead of modulizing it, since it'd be one util class instead of methods in every version module, and performance wise it should be basically the same due to static final MethodHandles (I think?).

Additions

  • InventoryViewUtil - util for calling relevant InventoryView methods with reflection.

Changes

  • InventoryView method usages now use InventoryViewUtil.

[!NOTE] InventoryViewUtil has some static util methods for invoking the MethodHandles, not sure how does that affect (performance) things? might have to call them directly?

tal5 avatar Oct 17 '24 22:10 tal5