Skip to content

Commit

Permalink
Fixed an issue where the wrong inventory was specified for minecart d…
Browse files Browse the repository at this point in the history
…epositer
  • Loading branch information
me4502 committed Sep 23, 2017
1 parent 9baf7bf commit 05e574b
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -156,7 +156,7 @@ public void onVehicleImpact(CartBlockImpactEvent event) {
if (inf.a.getData() < 0 || inf.a.getData() == item.getDurability()) { if (inf.a.getData() < 0 || inf.a.getData() == item.getDurability()) {
if(inf.b < 0) { if(inf.b < 0) {
transferitems.add(item.clone()); transferitems.add(item.clone());
cartinventory.remove(item); containerinventory.remove(item);
} else { } else {
ItemStack stack = item.clone(); ItemStack stack = item.clone();
if(item.getAmount() > inf.b) { if(item.getAmount() > inf.b) {
Expand All @@ -168,7 +168,7 @@ public void onVehicleImpact(CartBlockImpactEvent event) {
items.add(new Tuple2<>(inf.a, inf.b - stack.getAmount())); items.add(new Tuple2<>(inf.a, inf.b - stack.getAmount()));
} }
transferitems.add(stack.clone()); transferitems.add(stack.clone());
cartinventory.removeItem(stack); containerinventory.removeItem(stack);
} }
} }
} }
Expand Down

0 comments on commit 05e574b

Please sign in to comment.