mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-20 20:22:12 +00:00
allow SAG-Mill recipes to disable main output bonus per recipe
This commit is contained in:
1 parent
a75bcd1855
commit
ff0d28df4a
21 files changed
+162
-22
No files matched your search
@@ -7,6 +7,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import crazypants.enderio.machine.IMachineRecipe.ResultStack;
|
||||
import crazypants.enderio.machine.recipe.RecipeBonusType;
|
||||
|
||||
public class PoweredTask implements IPoweredTask {
|
||||
|
||||
@@ -22,6 +23,8 @@ public class PoweredTask implements IPoweredTask {
|
||||
|
||||
private float requiredEnergy;
|
||||
|
||||
private RecipeBonusType bonusType;
|
||||
|
||||
private IMachineRecipe recipe;
|
||||
|
||||
private float chance;
|
||||
@@ -57,6 +60,7 @@ public class PoweredTask implements IPoweredTask {
|
||||
this.usedEnergy = usedEnergy;
|
||||
this.chance = MathHelper.clamp_float(chance, 0, 1);
|
||||
requiredEnergy = recipe.getEnergyRequired(inputsIn);
|
||||
bonusType = recipe.getBonusType(inputsIn);
|
||||
}
|
||||
|
||||
|
||||
@@ -115,6 +119,11 @@ public class PoweredTask implements IPoweredTask {
|
||||
this.chance = chance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RecipeBonusType getBonusType() {
|
||||
return bonusType;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see crazypants.enderio.machine.IPoweredTask#writeToNBT(net.minecraft.nbt.NBTTagCompound)
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user