You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a capability wrapper for the IItemHandler capability, SidedInvWrapper directly accepts a null Direction and passes it through to these methods, which is illegal in two of three cases.
These erroneous calls are in SidedInvWrapper.getSlot and SidedInvWrapper#extractItem. In both cases, SidedInvWrapper needs to fallback to the equivalent behavior from InvWrapper when the direction is null.
This behavior has gone unnoticed for quite a while, simply because none of the vanilla implementation crash when passed null values. This does not change the fact that this is a bug in SidedInvWrapper.
The text was updated successfully, but these errors were encountered:
Ran into a crash between Ars and Enchanted where ars was pulling a cap for the null direction, and enchanted was supplying an invwrapper delegating to their WorldlyContainer.
Note that we currently use the regular InvWrapper for a null direction in CapabilityHooks, even when the container is worldly. The only difference for vanilla blocks, is that we probably allow insertion of shulker boxes inside of shulker boxes through the null face.
SidedInvWrapper is a capability wrapper for
WorldlyContainer
, a vanilla interface with the following definition:As a capability wrapper for the
IItemHandler
capability,SidedInvWrapper
directly accepts a nullDirection
and passes it through to these methods, which is illegal in two of three cases.These erroneous calls are in
SidedInvWrapper.getSlot
andSidedInvWrapper#extractItem
. In both cases,SidedInvWrapper
needs to fallback to the equivalent behavior fromInvWrapper
when the direction is null.This behavior has gone unnoticed for quite a while, simply because none of the vanilla implementation crash when passed null values. This does not change the fact that this is a bug in
SidedInvWrapper
.The text was updated successfully, but these errors were encountered: