Putting portable tanks that have fluid in in a dispenser, and then giving redstone signal causes crash
imkSushi opened this issue ยท 5 comments
Please use the search functionality before reporting an issue. Also take a look at the closed issues!
Issue description:
Note - I am using a custom modpack - Mathematical (v0.2.1 - see here for the mod list: https://www.curseforge.com/minecraft/modpacks/mathematical/files/3046418) - the main thing relevant from the mods list is likely Quark and Botania
It seems fluid in a tank (I'd assume with 1b+ worth) when put in a dispensor and given a redstone signal causes the game to crash.
I have only tested this with lava in an elite tank, using a birch button, once in each of SP and MP, but I'd assume that it happens in most similar situations.
I would assume that it would be caused by Quark or Botania, as I know they both change the way dispensers work, but in particular, as Quark makes dispensers place blocks, I'd assume what happens is that the dispenser trys to both place the block, and also place the fluid, causing something to break.
Steps to reproduce:
- Get Portable Tank (I used Elite)
- Get Bucket of Fluid (I used a Bucket of Lava)
- Place some fluid in the tank (I think there just needs to be at least 1b in the tank)
- Put tank in dispenser
- Give dispenser a redstone signal
- Crash!
Version (make sure you are on the latest version before reporting):
Forge: 32.0.108
Mekanism: 10.0.9.432
Other relevant version: Minecraft 1.16.1; Mathematical 0.2.1; Quark r2.2-262; Botania 1.16.1-403
If a (crash)log is relevant for this issue, link it here: (It's almost always relevant)
SP: https://pastebin.com/kZMNrYD4
MP: See note
Note: This is the SP crash log - when the server crashed, I got disconnected with a Stack Overflow Exception. I just curate the modpack, I don't run the server, so I don't have the MP crash log yet - I'm waiting for the server owner to send it to me. I shall update this with it as soon as I have it.
Thank you for the detailed report, glancing at the code I think the cause of the issue is that Block#onBlockPlacedBy
actually allows the player object placing it to be null, but we were treating it as nonnull so need to properly handle the case where it is null.
No problem - I have a mod for Terraria, hence I know how infuriating bad bug reports are.
I'm not familiar with the relevant source code - I'm assuming that this is therefore a purely Mekanism issue, and so I shouldn't submit an issue to the Quark repo?
Also, I did this while trying to automate Botania's Endoflame (it consumes lava) - I wanted to check if this placed the lava, placed the tank (via Quark), or simply ejected the tank - out of interest, what is the expected behaviour? It would be cool if it placed the lava :)
Not sure how quark modifies dispensers (given I don't think we actually are currently registering any dispenser for tanks behaviors though that could be a potential feature request), but if the tank is in "bucket mode" my guess is it might place fluids or maybe it will only pick them up given to place it needs a sneak right click instead of just a right click.