Crash placing Traveler's Backpack via non-player means
James103 opened this issue ยท 2 comments
- ALWAYS PROVIDE INFORMATION ABOUT MODLOADER (Fabric / Forge) AND MOD VERSION (For Example 1.19.2-8.2.10)
Mod pack: All the Mods 9 for Minecraft 1.20.1
Mod loader: Forge
Mod version: 9.1.12
Describe the bug
When a Traveler's Backpack is tried to be placed by a Dispenser using Quark's Dispensers Place Blocks module, the game crashes because context.getPlayer().isCrouching()
is tried to be accessed, but context.getPlayer()
is null.
Steps to reproduce
- Install Quark and Traveler's Backpacks.
- Enable the Dispensers Place Blocks module in Quark.
- Get a dispenser, a lever, and a Traveler's Backpack.
- Place down the dispenser on level ground, and put a Traveler's Backpack inside it.
- Power the dispenser.
- The game crashes.
Expected behaviour
There should be a check to make sure context.getPlayer()
exists (i.e. it is non-null) before trying to access context.getPlayer().isCrouching()
Originally reported in AllTheMods/ATM-9#1512
Crash report
https://gist.github.com/NavajoCody/938a0cceb7bc5902a5fe58f4c71ddc18