Skip to content

Commit

Permalink
fix: autocrafter not dropping contents
Browse files Browse the repository at this point in the history
  • Loading branch information
MrTJP committed Jun 22, 2023
1 parent 2db953c commit 4342cbc
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import codechicken.lib.data.MCDataInput;
import codechicken.lib.data.MCDataOutput;
import codechicken.lib.vec.Vector3;
import mrtjp.projectred.expansion.CraftingHelper;
import mrtjp.projectred.expansion.init.ExpansionReferences;
import mrtjp.projectred.expansion.inventory.container.AutoCrafterContainer;
Expand Down Expand Up @@ -92,6 +93,14 @@ protected Container createMenu(int windowId, PlayerInventory playerInventory, Pl
return new AutoCrafterContainer(playerInventory, this, windowId);
}

@Override
public void onBlockRemoved() {
super.onBlockRemoved();
Vector3 pos = Vector3.fromTileCenter(this);
dropInventory(planInventory, getLevel(), pos);
dropInventory(storageInventory, getLevel(), pos);
}

private void onInventoryChanged(IInventory inventory) {
recipeNeedsUpdate = true;
setChanged();
Expand Down

0 comments on commit 4342cbc

Please sign in to comment.