diff --git a/src/main/java/gregtech/common/metatileentities/steam/SteamMiner.java b/src/main/java/gregtech/common/metatileentities/steam/SteamMiner.java index e3d3c75cb12..3f70bf75aaf 100644 --- a/src/main/java/gregtech/common/metatileentities/steam/SteamMiner.java +++ b/src/main/java/gregtech/common/metatileentities/steam/SteamMiner.java @@ -254,6 +254,7 @@ public void receiveCustomData(int dataId, PacketBuffer buf) { this.minerLogic.receiveCustomData(dataId, buf); } + @Override @SideOnly(Side.CLIENT) public Pair getParticleTexture() { return Pair.of(Textures.STEAM_CASING_BRONZE.getSpriteOnSide(SimpleSidedCubeRenderer.RenderSide.TOP), diff --git a/src/main/java/gregtech/common/metatileentities/steam/boiler/SteamBoiler.java b/src/main/java/gregtech/common/metatileentities/steam/boiler/SteamBoiler.java index b88dd4e658d..3d63eb651ab 100644 --- a/src/main/java/gregtech/common/metatileentities/steam/boiler/SteamBoiler.java +++ b/src/main/java/gregtech/common/metatileentities/steam/boiler/SteamBoiler.java @@ -216,7 +216,7 @@ private void updateCurrentTemperature() { if (fuelBurnTimeLeft % 2 == 0 && currentTemperature < getMaxTemperate()) currentTemperature++; fuelBurnTimeLeft -= isHighPressure ? 2 : 1; - if (fuelBurnTimeLeft == 0) { + if (fuelBurnTimeLeft <= 0) { this.fuelMaxBurnTime = 0; this.timeBeforeCoolingDown = getCooldownInterval(); // boiler has no fuel now, so queue burning state update @@ -306,6 +306,10 @@ public double getTemperaturePercent() { return currentTemperature / (getMaxTemperate() * 1.0); } + public int getCurrentTemperature() { + return currentTemperature; + } + public double getFuelLeftPercent() { return fuelMaxBurnTime == 0 ? 0.0 : fuelBurnTimeLeft / (fuelMaxBurnTime * 1.0); } diff --git a/src/main/java/gregtech/common/pipelike/itempipe/BlockItemPipe.java b/src/main/java/gregtech/common/pipelike/itempipe/BlockItemPipe.java index 85a18ca231c..7f6c79f9caa 100644 --- a/src/main/java/gregtech/common/pipelike/itempipe/BlockItemPipe.java +++ b/src/main/java/gregtech/common/pipelike/itempipe/BlockItemPipe.java @@ -77,6 +77,7 @@ public WorldItemPipeNet getWorldPipeNet(World world) { } @Override + @SideOnly(Side.CLIENT) protected Pair getParticleTexture(World world, BlockPos blockPos) { return ItemPipeRenderer.INSTANCE.getParticleTexture((TileEntityItemPipe) world.getTileEntity(blockPos)); } diff --git a/src/main/java/gregtech/common/pipelike/laser/BlockLaserPipe.java b/src/main/java/gregtech/common/pipelike/laser/BlockLaserPipe.java index ff6f9c693f8..1c3ac132b60 100644 --- a/src/main/java/gregtech/common/pipelike/laser/BlockLaserPipe.java +++ b/src/main/java/gregtech/common/pipelike/laser/BlockLaserPipe.java @@ -44,6 +44,7 @@ public BlockLaserPipe(@NotNull LaserPipeType pipeType) { } @Override + @SideOnly(Side.CLIENT) protected Pair getParticleTexture(World world, BlockPos blockPos) { return LaserPipeRenderer.INSTANCE.getParticleTexture((TileEntityLaserPipe) world.getTileEntity(blockPos)); } diff --git a/src/main/java/gregtech/common/pipelike/optical/BlockOpticalPipe.java b/src/main/java/gregtech/common/pipelike/optical/BlockOpticalPipe.java index 3e52f60faba..597fc322801 100644 --- a/src/main/java/gregtech/common/pipelike/optical/BlockOpticalPipe.java +++ b/src/main/java/gregtech/common/pipelike/optical/BlockOpticalPipe.java @@ -42,6 +42,7 @@ public BlockOpticalPipe(@NotNull OpticalPipeType pipeType) { } @Override + @SideOnly(Side.CLIENT) protected Pair getParticleTexture(@NotNull World world, BlockPos blockPos) { return OpticalPipeRenderer.INSTANCE.getParticleTexture((TileEntityOpticalPipe) world.getTileEntity(blockPos)); } diff --git a/src/main/java/gregtech/integration/jei/recipe/GTRecipeWrapper.java b/src/main/java/gregtech/integration/jei/recipe/GTRecipeWrapper.java index 7dae031a66a..4d88c1f1e5b 100644 --- a/src/main/java/gregtech/integration/jei/recipe/GTRecipeWrapper.java +++ b/src/main/java/gregtech/integration/jei/recipe/GTRecipeWrapper.java @@ -23,6 +23,7 @@ import gregtech.api.util.AssemblyLineManager; import gregtech.api.util.ClipboardUtil; import gregtech.api.util.GTUtility; +import gregtech.api.util.LocalizationUtils; import gregtech.api.util.TextFormattingUtil; import gregtech.client.utils.TooltipHelper; import gregtech.integration.RecipeCompatUtil; @@ -309,15 +310,22 @@ public List getTooltipStrings(int mouseX, int mouseY) { @Override public void initExtras() { - // do not add the X button if no tweaker mod is present + // do not add the info or X button if no tweaker mod is present if (!RecipeCompatUtil.isTweakerLoaded()) return; - BooleanSupplier creativePlayerCtPredicate = () -> Minecraft.getMinecraft().player != null && + BooleanSupplier creativePlayerPredicate = () -> Minecraft.getMinecraft().player != null && Minecraft.getMinecraft().player.isCreative(); + BooleanSupplier creativeTweaker = () -> creativePlayerPredicate.getAsBoolean() && + (recipe.getIsCTRecipe() || recipe.isGroovyRecipe()); + BooleanSupplier creativeDefault = () -> creativePlayerPredicate.getAsBoolean() && !recipe.getIsCTRecipe() && + !recipe.isGroovyRecipe(); + + // X Button buttons.add(new JeiButton(166, 2, 10, 10) .setTextures(GuiTextures.BUTTON_CLEAR_GRID) - .setTooltipBuilder(lines -> lines.add("Copies a " + RecipeCompatUtil.getTweakerName() + - " script, to remove this recipe, to the clipboard")) + .setTooltipBuilder(lines -> lines.add( + LocalizationUtils.format("gregtech.jei.remove_recipe.tooltip", + RecipeCompatUtil.getTweakerName()))) .setClickAction((minecraft, mouseX, mouseY, mouseButton) -> { String recipeLine = RecipeCompatUtil.getRecipeRemoveLine(recipeMap, recipe); String output = RecipeCompatUtil.getFirstOutputString(recipe); @@ -330,7 +338,16 @@ public void initExtras() { new TextComponentString("Copied [\u00A76" + recipeLine + "\u00A7r] to the clipboard")); return true; }) - .setActiveSupplier(creativePlayerCtPredicate)); + .setActiveSupplier(creativeDefault)); + + // CT/GS Info + buttons.add(new JeiButton(166, 2, 10, 10) + .setTextures(GuiTextures.INFO_ICON) + .setTooltipBuilder(lines -> lines.add(recipe.isGroovyRecipe() ? + LocalizationUtils.format("gregtech.jei.gs_recipe.tooltip") : + LocalizationUtils.format("gregtech.jei.ct_recipe.tooltip"))) + .setClickAction((mc, x, y, button) -> false) + .setActiveSupplier(creativeTweaker)); } public ChancedItemOutput getOutputChance(int slot) { diff --git a/src/main/java/gregtech/integration/theoneprobe/provider/SteamBoilerInfoProvider.java b/src/main/java/gregtech/integration/theoneprobe/provider/SteamBoilerInfoProvider.java index 248d0fc1d02..25decb1cba7 100644 --- a/src/main/java/gregtech/integration/theoneprobe/provider/SteamBoilerInfoProvider.java +++ b/src/main/java/gregtech/integration/theoneprobe/provider/SteamBoilerInfoProvider.java @@ -30,10 +30,9 @@ public void addProbeInfo(ProbeMode mode, IProbeInfo probeInfo, EntityPlayer play if (te instanceof IGregTechTileEntity igtte) { MetaTileEntity mte = igtte.getMetaTileEntity(); if (mte instanceof SteamBoiler boiler) { - if (boiler.isBurning()) { - // Boiler is active - int steamOutput = boiler.getTotalSteamOutput(); - + int steamOutput = boiler.getTotalSteamOutput(); + // If we are producing steam, or we have fuel + if (steamOutput > 0 || boiler.isBurning()) { // Creating steam if (steamOutput > 0 && boiler.hasWater()) { probeInfo.text(TextStyleClass.INFO + "{*gregtech.top.energy_production*} " + @@ -42,10 +41,18 @@ public void addProbeInfo(ProbeMode mode, IProbeInfo probeInfo, EntityPlayer play Materials.Steam.getUnlocalizedName() + "*}"); } + // Cooling Down + if (!boiler.isBurning()) { + probeInfo.text(TextStyleClass.INFO.toString() + TextFormatting.RED + + "{*gregtech.top.steam_cooling_down*}"); + } + // Initial heat-up - if (steamOutput <= 0) { + if (steamOutput <= 0 && boiler.getCurrentTemperature() > 0) { + // Current Temperature = the % until the boiler reaches 100 probeInfo.text(TextStyleClass.INFO.toString() + TextFormatting.RED + - "{*gregtech.top.steam_heating_up*}"); + "{*gregtech.top.steam_heating_up*} " + + TextFormattingUtil.formatNumbers(boiler.getCurrentTemperature()) + "%"); } // No water diff --git a/src/main/resources/assets/gregtech/lang/en_us.lang b/src/main/resources/assets/gregtech/lang/en_us.lang index 098b51612ee..4b6a49481b6 100644 --- a/src/main/resources/assets/gregtech/lang/en_us.lang +++ b/src/main/resources/assets/gregtech/lang/en_us.lang @@ -39,6 +39,10 @@ death.attack.screwdriver_lv=%s had their screws removed by %s enchantment.disjunction=Disjunction +gregtech.jei.remove_recipe.tooltip=Copies a %s Snippet to Remove this Recipe +gregtech.jei.ct_recipe.tooltip=CraftTweaker Recipe +gregtech.jei.gs_recipe.tooltip=GroovyScript Recipe + gregtech.machine.steam_grinder.name=Steam Grinder gregtech.multiblock.steam_grinder.description=A Multiblock Macerator at the Steam Age. Requires at least 14 Bronze Casings to form. Cannot use normal Input/Output busses, nor Fluid Hatches other than the Steam Hatch. gregtech.multiblock.steam.low_steam=Not enough Steam to run! @@ -62,7 +66,8 @@ gregtech.top.transform_up=Step Up gregtech.top.transform_down=Step Down gregtech.top.transform_input=Input: gregtech.top.transform_output=Output: -gregtech.top.steam_heating_up=Heating up +gregtech.top.steam_heating_up=Heating Up: +gregtech.top.steam_cooling_down=Cooling Down gregtech.top.steam_no_water=No Water gregtech.top.convert_eu=Converting §eEU§r -> §cFE§r