Merge remote-tracking branch 'origin/1.12' into 1.12

This commit is contained in:
modmuss50 2018-05-16 17:27:52 +01:00
commit 49a06b6044
26 changed files with 75 additions and 97 deletions

View file

@ -117,11 +117,11 @@ dependencies {
}
compile "mcp.mobius.waila:Hwyla:+"
compile "CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-4.0.12.323"
compile name: 'buildcraft', version: '7.99.16', ext: 'jar'
compile name: 'buildcraft', version: '7.99.17', ext: 'jar'
deobfCompile "mezz.jei:jei_1.12.2:+"
deobfCompile "mcjty.theoneprobe:TheOneProbe-1.12:1.12-1.4.19-11"
deobfCompile 'net.industrial-craft:industrialcraft-2:2.8.39-ex112'
deobfCompile 'net.industrial-craft:industrialcraft-2:2.8.+'
deobfCompile 'cofh:ThermalDynamics:1.12.2-2.3.9.3:universal', withoutOldJEI
deobfCompile 'cofh:ThermalExpansion:1.12.2-5.3.9.9:universal', withoutOldJEI
deobfCompile 'MCMultiPart2:MCMultiPart:2.4.1'

View file

@ -31,16 +31,16 @@ import mezz.jei.api.ingredients.IIngredients;
import net.minecraft.client.Minecraft;
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 reborncore.common.util.StringUtils;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.awt.*;
import java.util.List;
@SuppressWarnings("deprecation")
public class RecipeUtil {
private static final int color = Color.darkGray.getRGB();
@ -55,7 +55,8 @@ public class RecipeUtil {
int lineSpacing = fontRenderer.FONT_HEIGHT + 1;
String startCostEU = PowerSystem.getLocaliszedPower(startCost);
String startCostString = I18n.translateToLocalFormatted("techreborn.jei.recipe.start.cost", startCostEU);
//String startCostString = I18n.translateToLocalFormatted("techreborn.jei.recipe.start.cost", startCostEU);
String startCostString = StringUtils.t("techreborn.jei.recipe.start.cost", startCostEU);
fontRenderer.drawString(startCostString, x, y, color);
y += lineSpacing;
@ -68,18 +69,19 @@ public class RecipeUtil {
FontRenderer fontRenderer = minecraft.fontRenderer;
int lineSpacing = fontRenderer.FONT_HEIGHT + 1;
String runningCostString = I18n.translateToLocalFormatted("techreborn.jei.recipe.running.cost",PowerSystem.getDisplayPower().abbreviation.toUpperCase(), PowerSystem.getLocaliszedPowerFormattedNoSuffix(euPerTick));
String runningCostString = StringUtils.t("techreborn.jei.recipe.running.cost", PowerSystem.getDisplayPower().abbreviation.toUpperCase(), PowerSystem.getLocaliszedPowerFormattedNoSuffix(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;
String processingTimeString1 = I18n.translateToLocalFormatted("techreborn.jei.recipe.processing.time.1",
tickTime);
// String processingTimeString1 = I18n.translateToLocalFormatted("techreborn.jei.recipe.processing.time.1", tickTime);
String processingTimeString1 = StringUtils.t("techreborn.jei.recipe.processing.time.1", tickTime);
fontRenderer.drawString(processingTimeString1, x, y, color);
y += lineSpacing;
int seconds = tickTime / 20;
String processingTimeString2 = I18n.translateToLocalFormatted("techreborn.jei.recipe.processing.time.2",
seconds);
//String processingTimeString2 = I18n.translateToLocalFormatted("techreborn.jei.recipe.processing.time.2", seconds);
String processingTimeString2 = StringUtils.t("techreborn.jei.recipe.processing.time.2", seconds);
fontRenderer.drawString(processingTimeString2, x + 10, y, color);
}

View file

@ -39,7 +39,6 @@ import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.translation.I18n;
import net.minecraftforge.client.event.GuiScreenEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
@ -47,6 +46,7 @@ import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import org.lwjgl.input.Mouse;
import reborncore.api.recipe.RecipeHandler;
import reborncore.common.util.StringUtils;
import techreborn.Core;
import techreborn.api.fluidreplicator.FluidReplicatorRecipe;
import techreborn.api.fluidreplicator.FluidReplicatorRecipeList;
@ -300,11 +300,11 @@ public class TechRebornJeiPlugin implements IModPlugin {
TechRebornJeiPlugin.addDebugRecipes(registry);
}
registry.addIngredientInfo(ItemParts.getPartByName("rubberSap"), ItemStack.class, I18n.translateToLocal("techreborn.desc.rubberSap"));
registry.addIngredientInfo(ItemParts.getPartByName("rubberSap"), ItemStack.class, StringUtils.t("techreborn.desc.rubberSap"));
if (!BehaviorDispenseScrapbox.dispenseScrapboxes) {
registry.addIngredientInfo(new ItemStack(ModItems.SCRAP_BOX), ItemStack.class, I18n.translateToLocal("techreborn.desc.scrapBoxNoDispenser"));
registry.addIngredientInfo(new ItemStack(ModItems.SCRAP_BOX), ItemStack.class, StringUtils.t("techreborn.desc.scrapBoxNoDispenser"));
} else {
registry.addIngredientInfo(new ItemStack(ModItems.SCRAP_BOX), ItemStack.class, I18n.translateToLocal("techreborn.desc.scrapBox"));
registry.addIngredientInfo(new ItemStack(ModItems.SCRAP_BOX), ItemStack.class, StringUtils.t("techreborn.desc.scrapBox"));
}
//NEW ONES

View file

@ -31,14 +31,13 @@ import mezz.jei.api.gui.IRecipeLayout;
import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.IRecipeCategory;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import reborncore.common.util.StringUtils;
import techreborn.compat.jei.RecipeCategoryUids;
import techreborn.compat.jei.RecipeUtil;
import techreborn.lib.ModInfo;
import javax.annotation.Nonnull;
@SuppressWarnings("deprecation")
public class AlloySmelterRecipeCategory implements IRecipeCategory<AlloySmelterRecipeWrapper> {
public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/jei.png");
private static final int[] INPUT_SLOTS = { 0, 1 };
@ -49,7 +48,7 @@ public class AlloySmelterRecipeCategory implements IRecipeCategory<AlloySmelterR
public AlloySmelterRecipeCategory(IGuiHelper guiHelper) {
background = guiHelper.createDrawable(texture, 0, 172, 116, 52);
title = I18n.translateToLocal("tile.techreborn:alloy_smelter.name");
title = StringUtils.t("tile.techreborn:alloy_smelter.name");
}
@Override

View file

@ -29,14 +29,13 @@ import mezz.jei.api.gui.*;
import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.IRecipeCategory;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import reborncore.common.util.StringUtils;
import techreborn.compat.jei.RecipeCategoryUids;
import techreborn.compat.jei.RecipeUtil;
import techreborn.lib.ModInfo;
import javax.annotation.Nonnull;
@SuppressWarnings("deprecation")
public class AssemblingMachineRecipeCategory implements IRecipeCategory<AssemblingMachineRecipeWrapper> {
public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/jei.png");
private static final int[] INPUT_SLOTS = { 0, 1 };
@ -46,9 +45,8 @@ public class AssemblingMachineRecipeCategory implements IRecipeCategory<Assembli
private final String title;
public AssemblingMachineRecipeCategory(IGuiHelper guiHelper) {
// TO-DO add texture to JEI
background = guiHelper.createDrawable(texture, 0, 94, 120, 78);
title = I18n.translateToLocal("tile.techreborn.assemblingmachine.name");
background = guiHelper.createDrawable(texture, 125, 65, 74, 42);
title = StringUtils.t("tile.techreborn:assembly_machine.name");
}
@Override
@ -78,10 +76,9 @@ public class AssemblingMachineRecipeCategory implements IRecipeCategory<Assembli
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull AssemblingMachineRecipeWrapper recipeWrapper,
@Nonnull IIngredients ingredients) {
IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
// TODO: fix slots
guiItemStacks.init(INPUT_SLOTS[0], true, 0, 0);
guiItemStacks.init(INPUT_SLOTS[1], true, 18, 0);
guiItemStacks.init(OUTPUT_SLOTS[0], false, 69, 18);
guiItemStacks.init(INPUT_SLOTS[0], true, 3, 2);
guiItemStacks.init(INPUT_SLOTS[1], true, 3, 22);
guiItemStacks.init(OUTPUT_SLOTS[0], false, 49, 12);
RecipeUtil.setRecipeItems(recipeLayout, ingredients, INPUT_SLOTS, OUTPUT_SLOTS, null, null);
}

View file

@ -31,14 +31,13 @@ import mezz.jei.api.gui.IRecipeLayout;
import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.IRecipeCategory;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import reborncore.common.util.StringUtils;
import techreborn.compat.jei.RecipeCategoryUids;
import techreborn.compat.jei.RecipeUtil;
import techreborn.lib.ModInfo;
import javax.annotation.Nonnull;
@SuppressWarnings("deprecation")
public class BlastFurnaceRecipeCategory implements IRecipeCategory<BlastFurnaceRecipeWrapper> {
public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/jei.png");
private static final int[] INPUT_SLOTS = { 0, 1 };
@ -49,7 +48,7 @@ public class BlastFurnaceRecipeCategory implements IRecipeCategory<BlastFurnaceR
public BlastFurnaceRecipeCategory(IGuiHelper guiHelper) {
background = guiHelper.createDrawable(texture, 0, 94, 120, 78);
title = I18n.translateToLocal("tile.techreborn:industrial_blast_furnace.name");
title = StringUtils.t("tile.techreborn:industrial_blast_furnace.name");
}
@Override
@ -76,13 +75,8 @@ public class BlastFurnaceRecipeCategory implements IRecipeCategory<BlastFurnaceR
}
@Override
public void setRecipe(
@Nonnull
IRecipeLayout recipeLayout,
@Nonnull
BlastFurnaceRecipeWrapper recipeWrapper,
@Nonnull
IIngredients ingredients) {
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull BlastFurnaceRecipeWrapper recipeWrapper,
@Nonnull IIngredients ingredients) {
IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
guiItemStacks.init(INPUT_SLOTS[0], true, 21, 3);
guiItemStacks.init(INPUT_SLOTS[1], true, 21, 23);

View file

@ -31,14 +31,13 @@ import mezz.jei.api.gui.IRecipeLayout;
import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.IRecipeCategory;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import reborncore.common.util.StringUtils;
import techreborn.compat.jei.RecipeCategoryUids;
import techreborn.compat.jei.RecipeUtil;
import techreborn.lib.ModInfo;
import javax.annotation.Nonnull;
@SuppressWarnings("deprecation")
public class CentrifugeRecipeCategory implements IRecipeCategory<CentrifugeRecipeWrapper> {
public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/jei.png");
private static final int[] INPUT_SLOTS = { 0, 1 };
@ -48,7 +47,7 @@ public class CentrifugeRecipeCategory implements IRecipeCategory<CentrifugeRecip
public CentrifugeRecipeCategory(IGuiHelper guiHelper) {
background = guiHelper.createDrawable(texture, 0, 0, 104, 62);
title = I18n.translateToLocal("tile.techreborn:industrial_centrifuge.name");
title = StringUtils.t("tile.techreborn:industrial_centrifuge.name");
}
@Override

View file

@ -31,14 +31,14 @@ import mezz.jei.api.gui.IRecipeLayout;
import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.IRecipeCategory;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import reborncore.common.util.StringUtils;
import techreborn.compat.jei.RecipeCategoryUids;
import techreborn.compat.jei.RecipeUtil;
import techreborn.lib.ModInfo;
import javax.annotation.Nonnull;
@SuppressWarnings("deprecation")
public class ChemicalReactorRecipeCategory implements IRecipeCategory<ChemicalReactorRecipeWrapper> {
public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/jei.png");
private static final int[] INPUT_SLOTS = { 0, 1 };
@ -49,7 +49,7 @@ public class ChemicalReactorRecipeCategory implements IRecipeCategory<ChemicalRe
public ChemicalReactorRecipeCategory(IGuiHelper guiHelper) {
background = guiHelper.createDrawable(texture, 0, 172, 116, 52);
title = I18n.translateToLocal("tile.techreborn:chemical_reactor.name");
title = StringUtils.t("tile.techreborn:chemical_reactor.name");
}
@Override

View file

@ -31,14 +31,13 @@ import mezz.jei.api.gui.IRecipeLayout;
import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.IRecipeCategory;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import reborncore.common.util.StringUtils;
import techreborn.compat.jei.RecipeCategoryUids;
import techreborn.compat.jei.RecipeUtil;
import techreborn.lib.ModInfo;
import javax.annotation.Nonnull;
@SuppressWarnings("deprecation")
public class CompressorRecipeCategory implements IRecipeCategory<CompressorRecipeWrapper> {
private static final int[] INPUT_SLOTS = { 0 };
private static final int[] OUTPUT_SLOTS = { 1 };
@ -49,7 +48,7 @@ public class CompressorRecipeCategory implements IRecipeCategory<CompressorRecip
public CompressorRecipeCategory(IGuiHelper guiHelper) {
background = guiHelper.createDrawable(texture, 0, 62, 74, 32);
title = I18n.translateToLocal("tile.techreborn:compressor.name");
title = StringUtils.t("tile.techreborn:compressor.name");
}
@Override

View file

@ -31,18 +31,19 @@ import mezz.jei.api.gui.IRecipeLayout;
import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.IRecipeCategory;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import reborncore.common.util.StringUtils;
import techreborn.compat.jei.RecipeCategoryUids;
import techreborn.compat.jei.RecipeUtil;
import techreborn.lib.ModInfo;
import javax.annotation.Nonnull;
/**
* @author drcrazy
*
*/
@SuppressWarnings("deprecation")
public class DistillationTowerRecipeCategory implements IRecipeCategory<DistillationTowerRecipeWrapper> {
public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/jei.png");
@ -53,7 +54,7 @@ public class DistillationTowerRecipeCategory implements IRecipeCategory<Distilla
public DistillationTowerRecipeCategory(IGuiHelper guiHelper) {
background = guiHelper.createDrawable(texture, 0, 0, 104, 62);
title = I18n.translateToLocal("tile.techreborn:distillation_tower.name");
title = StringUtils.t("tile.techreborn:distillation_tower.name");
}
@Override

View file

@ -31,14 +31,13 @@ import mezz.jei.api.gui.IRecipeLayout;
import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.IRecipeCategory;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import reborncore.common.util.StringUtils;
import techreborn.compat.jei.RecipeCategoryUids;
import techreborn.compat.jei.RecipeUtil;
import techreborn.lib.ModInfo;
import javax.annotation.Nonnull;
@SuppressWarnings("deprecation")
public class ExtractorRecipeCategory implements IRecipeCategory<ExtractorRecipeWrapper> {
public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/jei.png");
private static final int[] INPUT_SLOTS = { 0 };
@ -49,7 +48,7 @@ public class ExtractorRecipeCategory implements IRecipeCategory<ExtractorRecipeW
public ExtractorRecipeCategory(IGuiHelper guiHelper) {
background = guiHelper.createDrawable(texture, 0, 62, 74, 32);
title = I18n.translateToLocal("tile.techreborn:extractor.name");
title = StringUtils.t("tile.techreborn:extractor.name");
}
@Override

View file

@ -32,7 +32,7 @@ import mezz.jei.api.gui.IRecipeLayout;
import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.IRecipeCategory;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import reborncore.common.util.StringUtils;
import techreborn.compat.jei.RecipeCategoryUids;
import techreborn.compat.jei.RecipeUtil;
import techreborn.lib.ModInfo;
@ -43,7 +43,6 @@ import javax.annotation.Nonnull;
* @author drcrazy
*
*/
@SuppressWarnings("deprecation")
public class FluidReplicatorRecipeCategory implements IRecipeCategory<FluidReplicatorRecipeWrapper> {
public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/jei.png");
private static final int[] OUTPUT_TANKS = { 0 };
@ -55,7 +54,7 @@ public class FluidReplicatorRecipeCategory implements IRecipeCategory<FluidRepli
public FluidReplicatorRecipeCategory(@Nonnull IGuiHelper guiHelper) {
this.background = guiHelper.createDrawable(texture, 125, 0, 72, 60);
this.tankOverlay = guiHelper.createDrawable(texture, 196, 0, 12, 47);
this.title = I18n.translateToLocal("tile.techreborn:fluid_replicator.name");
this.title = StringUtils.t("tile.techreborn:fluid_replicator.name");
}
@Override

View file

@ -32,13 +32,12 @@ import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.IRecipeCategory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import reborncore.common.util.StringUtils;
import techreborn.compat.jei.RecipeCategoryUids;
import techreborn.lib.ModInfo;
import javax.annotation.Nonnull;
@SuppressWarnings("deprecation")
public class FusionReactorRecipeCategory implements IRecipeCategory<FusionReactorRecipeWrapper> {
public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/jei.png");
@ -53,7 +52,7 @@ public class FusionReactorRecipeCategory implements IRecipeCategory<FusionReacto
public FusionReactorRecipeCategory(IGuiHelper guiHelper) {
background = guiHelper.createDrawable(texture, 0, 172, 116, 64, 0, 40, 20, 20);
title = I18n.translateToLocal("tile.techreborn:fusion_control_computer.name");
title = StringUtils.t("tile.techreborn:fusion_control_computer.name");
}
@Override

View file

@ -32,12 +32,11 @@ import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.IRecipeCategory;
import net.minecraft.client.Minecraft;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import reborncore.common.util.StringUtils;
import techreborn.api.generator.EFluidGenerator;
import techreborn.compat.jei.RecipeUtil;
import techreborn.lib.ModInfo;
@SuppressWarnings("deprecation")
public class FluidGeneratorRecipeCategory implements IRecipeCategory<FluidGeneratorRecipeWrapper> {
public static ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/jei_fluid_generator.png");
@ -53,7 +52,7 @@ public class FluidGeneratorRecipeCategory implements IRecipeCategory<FluidGenera
public FluidGeneratorRecipeCategory(EFluidGenerator generatorType, IGuiHelper guiHelper) {
background = guiHelper.createDrawable(texture, 42, 16, 102, 60);
tankOverlay = guiHelper.createDrawable(texture, 176, 72, 12, 47);
title = I18n.translateToLocal("techreborn.jei.category.generator." + generatorType.name().toLowerCase());
title = StringUtils.t("techreborn.jei.category.generator." + generatorType.name().toLowerCase());
this.generatorType = generatorType;
}

View file

@ -31,14 +31,13 @@ import mezz.jei.api.gui.IRecipeLayout;
import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.IRecipeCategory;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import reborncore.common.util.StringUtils;
import techreborn.compat.jei.RecipeCategoryUids;
import techreborn.compat.jei.RecipeUtil;
import techreborn.lib.ModInfo;
import javax.annotation.Nonnull;
@SuppressWarnings("deprecation")
public class GrinderRecipeCategory implements IRecipeCategory<GrinderRecipeWrapper> {
public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/jei.png");
private static final int[] INPUT_SLOTS = { 0 };
@ -49,7 +48,7 @@ public class GrinderRecipeCategory implements IRecipeCategory<GrinderRecipeWrapp
public GrinderRecipeCategory(IGuiHelper guiHelper) {
background = guiHelper.createDrawable(texture, 0, 62, 74, 32);
title = I18n.translateToLocal("tile.techreborn:grinder.name");
title = StringUtils.t("tile.techreborn:grinder.name");
}
@Override

View file

@ -31,14 +31,13 @@ import mezz.jei.api.gui.IRecipeLayout;
import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.IRecipeCategory;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import reborncore.common.util.StringUtils;
import techreborn.compat.jei.RecipeCategoryUids;
import techreborn.compat.jei.RecipeUtil;
import techreborn.lib.ModInfo;
import javax.annotation.Nonnull;
@SuppressWarnings("deprecation")
public class ImplosionCompressorRecipeCategory implements IRecipeCategory<ImplosionCompressorRecipeWrapper> {
public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/jei.png");
private static final int[] INPUT_SLOTS = {0, 1};
@ -49,7 +48,7 @@ public class ImplosionCompressorRecipeCategory implements IRecipeCategory<Implos
public ImplosionCompressorRecipeCategory(IGuiHelper guiHelper) {
background = guiHelper.createDrawable(texture, 0, 95, 120, 42);
title = I18n.translateToLocal("tile.techreborn:implosion_compressor.name");
title = StringUtils.t("tile.techreborn:implosion_compressor.name");
}
@Override

View file

@ -31,14 +31,13 @@ import mezz.jei.api.gui.IRecipeLayout;
import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.IRecipeCategory;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import reborncore.common.util.StringUtils;
import techreborn.compat.jei.RecipeCategoryUids;
import techreborn.compat.jei.RecipeUtil;
import techreborn.lib.ModInfo;
import javax.annotation.Nonnull;
@SuppressWarnings("deprecation")
public class IndustrialElectrolyzerRecipeCategory implements IRecipeCategory<IndustrialElectrolyzerRecipeWrapper> {
private static final int[] INPUT_SLOTS = { 0, 1 };
private static final int[] OUTPUT_SLOTS = { 2, 3, 4, 5 };
@ -51,7 +50,7 @@ public class IndustrialElectrolyzerRecipeCategory implements IRecipeCategory<Ind
public IndustrialElectrolyzerRecipeCategory(IGuiHelper guiHelper) {
background = guiHelper.createDrawable(texture, 49, 18, 78, 50);
title = I18n.translateToLocal("tile.techreborn:industrial_electrolyzer.name");
title = StringUtils.t("tile.techreborn:industrial_electrolyzer.name");
}
@Override

View file

@ -33,7 +33,7 @@ import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.IRecipeCategory;
import net.minecraft.client.Minecraft;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import reborncore.common.util.StringUtils;
import techreborn.compat.jei.RecipeCategoryUids;
import techreborn.compat.jei.RecipeUtil;
import techreborn.lib.ModInfo;
@ -41,7 +41,6 @@ import techreborn.tiles.multiblock.TileIndustrialGrinder;
import javax.annotation.Nonnull;
@SuppressWarnings("deprecation")
public class IndustrialGrinderRecipeCategory implements IRecipeCategory<IndustrialGrinderRecipeWrapper> {
public static final ResourceLocation texture = new ResourceLocation("techreborn",
@ -50,8 +49,8 @@ public class IndustrialGrinderRecipeCategory implements IRecipeCategory<Industri
private static final int[] OUTPUT_SLOTS = { 2, 3, 4, 5 };
private static final int[] INPUT_TANKS = { 0 };
private final IDrawable background;
private final IDrawable blankArea; // for covering the lightning power
// symbol
// for covering the lightning power symbol
private final IDrawable blankArea;
private final IDrawable tankOverlay;
private final String title;
@ -59,7 +58,7 @@ public class IndustrialGrinderRecipeCategory implements IRecipeCategory<Industri
background = guiHelper.createDrawable(texture, 7, 15, 141, 55);
blankArea = guiHelper.createDrawable(texture, 50, 45, 6, 6);
tankOverlay = guiHelper.createDrawable(texture, 176, 86, 12, 47);
title = I18n.translateToLocal("tile.techreborn:industrial_grinder.name");
title = StringUtils.t("tile.techreborn:industrial_grinder.name");
}
@Override

View file

@ -31,8 +31,8 @@ import mezz.jei.api.gui.IGuiItemStackGroup;
import mezz.jei.api.gui.IRecipeLayout;
import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.IRecipeCategory;
import mezz.jei.util.Translator;
import net.minecraft.util.ResourceLocation;
import reborncore.common.util.StringUtils;
import techreborn.compat.jei.RecipeCategoryUids;
import techreborn.compat.jei.RecipeUtil;
import techreborn.lib.ModInfo;
@ -52,7 +52,7 @@ public class IndustrialSawmillRecipeCategory implements IRecipeCategory<Industri
private static final int[] INPUT_TANKS = { 0 };
public IndustrialSawmillRecipeCategory(IGuiHelper guiHelper) {
title = Translator.translateToLocal("tile.techreborn:industrial_sawmill.name");
title = StringUtils.t("tile.techreborn:industrial_sawmill.name");
background = guiHelper.createDrawable(texture, 7, 15, 141, 55);
tankOverlay = guiHelper.createDrawable(texture, 176, 86, 12, 47);
}

View file

@ -31,13 +31,12 @@ import mezz.jei.api.recipe.IRecipeCategory;
import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import reborncore.common.util.StringUtils;
import techreborn.compat.jei.RecipeCategoryUids;
import techreborn.lib.ModInfo;
import javax.annotation.Nonnull;
@SuppressWarnings("deprecation")
public class RollingMachineRecipeCategory implements IRecipeCategory<RollingMachineRecipeWrapper> {
private static final int[] INPUT_SLOTS = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
private static final int[] OUTPUT_SLOTS = { 10 };
@ -51,7 +50,7 @@ public class RollingMachineRecipeCategory implements IRecipeCategory<RollingMach
public RollingMachineRecipeCategory(IGuiHelper guiHelper) {
background = guiHelper.createDrawable(texture, 29, 16, 116, 54);
title = I18n.translateToLocal("tile.techreborn:rolling_machine.name");
title = StringUtils.t("tile.techreborn:rolling_machine.name");
IDrawableStatic progressStatic = guiHelper.createDrawable(texture, 176, 14, 20, 18);
progress = guiHelper.createAnimatedDrawable(progressStatic, 250, IDrawableAnimated.StartDirection.LEFT, false);

View file

@ -31,14 +31,13 @@ import mezz.jei.api.gui.IRecipeLayout;
import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.IRecipeCategory;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import reborncore.common.util.StringUtils;
import techreborn.compat.jei.RecipeCategoryUids;
import techreborn.compat.jei.RecipeUtil;
import techreborn.lib.ModInfo;
import javax.annotation.Nonnull;
@SuppressWarnings("deprecation")
public class ScrapboxRecipeCategory implements IRecipeCategory<ScrapboxRecipeWrapper> {
public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/jei.png");
private static final int[] INPUT_SLOTS = { 0 };
@ -49,7 +48,7 @@ public class ScrapboxRecipeCategory implements IRecipeCategory<ScrapboxRecipeWra
public ScrapboxRecipeCategory(IGuiHelper guiHelper) {
background = guiHelper.createDrawable(texture, 0, 62, 74, 32);
title = I18n.translateToLocal("jei.techreborn.scrapbox.name");
title = StringUtils.t("jei.techreborn.scrapbox.name");
}
@Override

View file

@ -31,14 +31,13 @@ import mezz.jei.api.gui.IRecipeLayout;
import mezz.jei.api.ingredients.IIngredients;
import mezz.jei.api.recipe.IRecipeCategory;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.translation.I18n;
import reborncore.common.util.StringUtils;
import techreborn.compat.jei.RecipeCategoryUids;
import techreborn.compat.jei.RecipeUtil;
import techreborn.lib.ModInfo;
import javax.annotation.Nonnull;
@SuppressWarnings("deprecation")
public class VacuumFreezerRecipeCategory implements IRecipeCategory<VacuumFreezerRecipeWrapper> {
public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/jei.png");
private static final int[] INPUT_SLOTS = { 0 };
@ -49,7 +48,7 @@ public class VacuumFreezerRecipeCategory implements IRecipeCategory<VacuumFreeze
public VacuumFreezerRecipeCategory(IGuiHelper guiHelper) {
background = guiHelper.createDrawable(texture, 0, 62, 74, 32);
title = I18n.translateToLocal("tile.techreborn:vacuum_freezer.name");
title = StringUtils.t("tile.techreborn:vacuum_freezer.name");
}
@Override

View file

@ -32,7 +32,6 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.translation.I18n;
import net.minecraft.world.World;
import reborncore.api.IListInfoProvider;
import reborncore.api.power.IEnergyInterfaceTile;
@ -40,6 +39,7 @@ import reborncore.common.RebornCoreConfig;
import reborncore.common.powerSystem.PowerSystem;
import reborncore.common.tile.TileLegacyMachineBase;
import reborncore.common.util.Inventory;
import reborncore.common.util.StringUtils;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
@ -52,7 +52,6 @@ import java.util.stream.Collectors;
/**
* Created by Mark on 04/06/2016.
*/
@SuppressWarnings("deprecation")
public class ProbeProvider implements IProbeInfoProvider {
ProgressStyle euStyle = new ProgressStyle().backgroundColor(0xFF8B8B8B).borderColor(0xFF373737).alternateFilledColor(PowerSystem.getDisplayPower().altColour).filledColor(PowerSystem.getDisplayPower().colour);
@ -104,7 +103,7 @@ public class ProbeProvider implements IProbeInfoProvider {
TileLegacyMachineBase legacyMachineBase = (TileLegacyMachineBase) tile;
if (legacyMachineBase.getInventoryForTile().isPresent()) {
if (player.isSneaking()) {
probeInfo.text(I18n.translateToLocal("techreborn.tooltip.inventory"));
probeInfo.text(StringUtils.t("techreborn.tooltip.inventory"));
}
Inventory inventory = legacyMachineBase.getInventoryForTile().get();
if(!inventory.isEmpty()){
@ -118,7 +117,7 @@ public class ProbeProvider implements IProbeInfoProvider {
}
if (!legacyMachineBase.upgradeInventory.isEmpty() && player.isSneaking()) {
probeInfo.horizontal();
probeInfo.text(I18n.translateToLocal("techreborn.tooltip.upgrades"));
probeInfo.text(StringUtils.t("techreborn.tooltip.upgrades"));
List<ItemStack> stacks = Arrays.stream(legacyMachineBase.upgradeInventory.contents).filter(stack -> !stack.isEmpty()).collect(Collectors.toList());
try {
methodHandle_addStacks.invoke(probeInfo, world, null, stacks, player.isSneaking());

View file

@ -40,12 +40,13 @@ import net.minecraft.util.EnumHand;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.text.translation.I18n;
import net.minecraft.world.World;
import net.minecraftforge.common.capabilities.ICapabilityProvider;
import net.minecraftforge.fluids.*;
import net.minecraftforge.fluids.capability.IFluidHandlerItem;
import net.minecraftforge.fluids.capability.templates.FluidHandlerItemStack;
import reborncore.common.util.StringUtils;
import org.apache.commons.lang3.Validate;
import techreborn.client.TechRebornCreativeTab;
import techreborn.events.TRRecipeHandler;
@ -54,7 +55,6 @@ import techreborn.init.ModItems;
/**
* Created by modmuss50 on 17/05/2016.
*/
@SuppressWarnings("deprecation")
public class DynamicCell extends Item {
public static final int CAPACITY = Fluid.BUCKET_VOLUME;
@ -164,7 +164,7 @@ public class DynamicCell extends Item {
FluidStack fluidStack = getFluidHandler(stack).getFluid();
if (fluidStack == null)
return super.getItemStackDisplayName(stack);
return I18n.translateToLocal("item.techreborn.cell.fluid.name").replaceAll("\\$fluid\\$", fluidStack.getLocalizedName());
return StringUtils.t("item.techreborn.cell.fluid.name").replaceAll("\\$fluid\\$", fluidStack.getLocalizedName());
}
@Override

View file

@ -31,7 +31,6 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ITickable;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.util.text.translation.I18n;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.energy.CapabilityEnergy;
import net.minecraftforge.energy.IEnergyStorage;
@ -48,7 +47,7 @@ import java.util.List;
/**
* Created by modmuss50 on 19/05/2017.
*/
@SuppressWarnings("deprecation")
public class TileCable extends TileEntity implements ITickable, IEnergyStorage, IListInfoProvider {
public int power = 0;
private int transferRate = 0;
@ -248,10 +247,10 @@ public class TileCable extends TileEntity implements ITickable, IEnergyStorage,
@Override
public void addInfo(List<String> info, boolean isRealTile) {
if (isRealTile) {
info.add(TextFormatting.GRAY + I18n.translateToLocal("techreborn.tooltip.transferRate") + ": "
info.add(TextFormatting.GRAY + StringUtils.t("techreborn.tooltip.transferRate") + ": "
+ TextFormatting.GOLD
+ PowerSystem.getLocaliszedPowerFormatted(this.transferRate / RebornCoreConfig.euPerFU) + "/t");
info.add(TextFormatting.GRAY + I18n.translateToLocal("techreborn.tooltip.tier") + ": "
+ PowerSystem.getLocaliszedPowerFormatted(transferRate / RebornCoreConfig.euPerFU) + "/t");
info.add(TextFormatting.GRAY + StringUtils.t("techreborn.tooltip.tier") + ": "
+ TextFormatting.GOLD + StringUtils.toFirstCapitalAllLowercase(this.cableType.tier.toString()));
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB