Skip to content

Commit

Permalink
Fixed "Extracting Certain Items Breaking Most World Interactions". Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulvdberge committed Oct 27, 2018
1 parent 8cb38fe commit ec09642
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### 1.6.9
- Fixed OpenComputers "unknown error" when using extract item API (raoulvdberge)
- Fixed client FPS stuttering when opening a Crafting Grid (raoulvdberge)
- Fixed rare Grid crashing issue (raoulvdberge)

### 1.6.8
- Fixed Ender IO incompatibility (raoulvdberge)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,22 @@ public void onExtract(EntityPlayerMP player, int hash, int flags) {
if (ItemHandlerHelper.insertItem(playerInventory, took, true).isEmpty()) {
took = network.extractItem(item, size, Action.PERFORM);

ItemHandlerHelper.insertItem(playerInventory, took, false);
if (took != null) {
ItemHandlerHelper.insertItem(playerInventory, took, false);
}
}
} else {
took = network.extractItem(item, size, Action.PERFORM);

if (single && !held.isEmpty()) {
held.grow(1);
} else {
player.inventory.setItemStack(took);
}
if (took != null) {
if (single && !held.isEmpty()) {
held.grow(1);
} else {
player.inventory.setItemStack(took);
}

player.updateHeldItem();
player.updateHeldItem();
}
}

INetworkItem networkItem = network.getNetworkItemHandler().getItem(player);
Expand Down

0 comments on commit ec09642

Please sign in to comment.