Allow changing of the power cost view in fusion reactor recipes.
This commit is contained in:
parent
55b09da681
commit
c80cc0101f
3 changed files with 6 additions and 4 deletions
|
@ -33,6 +33,7 @@ import net.minecraft.client.gui.FontRenderer;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
@ -54,7 +55,7 @@ public class RecipeUtil {
|
|||
int lineSpacing = fontRenderer.FONT_HEIGHT + 1;
|
||||
|
||||
NumberFormat formatter = NumberFormat.getInstance();
|
||||
String startCostEU = formatter.format(startCost);
|
||||
String startCostEU = PowerSystem.getLocaliszedPower(startCost);
|
||||
String startCostString = I18n.translateToLocalFormatted("techreborn.jei.recipe.start.cost", startCostEU);
|
||||
fontRenderer.drawString(startCostString, x, y, color);
|
||||
y += lineSpacing;
|
||||
|
@ -68,7 +69,7 @@ public class RecipeUtil {
|
|||
FontRenderer fontRenderer = minecraft.fontRenderer;
|
||||
int lineSpacing = fontRenderer.FONT_HEIGHT + 1;
|
||||
|
||||
String runningCostString = I18n.translateToLocalFormatted("techreborn.jei.recipe.running.cost", euPerTick);
|
||||
String runningCostString = I18n.translateToLocalFormatted("techreborn.jei.recipe.running.cost",PowerSystem.getDisplayPower().abbreviation.toUpperCase(), PowerSystem.getLocaliszedPowerFormattedNoSuffix(euPerTick));
|
||||
fontRenderer.drawString(runningCostString, x, y, color);
|
||||
y += lineSpacing;
|
||||
|
||||
|
|
|
@ -219,6 +219,7 @@ public class TileFusionControlComputer extends TilePowerAcceptor implements IToo
|
|||
if (hasStartedCrafting && this.crafingTickTime < this.finalTickTime) {
|
||||
this.crafingTickTime++;
|
||||
// Power gen
|
||||
|
||||
if (this.currentRecipe.getEuTick() > 0) {
|
||||
// Waste power if it has no where to go
|
||||
this.addEnergy(this.currentRecipe.getEuTick());
|
||||
|
|
|
@ -674,8 +674,8 @@ keys.techreborn.category=TechReborn Category
|
|||
keys.techreborn.config=Config
|
||||
|
||||
# JEI Integration
|
||||
techreborn.jei.recipe.start.cost=Start: %sEU
|
||||
techreborn.jei.recipe.running.cost=EU/t: %s
|
||||
techreborn.jei.recipe.start.cost=Start: %s
|
||||
techreborn.jei.recipe.running.cost=%s/t: %s
|
||||
techreborn.jei.recipe.processing.time.1=Time: %s ticks
|
||||
techreborn.jei.recipe.processing.time.2=(%s seconds)
|
||||
jei.techreborn.scrapbox.name=Opening Scrapboxes
|
||||
|
|
Loading…
Add table
Reference in a new issue