Tech Reborn

Tech Reborn

30M Downloads

`StorageUnitBaseBlockEntity`'s `ItemStorage` lookup does not accept a null `Direction`

SquidDev opened this issue ยท 2 comments

commented

Describe the bug
As of 1.19.4 (FabricMC/fabric#2909), the direction paramter to ItemStorage.SIDED is nullable. However, StorageUnitBaseBlockEntity's lookup function does not accept a nullable side, causing crashes.

Steps to Reproduce
One way to reproduce this crash is with ComputerCraft, which uses the null side to get a view of the whole inventory (see cc-tweaked/CC-Tweaked#1563).

Steps to reproduce the behaviour:

  • Set up a Minecraft instance with TechReborn and CC: Tweaked.
  • Place down a computer.
  • Place down a storage block next to the computer.

Environment (please complete the following information with the version):

  • Minecraft: 1.20.1
  • Mod Loader: Fabric

Logs
https://github.com/cc-tweaked/cc-restitched/files/12364905/crash-2023-08-17_03.37.25-server.txt

commented

Thanks!

commented

Added a quick and dirty fix, it will now default to accessing the bottom side, much better than crashing. ๐Ÿ‘