Applied Energistics 2

Applied Energistics 2

156M Downloads

Placing a hand crank anywhere else crashes the game

thakyZ opened this issue ยท 3 comments

commented

Describe the bug
I can place the crank anywhere, and when I place it anywhere thats not above a quartz grindstone it gives me a null pointer exception.

To Reproduce

  1. Craft Hand crank.
  2. Place it anywhere that is not above a grindstone.
  3. Your game should crash.

Expected behavior
I think it either is supposed to not be able to be placed or just get placed but have no affect.

Additional context
https://pastebin.com/bzb8nB3H

Environment
Ubuntu 16.04.6
Java 1.8.0_191
Multiplayer

  • Minecraft Version: 1.12.2
  • AE2 Version: rv6-stable-6
  • Forge Version: 14.23.5.2823
commented

Cannot reproduce and the crank is by default only placable on crankable tile entities.

Something is probably overwriting the normal block placement. e.g. Optifine is part of the stacktrace, so I'd simply argue that something else ignores it and places them directly.

commented

Line 98 from appeng.block.grindstone:
tile.setOrientation( forward, mnt.getOpposite() );

Variable "mnt" can be null, since method findfindCrankable could return null.
So, something like this, on line 97 might fix this issue:
if(mnt == null) { this.dropCrank( world, pos ); return; }

commented

I produced the crash with OptiFine, then re-joined the world without OptiFine to find the crank that I tried placing earlier in the world as a block where I placed it. I then reproduced this again without OptiFine present.

I would agree that a null check would be required due to the fact that findCrankable could return null. My crash log: https://pastebin.com/s0FC293C