mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 07:13:28 +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();
|
||||
if(stack != null){
|
||||
ReconstructorRecipeHandler.Recipe recipe = ReconstructorRecipeHandler.getRecipe(stack);
|
||||
if(recipe != null){
|
||||
if(recipe != null && this.storage.getEnergyStored() >= baseUse+recipe.energyUse){
|
||||
ItemStack output = recipe.getFirstOutput();
|
||||
if(output != null){
|
||||
ItemStack outputCopy = output.copy();
|
||||
outputCopy.stackSize = stack.stackSize;
|
||||
item.setEntityItemStack(outputCopy);
|
||||
|
||||
this.storage.extractEnergy(baseUse, false);
|
||||
this.storage.extractEnergy(baseUse+recipe.energyUse, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue