Fabric API

Fabric API

106M Downloads

[Request]: Widen Access of StrippableBlockRegistry `getRegistry`

fzzyhmstrs opened this issue ยท 1 comments

commented

Issue: Modders that want to implement a non-axe item that can strip logs like an axe (say a sword that also has a saw blade or something).... have no easy access to the strippable log registry the AxeItem uses. Currently the FAPI registry only allows for modders to add new block pairs, but doesn't help with access.

Concern: This has led some modders to utilize the AxeItemAccessor to grab this information, despite marked as internal, because it exists. This causes a hard incompatibility with QFAPI (which doesn't have this accessor), besides the normal potential concerns with using internals. At the very least modders are currently forced to duplicate the accessor, which seems wasteful compared to an already existing method being widened for use.

Solution: Widen the method getRegistry() to public to provide access to users that want a custom non-axe item with stripping capabilities.

commented

Alternate possible solution: An API helper method getStrippedState that mirrors the one in AxeItem and provides the Optional<BlockState> that the AxeItem uses without needing to expose the registry.

image