mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +01:00
Fix Reconstructor not using the right amount of energy for items
This commit is contained in:
parent
f394f74882
commit
acb45154d5
1 changed files with 2 additions and 2 deletions
|
@ -95,14 +95,14 @@ public class TileEntityAtomicReconstructor extends TileEntityBase implements IEn
|
||||||
ItemStack stack = item.getEntityItem();
|
ItemStack stack = item.getEntityItem();
|
||||||
if(stack != null){
|
if(stack != null){
|
||||||
ReconstructorRecipeHandler.Recipe recipe = ReconstructorRecipeHandler.getRecipe(stack);
|
ReconstructorRecipeHandler.Recipe recipe = ReconstructorRecipeHandler.getRecipe(stack);
|
||||||
if(recipe != null){
|
if(recipe != null && this.storage.getEnergyStored() >= baseUse+recipe.energyUse){
|
||||||
ItemStack output = recipe.getFirstOutput();
|
ItemStack output = recipe.getFirstOutput();
|
||||||
if(output != null){
|
if(output != null){
|
||||||
ItemStack outputCopy = output.copy();
|
ItemStack outputCopy = output.copy();
|
||||||
outputCopy.stackSize = stack.stackSize;
|
outputCopy.stackSize = stack.stackSize;
|
||||||
item.setEntityItemStack(outputCopy);
|
item.setEntityItemStack(outputCopy);
|
||||||
|
|
||||||
this.storage.extractEnergy(baseUse, false);
|
this.storage.extractEnergy(baseUse+recipe.energyUse, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue