Skip to content

Commit

Permalink
Fixed Alloying JEI interface text elements
Browse files Browse the repository at this point in the history
  • Loading branch information
DisasterMoo committed Jul 20, 2019
1 parent 816688a commit f67d8f9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
2 changes: 2 additions & 0 deletions src/main/java/net/dries007/tfc/jei/TFCJEIPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import net.dries007.tfc.jei.wrappers.*;
import net.dries007.tfc.objects.blocks.BlocksTFC;
import net.dries007.tfc.objects.blocks.wood.BlockLoom;
import net.dries007.tfc.objects.items.ItemsTFC;
import net.dries007.tfc.objects.items.metal.ItemAnvil;

@JEIPlugin
Expand Down Expand Up @@ -108,5 +109,6 @@ public void register(IModRegistry registry)

registry.addRecipes(alloyRecipes, ALLOY_UID);
registry.addRecipeCatalyst(new ItemStack(BlocksTFC.CRUCIBLE), ALLOY_UID);
registry.addRecipeCatalyst(new ItemStack(ItemsTFC.CERAMICS_FIRED_VESSEL), ALLOY_UID);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public void drawExtras(Minecraft minecraft)
slot.draw(minecraft, 30, 16);
slot.draw(minecraft, 60, 16);
slot.draw(minecraft, 90, 16);
fire.draw(minecraft, 122, 16);
fireAnimated.draw(minecraft, 122, 16);
fire.draw(minecraft, 118, 16);
fireAnimated.draw(minecraft, 118, 16);
slot.draw(minecraft, 138, 16);
}

Expand Down
12 changes: 8 additions & 4 deletions src/main/java/net/dries007/tfc/jei/wrappers/AlloyWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import javax.annotation.ParametersAreNonnullByDefault;

import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.util.NonNullList;
import net.minecraftforge.fluids.FluidStack;

Expand Down Expand Up @@ -48,11 +49,14 @@ public void drawInfo(Minecraft minecraft, int recipeWidth, int recipeHeight, int
{
for (int i = 0; i < 4; i++)
{
int x = 15 + i * 30;
int y = 13;
float x = 14f + i * 60f;
float y = 15f;
String text = slotContent[i];
int stringWidth = minecraft.fontRenderer.getStringWidth(text);
minecraft.fontRenderer.drawString(text, x - stringWidth / 2, y, 0x000000, false);
x = x - minecraft.fontRenderer.getStringWidth(text) / 3.0f;
GlStateManager.pushMatrix();
GlStateManager.scale(0.5f, 0.5f, 0.5f);
minecraft.fontRenderer.drawString(text, x, y, 0x000000, false);
GlStateManager.popMatrix();
}
}
}
2 changes: 1 addition & 1 deletion src/main/resources/assets
Submodule assets updated 1 files
+1 −0 tfc/lang/en_us.lang

0 comments on commit f67d8f9

Please sign in to comment.