Skip to content

Commit

Permalink
Fix/crashes expceptions (#970) (#971)
Browse files Browse the repository at this point in the history
* merge guard improvements

* add that but have to remove imports

* Fix merge problems.

* merge builder changes

* Fix merge conflicts

* fix some things in placement handler, have to wait for 1.11 capabilities

* fix recipe handler

* merge saturation

* Hotfix/fix happiness (#905)

* save happiness and don't devidi through 0

* add constants

* check if citizenData != null first

* fix assets

* another hotfix, new citizen cause crash if happiness 1

* don't double request resources

* Fix prboblem with incorrect amount of entities requesting

* Fix crash with full inventory on food pickup

* fi xnullpointer

* delay warehouse more

* remove unnecessary import

* fix merge issues

* optimize imports

* merge hotfix

* fix crashes and exceptions

* correct predicate chaining and fix flintNSteel

* Fix bug where things don't get dumped correctly

* Update InventoryUtils.java

* make marvin happy

* fix citizenData null crash

* fix name

* improve creative tab

* Fix up nullpointer exception

* merge builder and lj positioning

* merge sonar fix

* fix merge bugs

* change creativetab

* fix bug with dman dumping wrong
  • Loading branch information
marvin-bitterlich committed May 11, 2017
1 parent 73cdf85 commit 107112d
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -490,8 +490,7 @@ public void dumpInventoryIntoWareHouse(@NotNull final InventoryCitizen inventory
for (int i = 0; i < new InvWrapper(inventoryCitizen).getSlots(); i++)
{
final ItemStack stack = inventoryCitizen.getStackInSlot(i);

if(stack == null || stack.getItem() == null || stack.getCount() == 0)
if(InventoryUtils.isItemStackEmpty(stack))
{
continue;
}
Expand All @@ -501,8 +500,7 @@ public void dumpInventoryIntoWareHouse(@NotNull final InventoryCitizen inventory
LanguageHandler.sendPlayersMessage(getColony().getMessageEntityPlayers(), "com.minecolonies.coremod.wareHouse.full");
return;
}
InventoryUtils.addItemStackToProvider(chest, stack);
new InvWrapper(inventoryCitizen).extractItem(i, Integer.MAX_VALUE, false);
InventoryUtils.transferItemStackIntoNextFreeSlotInProvider(new InvWrapper(inventoryCitizen), i, chest);
}

}
Expand Down

0 comments on commit 107112d

Please sign in to comment.