MineColonies

MineColonies

57M Downloads

Crash with Storage Drawers' Compacting Drawer

SanAndreaP opened this issue · 13 comments

commented

Minecolonies version

Version: 1.12.2-0.10.204-ALPHA

Expected behavior

I would expect the game not to crash when putting something in a compacting drawer from Storage Drawers

Actual behaviour

The game crashes with a NullPointerException. I assume it has something to do with this commit: 4bb3f63

Steps to reproduce the problem

  1. Have minecolonies and Storage Drawers installed
  2. place a Compacting Drawer
  3. try to right-click it with a stack of iron ingots of any size
  4. Game crashes

Here's the complete log: https://gist.github.com/SanAndreasP/aad2d0bd1f8a5731c2b2d2346513b962

commented

I downgraded some version of the mod i it is happening at least since version
minecolonies-1.12.2-0.10.198-RELEASE-universal.jar, i didn't went further than that so i can't exactly tell in which version the bug started, it could also be related to the version of Storage Drawers

commented

Hi there, after looking at the logs and code:

final Optional<Field> playerField = Arrays.stream(inventoryCrafting.eventHandler.getClass().getDeclaredFields()).filter(string -> string.getName().equals("player") || string.getName().equals("field_192390_i")).findFirst();

https://github.com/jaquadro/StorageDrawers/blob/cfa3d185816ad27e21af29e08319d183bc37db25/src/com/jaquadro/minecraft/storagedrawers/util/CompactingHelper.java#L166

it would seem that StorageDrawers (i cannot confirm this) is either providing a null InventoryCrafting object (not likely), or the eventHandler object inside the previous object is null (most likely), either way, this would be an error on StorageDrawer's part (AFAIK) and not ours.

@Raycoms would you agree?

P.S. I love clay soldiers, that's all.

EDIT: well it appears i was half right, but all is good the issue seems to have been fixed =D

commented

whoops, that was wrong

commented

Not sure if this helps https://pastebin.com/YmBmWPHg

It is rumoured to be fixed with new alpha's but there is no 'release' yet. Please attend to this. <3

commented

It's fixed already, we'll make a new release soon

commented
commented

is this fix released?

commented

@Fastjur you're using an older version of our mod. even older than the version used in this issue.
you need to update to receive the fix

commented

I still have the same issue in the modpack All The Mods 3: https://pastebin.com/HwHDsCd8

Connected issue at storage drawers repo: jaquadro/StorageDrawers#697

commented
commented

@Fastjur ATM3 updates the minecolonies version extremely slowly, you may have to update it manually.

commented
commented

Manually updating did indeed fix the issue. Thanks :)