Updated fluid generators GUI. Closes #1097
This commit is contained in:
parent
37d8b8641f
commit
dfaef8a6c2
12 changed files with 92 additions and 184 deletions
|
@ -261,13 +261,10 @@ public class TechRebornJeiPlugin extends BlankModPlugin {
|
|||
registry.addRecipeClickArea(GuiIronFurnace.class, 78, 36, 24, 16, VanillaRecipeCategoryUid.SMELTING,
|
||||
VanillaRecipeCategoryUid.FUEL);
|
||||
|
||||
registry.addRecipeClickArea(GuiSemifluidGenerator.class, 79, 34, 18, 18,
|
||||
EFluidGenerator.SEMIFLUID.getRecipeID());
|
||||
registry.addRecipeClickArea(GuiSemifluidGenerator.class, 150, 4, 18, 18, EFluidGenerator.SEMIFLUID.getRecipeID());
|
||||
registry.addRecipeClickArea(GuiDieselGenerator.class, 150, 4, 18, 18, EFluidGenerator.DIESEL.getRecipeID());
|
||||
registry.addRecipeClickArea(GuiGasTurbine.class, 79, 34, 18, 18,
|
||||
EFluidGenerator.GAS.getRecipeID());
|
||||
registry.addRecipeClickArea(GuiThermalGenerator.class, 79, 34, 18, 18,
|
||||
EFluidGenerator.THERMAL.getRecipeID());
|
||||
registry.addRecipeClickArea(GuiGasTurbine.class, 150, 4, 18, 18, EFluidGenerator.GAS.getRecipeID());
|
||||
registry.addRecipeClickArea(GuiThermalGenerator.class, 150, 4, 18, 18, EFluidGenerator.THERMAL.getRecipeID());
|
||||
|
||||
registry.addRecipeCategoryCraftingItem(new ItemStack(ModBlocks.IRON_FURNACE), VanillaRecipeCategoryUid.SMELTING, VanillaRecipeCategoryUid.FUEL);
|
||||
registry.addRecipeCategoryCraftingItem(new ItemStack(ModBlocks.IRON_ALLOY_FURNACE), RecipeCategoryUids.ALLOY_SMELTER, VanillaRecipeCategoryUid.FUEL);
|
||||
|
|
|
@ -32,26 +32,12 @@ import mezz.jei.api.recipe.BlankRecipeWrapper;
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
import techreborn.api.generator.FluidGeneratorRecipe;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.DecimalFormatSymbols;
|
||||
import java.text.NumberFormat;
|
||||
import java.util.Locale;
|
||||
|
||||
public class FluidGeneratorRecipeWrapper extends BlankRecipeWrapper {
|
||||
|
||||
private static final DecimalFormat formatter;
|
||||
|
||||
static {
|
||||
formatter = (DecimalFormat) NumberFormat.getInstance(Locale.US);
|
||||
DecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols();
|
||||
|
||||
symbols.setGroupingSeparator(' ');
|
||||
formatter.setDecimalFormatSymbols(symbols);
|
||||
}
|
||||
|
||||
private static final int FLUID_GENERATOR_STORAGE = 100_000;
|
||||
|
||||
private final FluidGeneratorRecipe baseRecipe;
|
||||
|
@ -76,8 +62,9 @@ public class FluidGeneratorRecipeWrapper extends BlankRecipeWrapper {
|
|||
|
||||
energyProduced.draw(minecraft, 73, 26);
|
||||
|
||||
minecraft.fontRenderer.drawString(formatter.format(baseRecipe.getEnergyPerMb() * 1000) + " EU", 70, 13,
|
||||
0x444444);
|
||||
minecraft.fontRenderer
|
||||
.drawString(PowerSystem.getLocaliszedPowerFormattedNoSuffix(baseRecipe.getEnergyPerMb() * 1000) + " "
|
||||
+ PowerSystem.getDisplayPower().abbreviation, 70, 13, 0x444444);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue