Skip to content

Commit

Permalink
better coke oven jei page
Browse files Browse the repository at this point in the history
  • Loading branch information
TechLord22 committed Aug 12, 2021
1 parent 19ce515 commit 254ea67
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
1 change: 1 addition & 0 deletions src/main/java/gregtech/api/gui/GuiTextures.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ public class GuiTextures {
public static final TextureArea PROGRESS_BAR_CANNER = TextureArea.fullImage("textures/gui/progress_bar/progress_bar_canner.png");
public static final TextureArea PROGRESS_BAR_CIRCUIT = TextureArea.fullImage("textures/gui/progress_bar/progress_bar_circuit.png");
public static final TextureArea PROGRESS_BAR_CIRCUIT_ASSEMBLER = TextureArea.fullImage("textures/gui/progress_bar/progress_bar_circuit_assembler.png");
public static final TextureArea PROGRESS_BAR_COKE_OVEN = TextureArea.fullImage("textures/gui/progress_bar/progress_bar_coke_oven.png");
public static final TextureArea PROGRESS_BAR_COMPRESS = TextureArea.fullImage("textures/gui/progress_bar/progress_bar_compress.png");
public static final TextureArea PROGRESS_BAR_CRACKING = TextureArea.fullImage("textures/gui/progress_bar/progress_bar_cracking.png");
public static final TextureArea PROGRESS_BAR_CRYSTALLIZATION = TextureArea.fullImage("textures/gui/progress_bar/progress_bar_crystallization.png");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,27 @@ public class CokeOvenRecipeCategory extends PrimitiveRecipeCategory<CokeOvenReci
protected final IDrawable slot;
protected final IDrawable progressBar;
protected final IDrawable fluidTank;
protected final IDrawable fluidTankOverlay;


public CokeOvenRecipeCategory(IGuiHelper guiHelper) {
super("coke_oven",
"gregtech.machine.coke_oven.name",
guiHelper.createBlankDrawable(176, 166), guiHelper);
guiHelper.createBlankDrawable(176, 60), guiHelper);

this.slot = guiHelper.drawableBuilder(GuiTextures.SLOT.imageLocation, 0, 0, 18, 18).setTextureSize(18, 18).build();
this.progressBar = guiHelper.drawableBuilder(GuiTextures.BRONZE_BLAST_FURNACE_PROGRESS_BAR.imageLocation, 0, 0, 20, 15).setTextureSize(20, 30).build();
this.fluidTank = guiHelper.drawableBuilder(GuiTextures.FLUID_TANK_BACKGROUND.imageLocation, 0, 0, 20, 58).setTextureSize(20, 58).build();
this.fluidTankOverlay = guiHelper.drawableBuilder(GuiTextures.FLUID_TANK_OVERLAY.imageLocation, 0, 0, 20, 58).setTextureSize(20, 58).build();
this.progressBar = guiHelper.drawableBuilder(GuiTextures.PROGRESS_BAR_COKE_OVEN.imageLocation, 0, 0, 36, 18).setTextureSize(36, 18).build();
this.fluidTank = guiHelper.drawableBuilder(GuiTextures.FLUID_SLOT.imageLocation, 0, 0, 18, 18).setTextureSize(18, 18).build();
// this.fluidTankOverlay = guiHelper.drawableBuilder(GuiTextures.FLUID_TANK_OVERLAY.imageLocation, 0, 0, 20, 58).setTextureSize(20, 58).build();
}

@Override
public void setRecipe(IRecipeLayout recipeLayout, @Nonnull CokeOvenRecipeWrapper recipeWrapper, @Nonnull IIngredients ingredients) {
IGuiItemStackGroup itemStackGroup = recipeLayout.getItemStacks();
IGuiFluidStackGroup fluidStackGroup = recipeLayout.getFluidStacks();
itemStackGroup.init(0, true, 32, 19);
itemStackGroup.init(1, false, 84, 19);
itemStackGroup.init(0, true, 51, 18);
itemStackGroup.init(1, false, 105, 9);
itemStackGroup.set(ingredients);
fluidStackGroup.init(0, false, 133, 3, 20, 58, 32000, true, this.fluidTankOverlay);
fluidStackGroup.init(0, false, 105, 27, 18, 18, 5000, false, null); //todo convert to modularUI, change capacity to 32B
fluidStackGroup.set(ingredients);
}

Expand All @@ -51,9 +50,9 @@ public IRecipeWrapper getRecipeWrapper(@Nonnull CokeOvenRecipe recipe) {

@Override
public void drawExtras(Minecraft minecraft) {
this.slot.draw(minecraft, 32, 19);
this.slot.draw(minecraft, 84, 19);
this.progressBar.draw(minecraft, 57, 20);
this.fluidTank.draw(minecraft, 133, 3);
this.slot.draw(minecraft, 51, 18);
this.slot.draw(minecraft, 105, 9);
this.progressBar.draw(minecraft, 69, 18);
this.fluidTank.draw(minecraft, 105, 27);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void getIngredients(IIngredients ingredients) {

@Override
public void drawInfo(Minecraft minecraft, int recipeWidth, int recipeHeight, int mouseX, int mouseY) {
minecraft.fontRenderer.drawString(I18n.format("gregtech.recipe.duration", this.recipe.getDuration() / 20f), 0, 60, 0x111111);
minecraft.fontRenderer.drawString(I18n.format("gregtech.recipe.duration", this.recipe.getDuration() / 20f), 0, 50, 0x111111);
}

}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 254ea67

Please sign in to comment.