From 185d84c9041948fe7805d8996898ade183041818 Mon Sep 17 00:00:00 2001 From: drcrazy Date: Thu, 10 May 2018 18:32:11 +0300 Subject: [PATCH 1/3] Added JEI support for assembly machine. Closes #1512 --- .../AssemblingMachineRecipeCategory.java | 12 +++++------- .../assets/techreborn/textures/gui/jei.png | Bin 2748 -> 1594 bytes 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/main/java/techreborn/compat/jei/assemblingMachine/AssemblingMachineRecipeCategory.java b/src/main/java/techreborn/compat/jei/assemblingMachine/AssemblingMachineRecipeCategory.java index b49107631..d6d4dec9e 100644 --- a/src/main/java/techreborn/compat/jei/assemblingMachine/AssemblingMachineRecipeCategory.java +++ b/src/main/java/techreborn/compat/jei/assemblingMachine/AssemblingMachineRecipeCategory.java @@ -46,9 +46,8 @@ public class AssemblingMachineRecipeCategory implements IRecipeCategoryil1ID(R>2l=PD z_rtCfNxd3b0b=2J(>9Ipe&1l*-6J0ke@yat=5A+rI)mM1!viWyrKeINbz> zH|z4I+fhKF45_WOr=q%K6xtfG*}%mTWV*ts9%WqJjq#Z{q6X+sGu71XSQd$a5C=BE zm8@`VV5+Xg-9qp8F_GQOU48j&?#7(j_=cW}?m%@TmE5HpTPkYqabmJX(kUz5@@8Mo zTzz$gVp8Eefrbv#Bnpq6UV$8gA-jytz0>R=%GW5Csy4hYRovx;vT;?db)+HR=wjqX z`#xuUU%9ADHa#;Vd|a5^HMAH6u{jr3FUo>9Ho(uVoasF7YrpJu!2=&Cs}{wo`3d>& zs`P8Tl=HjvWnThaMauU|<`9LoD50(#S!A$Z7D#65kbFYL1bP+9wOH^DR(oq&vUBa(di^R09}e)u2(L6n>%kLdJRz_tz>%3;MF9f_00JwbQ(H02wFCxs z>oB!PM6dwl`6Ckp3>>bSXE*rBQE-5VVPBdOlNcDxPai{%->44cBrHW@a=1Br-dvOC z+&=wkC*T1oS|+7kx?jR@TW2B{>b62VC((-4vpli zT7(Mu;zAV?ywP8r*R}-1JJ5t#CEa_U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S8J!jqIGrd!AiTvF4-#C|NQ7|*~Ww;+eIX#TPa z7gkV~M8D-pc`ZM4awA*-feD$ouB%p(Bzpds0bbWxVFwrq&E>|o8+$&wy8R?Vsh&N^ z;XdxsLXk?0Kbz+wmzE^tLQ%4)z<{*<4X&#mj&yr zK=ZRbtdHplb^n03EI(1No0Q8-$v-eL{_+A^S42Le)^N;G;SeBS+EA9GPSmvU{s U1Uyg^Z$T{BSvgtO9QFJ5XNU_3qyPW_ From 3d2cbe4e748d106d16dcb7a76f24e22261a74c28 Mon Sep 17 00:00:00 2001 From: drcrazy Date: Fri, 11 May 2018 15:00:16 +0300 Subject: [PATCH 2/3] Updated IC2 and BC versions --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index e86b8c263..8993ed16f 100644 --- a/build.gradle +++ b/build.gradle @@ -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' From 134198c948741de3131be17748a36fa54045bb32 Mon Sep 17 00:00:00 2001 From: drcrazy Date: Mon, 14 May 2018 12:24:44 +0300 Subject: [PATCH 3/3] Updated i18n usage. --- .../java/techreborn/compat/jei/RecipeUtil.java | 18 ++++++++++-------- .../compat/jei/TechRebornJeiPlugin.java | 8 ++++---- .../AlloySmelterRecipeCategory.java | 5 ++--- .../AssemblingMachineRecipeCategory.java | 5 ++--- .../BlastFurnaceRecipeCategory.java | 14 ++++---------- .../centrifuge/CentrifugeRecipeCategory.java | 5 ++--- .../ChemicalReactorRecipeCategory.java | 6 +++--- .../compressor/CompressorRecipeCategory.java | 5 ++--- .../DistillationTowerRecipeCategory.java | 7 ++++--- .../jei/extractor/ExtractorRecipeCategory.java | 5 ++--- .../FluidReplicatorRecipeCategory.java | 5 ++--- .../FusionReactorRecipeCategory.java | 5 ++--- .../fluid/FluidGeneratorRecipeCategory.java | 5 ++--- .../jei/grinder/GrinderRecipeCategory.java | 5 ++--- .../ImplosionCompressorRecipeCategory.java | 5 ++--- .../IndustrialElectrolyzerRecipeCategory.java | 5 ++--- .../IndustrialGrinderRecipeCategory.java | 9 ++++----- .../IndustrialSawmillRecipeCategory.java | 4 ++-- .../RollingMachineRecipeCategory.java | 5 ++--- .../jei/scrapbox/ScrapboxRecipeCategory.java | 5 ++--- .../VacuumFreezerRecipeCategory.java | 5 ++--- .../compat/theoneprobe/ProbeProvider.java | 7 +++---- .../java/techreborn/items/DynamicCell.java | 6 +++--- .../java/techreborn/tiles/cable/TileCable.java | 9 ++++----- 24 files changed, 69 insertions(+), 89 deletions(-) diff --git a/src/main/java/techreborn/compat/jei/RecipeUtil.java b/src/main/java/techreborn/compat/jei/RecipeUtil.java index e3c1d6c34..4d6f382ad 100644 --- a/src/main/java/techreborn/compat/jei/RecipeUtil.java +++ b/src/main/java/techreborn/compat/jei/RecipeUtil.java @@ -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); } diff --git a/src/main/java/techreborn/compat/jei/TechRebornJeiPlugin.java b/src/main/java/techreborn/compat/jei/TechRebornJeiPlugin.java index 15b6ef920..95c7c1010 100644 --- a/src/main/java/techreborn/compat/jei/TechRebornJeiPlugin.java +++ b/src/main/java/techreborn/compat/jei/TechRebornJeiPlugin.java @@ -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 diff --git a/src/main/java/techreborn/compat/jei/alloySmelter/AlloySmelterRecipeCategory.java b/src/main/java/techreborn/compat/jei/alloySmelter/AlloySmelterRecipeCategory.java index 5b477ab23..8e9a116d6 100644 --- a/src/main/java/techreborn/compat/jei/alloySmelter/AlloySmelterRecipeCategory.java +++ b/src/main/java/techreborn/compat/jei/alloySmelter/AlloySmelterRecipeCategory.java @@ -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 { 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 { public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/jei.png"); private static final int[] INPUT_SLOTS = { 0, 1 }; @@ -47,7 +46,7 @@ public class AssemblingMachineRecipeCategory implements IRecipeCategory { 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 { 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 { 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 { private static final int[] INPUT_SLOTS = { 0 }; private static final int[] OUTPUT_SLOTS = { 1 }; @@ -49,7 +48,7 @@ public class CompressorRecipeCategory implements IRecipeCategory { public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/jei.png"); @@ -53,7 +54,7 @@ public class DistillationTowerRecipeCategory implements IRecipeCategory { 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 { 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 { public static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/jei.png"); @@ -53,7 +52,7 @@ public class FusionReactorRecipeCategory implements IRecipeCategory { public static ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/jei_fluid_generator.png"); @@ -53,7 +52,7 @@ public class FluidGeneratorRecipeCategory implements IRecipeCategory { 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 { 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 { 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 { public static final ResourceLocation texture = new ResourceLocation("techreborn", @@ -50,8 +49,8 @@ public class IndustrialGrinderRecipeCategory implements IRecipeCategory { 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 { 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 { 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 stacks = Arrays.stream(legacyMachineBase.upgradeInventory.contents).filter(stack -> !stack.isEmpty()).collect(Collectors.toList()); try { methodHandle_addStacks.invoke(probeInfo, world, null, stacks, player.isSneaking()); diff --git a/src/main/java/techreborn/items/DynamicCell.java b/src/main/java/techreborn/items/DynamicCell.java index 52c5be00d..69e2ce69b 100644 --- a/src/main/java/techreborn/items/DynamicCell.java +++ b/src/main/java/techreborn/items/DynamicCell.java @@ -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 diff --git a/src/main/java/techreborn/tiles/cable/TileCable.java b/src/main/java/techreborn/tiles/cable/TileCable.java index 7fbd56fd2..e26f86582 100644 --- a/src/main/java/techreborn/tiles/cable/TileCable.java +++ b/src/main/java/techreborn/tiles/cable/TileCable.java @@ -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 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())); } }