aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authornea <romangraef@gmail.com>2022-02-24 00:07:37 +0100
committernea <romangraef@gmail.com>2022-04-14 04:10:06 +0200
commita36371958640755d54c11d8661b35d44e972c8ba (patch)
tree73c885b0f3a90ddd3e51e923a9c8ac0c4c81e8e2 /src/main/java
parent8708bbfa4f77a289288a356502807ebf92f7e8a8 (diff)
downloadNotEnoughUpdates-a36371958640755d54c11d8661b35d44e972c8ba.tar.gz
NotEnoughUpdates-a36371958640755d54c11d8661b35d44e972c8ba.tar.bz2
NotEnoughUpdates-a36371958640755d54c11d8661b35d44e972c8ba.zip
hot tall men
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemRecipe.java12
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/recipes/CraftingRecipe.java8
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/recipes/ForgeRecipe.java18
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/recipes/VillagerTradeRecipe.java12
4 files changed, 25 insertions, 25 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemRecipe.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemRecipe.java
index 71f801ae..09fe06f7 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemRecipe.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/GuiItemRecipe.java
@@ -32,17 +32,17 @@ public class GuiItemRecipe extends GuiScreen {
public static final int SLOT_SPACING = SLOT_SIZE + 2;
public static final int BUTTON_WIDTH = 7;
public static final int BUTTON_HEIGHT = 11;
- public static final int BUTTON_POSITION_Y = 63;
+ public static final int BUTTON_POSITION_Y = 90;
public static final int BUTTON_POSITION_LEFT_X = 110;
public static final int BUTTON_POSITION_RIGHT_X = 147;
public static final int PAGE_STRING_X = 132;
- public static final int PAGE_STRING_Y = 69;
+ public static final int PAGE_STRING_Y = BUTTON_POSITION_Y+6;
public static final int TITLE_X = 28;
public static final int TITLE_Y = 6;
public static final int HOTBAR_SLOT_X = 8;
- public static final int HOTBAR_SLOT_Y = 142;
+ public static final int HOTBAR_SLOT_Y = 197;
public static final int PLAYER_INVENTORY_X = 8;
- public static final int PLAYER_INVENTORY_Y = 84;
+ public static final int PLAYER_INVENTORY_Y = 140;
public static final int TAB_POS_X = -26;
public static final int TAB_POS_Y = 8;
public static final int TAB_OFFSET_Y = 30;
@@ -62,7 +62,7 @@ public class GuiItemRecipe extends GuiScreen {
public int guiLeft = 0;
public int guiTop = 0;
public int xSize = 176;
- public int ySize = 166;
+ public int ySize = 222;
public GuiItemRecipe(String title, List<NeuRecipe> unsortedRecipes, NEUManager manager) {
this.manager = manager;
@@ -272,7 +272,7 @@ public class GuiItemRecipe extends GuiScreen {
if (isWithinRect(mouseX, mouseY, slot.getX(this), slot.getY(this), SLOT_SIZE, SLOT_SIZE)) {
ItemStack itemStack = slot.getItemStack();
if (mouseButton == 0) {
- manager.displayGuiItemRecipe(manager.getInternalNameForItem(itemStack), "");
+ manager.displayGuiItemRecipe(manager.getInternalNameForItem(itemStack), null);
} else if (mouseButton == 1) {
manager.displayGuiItemUsages(manager.getInternalNameForItem(itemStack));
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/recipes/CraftingRecipe.java b/src/main/java/io/github/moulberry/notenoughupdates/recipes/CraftingRecipe.java
index 55c00f94..79f349fa 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/recipes/CraftingRecipe.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/recipes/CraftingRecipe.java
@@ -17,10 +17,10 @@ import java.util.Set;
public class CraftingRecipe implements NeuRecipe {
- public static final ResourceLocation BACKGROUND = new ResourceLocation("textures/gui/container/crafting_table.png");
+ public static final ResourceLocation BACKGROUND = new ResourceLocation("notenoughupdates","textures/gui/crafting_table_tall.png");
private static final int EXTRA_STRING_X = 132;
- private static final int EXTRA_STRING_Y = 25;
+ private static final int EXTRA_STRING_Y = 50;
private final NEUManager manager;
private final Ingredient[] inputs;
@@ -78,10 +78,10 @@ public class CraftingRecipe implements NeuRecipe {
if (input == null) continue;
ItemStack item = input.getItemStack();
if (item == null) continue;
- slots.add(new RecipeSlot(30 + x * GuiItemRecipe.SLOT_SPACING, 17 + y * GuiItemRecipe.SLOT_SPACING, item));
+ slots.add(new RecipeSlot(30 + x * GuiItemRecipe.SLOT_SPACING, 48 + y * GuiItemRecipe.SLOT_SPACING, item));
}
}
- slots.add(new RecipeSlot(124, 35, outputIngredient.getItemStack()));
+ slots.add(new RecipeSlot(124, 66, outputIngredient.getItemStack()));
return slots;
}
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/recipes/ForgeRecipe.java b/src/main/java/io/github/moulberry/notenoughupdates/recipes/ForgeRecipe.java
index 1e648865..7847b0b4 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/recipes/ForgeRecipe.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/recipes/ForgeRecipe.java
@@ -19,7 +19,7 @@ import java.util.*;
public class ForgeRecipe implements NeuRecipe {
- private static final ResourceLocation BACKGROUND = new ResourceLocation("notenoughupdates", "textures/gui/forge_recipe.png");
+ private static final ResourceLocation BACKGROUND = new ResourceLocation("notenoughupdates", "textures/gui/forge_recipe_tall.png");
private static final int SLOT_IMAGE_U = 176;
private static final int SLOT_IMAGE_V = 0;
@@ -27,7 +27,7 @@ public class ForgeRecipe implements NeuRecipe {
private static final int SLOT_PADDING = 1;
private static final int EXTRA_INFO_MAX_WIDTH = 75;
public static final int EXTRA_INFO_X = 132;
- public static final int EXTRA_INFO_Y = 25;
+ public static final int EXTRA_INFO_Y = 55;
public enum ForgeType {
REFINING, ITEM_FORGING
@@ -100,7 +100,7 @@ public class ForgeRecipe implements NeuRecipe {
int[] slotCoordinates = getSlotCoordinates(i, inputs.size());
slots.add(new RecipeSlot(slotCoordinates[0], slotCoordinates[1], itemStack));
}
- slots.add(new RecipeSlot(124, 35, output.getItemStack()));
+ slots.add(new RecipeSlot(124, 66, output.getItemStack()));
return slots;
}
@@ -188,21 +188,21 @@ public class ForgeRecipe implements NeuRecipe {
return new ForgeRecipe(manager, ingredients, new Ingredient(manager, internalItemId, resultCount), duration, hotmLevel);
}
- private static final int RECIPE_CENTER_X = 40;
- private static final int RECIPE_CENTER_Y = 34;
- private static final int SLOT_DISTANCE_FROM_CENTER = 22;
+ private static final int RECIPE_CENTER_X = 49;
+ private static final int RECIPE_CENTER_Y = 74;
+ private static final int SLOT_DISTANCE_FROM_CENTER = 30;
private static final int RECIPE_FALLBACK_X = 20;
private static final int RECIPE_FALLBACK_Y = 15;
static int[] getSlotCoordinates(int slotNumber, int totalSlotCount) {
- if (totalSlotCount > 6) {
+ if (totalSlotCount > 8) {
return new int[]{
RECIPE_FALLBACK_X + (slotNumber % 4) * GuiItemRecipe.SLOT_SPACING,
RECIPE_FALLBACK_Y + (slotNumber / 4) * GuiItemRecipe.SLOT_SPACING,
};
}
if (totalSlotCount == 1) {
- return new int[] {
+ return new int[]{
RECIPE_CENTER_X - GuiItemRecipe.SLOT_SIZE / 2,
RECIPE_CENTER_Y - GuiItemRecipe.SLOT_SIZE / 2
};
@@ -210,7 +210,7 @@ public class ForgeRecipe implements NeuRecipe {
double rad = Math.PI * 2 * slotNumber / totalSlotCount;
int x = (int) (Math.cos(rad) * SLOT_DISTANCE_FROM_CENTER);
int y = (int) (Math.sin(rad) * SLOT_DISTANCE_FROM_CENTER);
- return new int[]{RECIPE_CENTER_X + x, RECIPE_CENTER_Y + y};
+ return new int[]{RECIPE_CENTER_X + x - GuiItemRecipe.SLOT_SIZE / 2, RECIPE_CENTER_Y + y - GuiItemRecipe.SLOT_SIZE / 2};
}
static String formatDuration(int seconds) {
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/recipes/VillagerTradeRecipe.java b/src/main/java/io/github/moulberry/notenoughupdates/recipes/VillagerTradeRecipe.java
index 2dab6976..555ec74b 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/recipes/VillagerTradeRecipe.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/recipes/VillagerTradeRecipe.java
@@ -21,9 +21,9 @@ import java.util.*;
public class VillagerTradeRecipe implements NeuRecipe {
- public static final int COST_SLOT_X = 51;
- public static final int COST_SLOT_Y = 34;
- public static final int RESULT_SLOT_Y = 35;
+ public static final int COST_SLOT_X = 53;
+ public static final int COST_SLOT_Y = 67;
+ public static final int RESULT_SLOT_Y = 66;
public static final int RESULT_SLOT_X = 124;
private static class Holder { // This holder object exists to defer initialization to first access
@@ -50,7 +50,7 @@ public class VillagerTradeRecipe implements NeuRecipe {
}
- private final static ResourceLocation BACKGROUND = new ResourceLocation("notenoughupdates", "textures/gui/villager_recipe.png");
+ private final static ResourceLocation BACKGROUND = new ResourceLocation("notenoughupdates", "textures/gui/villager_recipe_tall.png");
private final Ingredient result;
private final Ingredient cost;
@@ -110,14 +110,14 @@ public class VillagerTradeRecipe implements NeuRecipe {
FontRenderer fontRenderer = Minecraft.getMinecraft().fontRendererObj;
Utils.drawStringCenteredScaledMaxWidth(
minCost + " - " + maxCost, fontRenderer,
- gui.guiLeft + 50, gui.guiTop + 60, false, 75, 0xff00ff);
+ gui.guiLeft + 50, gui.guiTop + 85, false, 75, 0xff00ff);
}
}
@Override
public void drawExtraBackground(GuiItemRecipe gui, int mouseX, int mouseY) {
- GuiInventory.drawEntityOnScreen(gui.guiLeft + 90, gui.guiTop + 75, 30, gui.guiLeft - mouseX + 80, gui.guiTop + 60 - mouseY, Holder.DEMO_ENTITY);
+ GuiInventory.drawEntityOnScreen(gui.guiLeft + 90, gui.guiTop + 100, 30, gui.guiLeft - mouseX + 110, gui.guiTop + 60 - mouseY, Holder.DEMO_ENTITY);
}
@Override