Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed #270, #278, #279
  • Loading branch information
DisasterMoo committed Aug 9, 2019
1 parent b87b4d4 commit 2ddb65f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
Expand Up @@ -10,6 +10,7 @@
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.resources.I18n;
import net.minecraftforge.fml.client.config.GuiUtils;

import net.dries007.tfc.api.recipes.anvil.AnvilRecipe;
Expand Down Expand Up @@ -65,7 +66,7 @@ public void drawInfo(Minecraft minecraft, int recipeWidth, int recipeHeight, int
int y = 0;
if (mouseX >= x && mouseX <= x + 14 && mouseY >= y && mouseY <= y + 19)
{
GuiUtils.drawHoveringText(Collections.singletonList(Helpers.getEnumName(rule)), mouseX, mouseY, 154, 80, -1, minecraft.fontRenderer);
GuiUtils.drawHoveringText(Collections.singletonList(I18n.format(Helpers.getEnumName(rule))), mouseX, mouseY, 154, 80, -1, minecraft.fontRenderer);
}
}
}
Expand Down
Expand Up @@ -22,6 +22,7 @@
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.*;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.text.TextComponentTranslation;
import net.minecraft.world.World;
import net.minecraftforge.common.capabilities.ICapabilityProvider;
import net.minecraftforge.fluids.Fluid;
Expand Down Expand Up @@ -179,7 +180,8 @@ public String getItemStackDisplayName(@Nonnull ItemStack stack)
FluidStack fluidStack = bucketCap.drain(CAPACITY, false);
if (fluidStack != null)
{
return fluidStack.getLocalizedName() + " " + super.getItemStackDisplayName(stack);
String fluidname = fluidStack.getLocalizedName();
return new TextComponentTranslation("item.tfc.ceramics.fired.jug.filled", fluidname).getFormattedText();
}
}
return super.getItemStackDisplayName(stack);
Expand Down
Expand Up @@ -20,6 +20,7 @@
import net.minecraft.util.*;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.text.TextComponentTranslation;
import net.minecraft.world.World;
import net.minecraftforge.common.capabilities.ICapabilityProvider;
import net.minecraftforge.fluids.*;
Expand Down Expand Up @@ -162,7 +163,8 @@ public String getItemStackDisplayName(@Nonnull ItemStack stack)
FluidStack fluidStack = bucketCap.drain(CAPACITY, false);
if (fluidStack != null)
{
return fluidStack.getLocalizedName() + " " + super.getItemStackDisplayName(stack);
String fluidname = fluidStack.getLocalizedName();
return new TextComponentTranslation("item.tfc.wooden_bucket.filled", fluidname).getFormattedText();
}
}
return super.getItemStackDisplayName(stack);
Expand Down

0 comments on commit 2ddb65f

Please sign in to comment.