Merge pull request #934 from thiakil/itemstack-handler

don't return internal copy of itemstack on simulate
This commit is contained in:
Brennan Ward 2017-10-01 01:17:00 -04:00 committed by GitHub
commit 6a16bbfc4b

View file

@ -103,9 +103,10 @@ public class ItemStackHandlerCustom extends ItemStackHandler{
if(!simulate){
this.stacks.set(slot, StackUtil.getNull());
this.onContentsChanged(slot);
}
return existing;
}
return existing.copy();
}
else{
if(!simulate){
this.stacks.set(slot, ItemHandlerHelper.copyStackWithSize(existing, existing.getCount()-toExtract));