Skip to content
Permalink
Browse files

Fixed dough making not consuming enough grain due to the negative dec…

…ay value on extremely fresh or cheated-in foods.
  • Loading branch information...
Kittychanley committed Nov 22, 2015
1 parent 2b3a238 commit 62495d1dfbf17021c1410050fcdf7196eace6535
Showing with 6 additions and 3 deletions.
  1. +6 −3 src/Common/com/bioxx/tfc/Handlers/FoodCraftingHandler.java
@@ -78,7 +78,8 @@ else if (makingDough(craftResult, craftingInv))

float grainWeight = Food.getWeight(inputStack);
float grainDecay = Food.getDecay(inputStack);
grainWeight -= grainDecay;
if (grainDecay >= 0) // Account for -24.0 decay on fresh food
grainWeight -= grainDecay;
grainWeight -= Math.min(grainWeight, 80);

inputStack = ItemFoodTFC.createTag(inputStack, grainWeight, 0);
@@ -430,7 +431,8 @@ else if (makingDough(craftResult, craftingInv) && inputStack.getItem() instanceo
{
float grainWeight = Food.getWeight(inputStack);
float grainDecay = Food.getDecay(inputStack);
grainWeight -= grainDecay;
if (grainDecay >= 0) // Account for -24.0 decay on fresh food
grainWeight -= grainDecay;
float doughWeight = Math.min(grainWeight, 80) * 2;
finalWeight = doughWeight;
finalDecay = 0;
@@ -553,7 +555,8 @@ else if (makingDough(craftResult, craftingInv))

float grainWeight = Food.getWeight(inputStack);
float grainDecay = Food.getDecay(inputStack);
grainWeight -= grainDecay;
if (grainDecay >= 0) // Account for -24.0 decay on fresh food
grainWeight -= grainDecay;
float doughWeight = Math.min(grainWeight, 80);
grainWeight -= doughWeight;

0 comments on commit 62495d1

Please sign in to comment.
You can’t perform that action at this time.