From 76bcc42c82cc1249f4fecbe197528ce04f32625f Mon Sep 17 00:00:00 2001 From: mezz Date: Sun, 1 May 2016 16:56:23 -0700 Subject: [PATCH] Crop JEI recipes more closely so more fit on a page and they're centered --- gradle.properties | 2 +- .../recipes/jei/bottler/BottlerRecipeCategory.java | 10 +++++----- .../jei/centrifuge/CentrifugeRecipeCategory.java | 10 +++++----- .../jei/fermenter/FermenterRecipeCategory.java | 14 +++++++------- .../jei/squeezer/SqueezerRecipeCategory.java | 2 +- .../recipes/jei/still/StillRecipeCategory.java | 8 ++++---- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/gradle.properties b/gradle.properties index 45a5be0f6..75b01ffc9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ mcversion=1.8.9 forgeversion=11.15.1.1855 mcp_mappings=snapshot_20160223 -jei_version=2.28.+ +jei_version=2.28.18.+ ic2_version=2.3.235-ex18 version_major=5 diff --git a/src/main/java/forestry/factory/recipes/jei/bottler/BottlerRecipeCategory.java b/src/main/java/forestry/factory/recipes/jei/bottler/BottlerRecipeCategory.java index 5ad7a51f5..8b011ffdb 100644 --- a/src/main/java/forestry/factory/recipes/jei/bottler/BottlerRecipeCategory.java +++ b/src/main/java/forestry/factory/recipes/jei/bottler/BottlerRecipeCategory.java @@ -31,7 +31,7 @@ public class BottlerRecipeCategory extends ForestryRecipeCategory { private final IDrawable tankOverlay; public BottlerRecipeCategory(IGuiHelper guiHelper) { - super(guiHelper.createDrawable(guiTexture, 48, 11, 123, 65), "tile.for.factory.bottler.name"); + super(guiHelper.createDrawable(guiTexture, 52, 16, 81, 60), "tile.for.factory.bottler.name"); IDrawableStatic arrowDrawable = guiHelper.createDrawable(guiTexture, 176, 74, 24, 17); this.arrow = guiHelper.createAnimatedDrawable(arrowDrawable, 200, IDrawableAnimated.StartDirection.LEFT, false); @@ -46,7 +46,7 @@ public class BottlerRecipeCategory extends ForestryRecipeCategory { @Override public void drawAnimations(@Nonnull Minecraft minecraft) { - arrow.draw(minecraft, 32, 28); + arrow.draw(minecraft, 28, 23); } @Override @@ -54,10 +54,10 @@ public class BottlerRecipeCategory extends ForestryRecipeCategory { IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks(); IGuiFluidStackGroup guiFluidStacks = recipeLayout.getFluidStacks(); - guiItemStacks.init(emptySlot, true, 67, 7); - guiItemStacks.init(outputSlot, false, 67, 43); + guiItemStacks.init(emptySlot, true, 63, 2); + guiItemStacks.init(outputSlot, false, 63, 38); - guiFluidStacks.init(inputTank, true, 5, 6, 16, 58, 10000, false, tankOverlay); + guiFluidStacks.init(inputTank, true, 1, 1, 16, 58, 10000, false, tankOverlay); guiItemStacks.setFromRecipe(emptySlot, recipeWrapper.getInputs()); guiItemStacks.setFromRecipe(outputSlot, recipeWrapper.getOutputs()); diff --git a/src/main/java/forestry/factory/recipes/jei/centrifuge/CentrifugeRecipeCategory.java b/src/main/java/forestry/factory/recipes/jei/centrifuge/CentrifugeRecipeCategory.java index b7052539f..a597e9a42 100644 --- a/src/main/java/forestry/factory/recipes/jei/centrifuge/CentrifugeRecipeCategory.java +++ b/src/main/java/forestry/factory/recipes/jei/centrifuge/CentrifugeRecipeCategory.java @@ -44,7 +44,7 @@ public class CentrifugeRecipeCategory extends ForestryRecipeCategory { private final ForestryTooltipCallback tooltip = new ForestryTooltipCallback(); public CentrifugeRecipeCategory(IGuiHelper guiHelper) { - super(guiHelper.createDrawable(guiTexture, 5, 14, 166, 65), "tile.for.factory.centrifuge.name"); + super(guiHelper.createDrawable(guiTexture, 25, 18, 126, 54), "tile.for.factory.centrifuge.name"); IDrawableStatic arrowDrawable = guiHelper.createDrawable(guiTexture, 176, 0, 4, 17); this.arrow = guiHelper.createAnimatedDrawable(arrowDrawable, 80, IDrawableAnimated.StartDirection.BOTTOM, false); @@ -58,14 +58,14 @@ public class CentrifugeRecipeCategory extends ForestryRecipeCategory { @Override public void drawAnimations(@Nonnull Minecraft minecraft) { - arrow.draw(minecraft, 53, 22); + arrow.draw(minecraft, 33, 18); } @Override public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) { IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks(); - guiItemStacks.init(inputSlot, true, 24, 22); + guiItemStacks.init(inputSlot, true, 4, 18); guiItemStacks.setFromRecipe(inputSlot, recipeWrapper.getInputs()); CentrifugeRecipeWrapper centrifugeWrapper = (CentrifugeRecipeWrapper) recipeWrapper; setResults(centrifugeWrapper.getRecipe().getAllProducts(), (GuiItemStackGroup) guiItemStacks); @@ -86,8 +86,8 @@ public class CentrifugeRecipeCategory extends ForestryRecipeCategory { if (i >= OUTPUTS.length) { return; } - int x = 92 + OUTPUTS[i][0] * 18; - int y = 4 + OUTPUTS[i][1] * 18; + int x = 72 + OUTPUTS[i][0] * 18; + int y = OUTPUTS[i][1] * 18; int ID = outputSlot + i; guiItemStacks.init(ID, false, x, y); guiItemStacks.set(ID, stack.getKey()); diff --git a/src/main/java/forestry/factory/recipes/jei/fermenter/FermenterRecipeCategory.java b/src/main/java/forestry/factory/recipes/jei/fermenter/FermenterRecipeCategory.java index 84a80c70e..09469ec07 100644 --- a/src/main/java/forestry/factory/recipes/jei/fermenter/FermenterRecipeCategory.java +++ b/src/main/java/forestry/factory/recipes/jei/fermenter/FermenterRecipeCategory.java @@ -40,7 +40,7 @@ public class FermenterRecipeCategory extends ForestryRecipeCategory { private final IDrawable tankOverlay; public FermenterRecipeCategory(IGuiHelper guiHelper) { - super(guiHelper.createDrawable(guiTexture, 30, 15, 116, 65), "tile.for.factory.fermenter.name"); + super(guiHelper.createDrawable(guiTexture, 34, 18, 108, 60), "tile.for.factory.fermenter.name"); IDrawableStatic progressBarDrawable0 = guiHelper.createDrawable(guiTexture, 176, 60, 4, 18); this.progressBar0 = guiHelper.createAnimatedDrawable(progressBarDrawable0, 40, IDrawableAnimated.StartDirection.BOTTOM, false); @@ -57,8 +57,8 @@ public class FermenterRecipeCategory extends ForestryRecipeCategory { @Override public void drawAnimations(@Nonnull Minecraft minecraft) { - progressBar0.draw(minecraft, 44, 17); - progressBar1.draw(minecraft, 68, 31); + progressBar0.draw(minecraft, 40, 14); + progressBar1.draw(minecraft, 64, 28); } @Override @@ -66,11 +66,11 @@ public class FermenterRecipeCategory extends ForestryRecipeCategory { IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks(); IGuiFluidStackGroup guiFluidStacks = recipeLayout.getFluidStacks(); - guiItemStacks.init(resourceSlot, true, 54, 7); - guiItemStacks.init(fuelSlot, true, 44, 41); + guiItemStacks.init(resourceSlot, true, 50, 4); + guiItemStacks.init(fuelSlot, true, 40, 38); - guiFluidStacks.init(inputTank, true, 5, 4, 16, 58, 10000, false, tankOverlay); - guiFluidStacks.init(outputTank, false, 95, 4, 16, 58, 10000, false, tankOverlay); + guiFluidStacks.init(inputTank, true, 1, 1, 16, 58, 10000, false, tankOverlay); + guiFluidStacks.init(outputTank, false, 91, 1, 16, 58, 10000, false, tankOverlay); FermenterRecipeWrapper wrapper = (FermenterRecipeWrapper) recipeWrapper; diff --git a/src/main/java/forestry/factory/recipes/jei/squeezer/SqueezerRecipeCategory.java b/src/main/java/forestry/factory/recipes/jei/squeezer/SqueezerRecipeCategory.java index 98e0d7c61..33ee045c7 100644 --- a/src/main/java/forestry/factory/recipes/jei/squeezer/SqueezerRecipeCategory.java +++ b/src/main/java/forestry/factory/recipes/jei/squeezer/SqueezerRecipeCategory.java @@ -38,7 +38,7 @@ public class SqueezerRecipeCategory extends ForestryRecipeCategory { private final ForestryTooltipCallback tooltip = new ForestryTooltipCallback(); public SqueezerRecipeCategory(@Nonnull IGuiHelper guiHelper) { - super(guiHelper.createDrawable(guiTexture, 9, 16, 158, 61), "tile.for.factory.squeezer.name"); + super(guiHelper.createDrawable(guiTexture, 9, 16, 158, 62), "tile.for.factory.squeezer.name"); IDrawableStatic arrowDrawable = guiHelper.createDrawable(guiTexture, 176, 60, 43, 18); this.arrow = guiHelper.createAnimatedDrawable(arrowDrawable, 200, IDrawableAnimated.StartDirection.LEFT, false); diff --git a/src/main/java/forestry/factory/recipes/jei/still/StillRecipeCategory.java b/src/main/java/forestry/factory/recipes/jei/still/StillRecipeCategory.java index e4d39777e..916ffbede 100644 --- a/src/main/java/forestry/factory/recipes/jei/still/StillRecipeCategory.java +++ b/src/main/java/forestry/factory/recipes/jei/still/StillRecipeCategory.java @@ -30,7 +30,7 @@ public class StillRecipeCategory extends ForestryRecipeCategory { private final IDrawableAnimated progressBar; public StillRecipeCategory(IGuiHelper guiHelper) { - super(guiHelper.createDrawable(guiTexture, 30, 11, 116, 65), "tile.for.factory.still.name"); + super(guiHelper.createDrawable(guiTexture, 34, 14, 108, 60), "tile.for.factory.still.name"); this.tankOverlay = guiHelper.createDrawable(guiTexture, 176, 0, 16, 58); IDrawableStatic progressBarDrawable0 = guiHelper.createDrawable(guiTexture, 176, 74, 4, 18); @@ -45,15 +45,15 @@ public class StillRecipeCategory extends ForestryRecipeCategory { @Override public void drawAnimations(@Nonnull Minecraft minecraft) { - progressBar.draw(minecraft, 54, 6); + progressBar.draw(minecraft, 50, 3); } @Override public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull IRecipeWrapper recipeWrapper) { IGuiFluidStackGroup guiFluidStacks = recipeLayout.getFluidStacks(); - guiFluidStacks.init(inputTank, true, 5, 4, 16, 58, 10000, false, tankOverlay); - guiFluidStacks.init(outputTank, false, 95, 4, 16, 58, 10000, false, tankOverlay); + guiFluidStacks.init(inputTank, true, 1, 1, 16, 58, 10000, false, tankOverlay); + guiFluidStacks.init(outputTank, false, 91, 1, 16, 58, 10000, false, tankOverlay); guiFluidStacks.set(inputTank, recipeWrapper.getFluidInputs()); guiFluidStacks.set(outputTank, recipeWrapper.getFluidOutputs());