use of com.mrcrayfish.furniture.api.RecipeData in project MrCrayfishFurnitureMod by MrCrayfish.
the class PageBlender method drawOverlay.
@Override
public void drawOverlay(Minecraft mc, GuiRecipeBook gui, int x, int y, int mouseX, int mouseY, float partialTicks) {
for (int i = 0; i < recipes.size(); i++) {
int posX = x + ((i / 2) * 150) + 8;
int posY = y + (i % 2 * 50) + 10;
RecipeData data = recipes.get(i);
if (gui.isMouseWithin(posX, posY + 10, 16, 16, mouseX, mouseY)) {
if (data.getIngredients().size() > 0) {
if (data.getIngredients().get(0) != null) {
gui.renderToolTip(data.getIngredients().get(0), mouseX, mouseY);
}
}
}
if (gui.isMouseWithin(posX + (18), posY + 10, 16, 16, mouseX, mouseY)) {
if (data.getIngredients().size() > 1) {
if (data.getIngredients().get(1) != null) {
gui.renderToolTip(data.getIngredients().get(1), mouseX, mouseY);
}
}
}
if (gui.isMouseWithin(posX, posY + (18) + 10, 16, 16, mouseX, mouseY)) {
if (data.getIngredients().size() > 2) {
if (data.getIngredients().get(2) != null) {
gui.renderToolTip(data.getIngredients().get(2), mouseX, mouseY);
}
}
}
if (gui.isMouseWithin(posX + (18), posY + (18) + 10, 16, 16, mouseX, mouseY)) {
if (data.getIngredients().size() > 3) {
if (data.getIngredients().get(3) != null) {
gui.renderToolTip(data.getIngredients().get(3), mouseX, mouseY);
}
}
}
drawToolTip(gui, mc, posX + 80, posY + 20, mouseX, mouseY, getDrink(data.getDrinkName(), data.getRed(), data.getGreen(), data.getBlue()));
}
}
use of com.mrcrayfish.furniture.api.RecipeData in project MrCrayfishFurnitureMod by MrCrayfish.
the class PageBlender method draw.
@Override
public void draw(GuiRecipeBook gui, int x, int y, int mouseX, int mouseY, float partialTicks) {
for (int i = 0; i < recipes.size(); i++) {
int px = x + ((i / 2) * 150) + 8;
int py = y + (i % 2 * 50) + 10;
RecipeData data = recipes.get(i);
gui.getFontRenderer().drawString(fixName(data.getDrinkName()), px, py, 16739840);
for (int j = 0; j < data.getIngredients().size(); j++) {
if (data.getIngredients().get(j) != null) {
gui.getItemRenderer().renderItemAndEffectIntoGUI(data.getIngredients().get(j), px + ((j % 2) * 18), py + ((j / 2) * 18) + 10);
gui.getItemRenderer().renderItemOverlays(gui.getFontRenderer(), data.getIngredients().get(j), px + ((j % 2) * 18), py + ((j / 2) * 18) + 10);
}
}
gui.drawProgressArrow(px + 45, py + 20, partialTicks);
gui.getItemRenderer().renderItemAndEffectIntoGUI(getDrink(data.getDrinkName(), data.getRed(), data.getGreen(), data.getBlue()), px + 80, py + 20);
gui.getItemRenderer().renderItemOverlays(gui.getFontRenderer(), getDrink(data.getDrinkName(), data.getRed(), data.getGreen(), data.getBlue()), px + 80, py + 20);
}
}
use of com.mrcrayfish.furniture.api.RecipeData in project MrCrayfishFurnitureMod by MrCrayfish.
the class PageChoppingBoard method draw.
@Override
public void draw(GuiRecipeBook gui, int x, int y, int mouseX, int mouseY, float partialTicks) {
for (int i = 0; i < recipes.size(); i++) {
int px = x + ((i / 4) * 150) + 15;
int py = y + (i % 4 * spacing);
RecipeData data = recipes.get(i);
gui.getItemRenderer().zLevel = 100.0F;
gui.getItemRenderer().renderItemAndEffectIntoGUI(data.getInput(), px, py);
gui.getItemRenderer().renderItemOverlays(gui.getFontRenderer(), data.getInput(), px, py);
gui.drawKnife(px + 4, py - 6);
gui.getItemRenderer().renderItemAndEffectIntoGUI(data.getOutput(), px + 60, py);
gui.getItemRenderer().renderItemOverlays(gui.getFontRenderer(), data.getOutput(), px + 60, py);
gui.getItemRenderer().zLevel = 0.0F;
gui.drawPlainArrow(px + 27, py + 2);
}
}
use of com.mrcrayfish.furniture.api.RecipeData in project MrCrayfishFurnitureMod by MrCrayfish.
the class PageDishwasher method draw.
@Override
public void draw(GuiRecipeBook gui, int x, int y, int mouseX, int mouseY, float partialTicks) {
gui.getFontRenderer().drawString(I18n.format("cfm.recipe_book.page.dishwasher1"), x + 150, 40, 16739840);
gui.getFontRenderer().drawString(I18n.format("cfm.recipe_book.page.dishwasher2"), x + 150, 50, 16739840);
gui.getFontRenderer().drawString(I18n.format("cfm.recipe_book.page.dishwasher3"), x + 150, 60, 16739840);
gui.getFontRenderer().drawString(I18n.format("cfm.recipe_book.page.dishwasher1"), x + 4, 40, 16739840);
gui.getFontRenderer().drawString(I18n.format("cfm.recipe_book.page.dishwasher2"), x + 4, 50, 16739840);
gui.getFontRenderer().drawString(I18n.format("cfm.recipe_book.page.dishwasher3"), x + 4, 60, 16739840);
for (int i = 0; i < recipes.size(); i++) {
int px = x + ((i % 5) * 20) + ((i / 20) * 145) + 7;
int py = y + ((i / 5) * 20) - ((i / 20) * (4 * 20)) + 30;
RecipeData data = recipes.get(i);
gui.getItemRenderer().zLevel = 100.0F;
gui.getItemRenderer().renderItemAndEffectIntoGUI(data.getInput(), px, py);
gui.getItemRenderer().renderItemOverlays(gui.getFontRenderer(), data.getInput(), px, py);
gui.getItemRenderer().zLevel = 0.0F;
}
}
use of com.mrcrayfish.furniture.api.RecipeData in project MrCrayfishFurnitureMod by MrCrayfish.
the class PageGrill method draw.
@Override
public void draw(GuiRecipeBook gui, int x, int y, int mouseX, int mouseY, float partialTicks) {
for (int i = 0; i < recipes.size(); i++) {
int px = x + ((i / 4) * 150) + 15;
int py = y + ((i % 4) * spacing);
RecipeData data = recipes.get(i);
gui.getItemRenderer().zLevel = 100.0F;
gui.getItemRenderer().renderItemAndEffectIntoGUI(data.getInput(), px, py);
gui.getItemRenderer().renderItemOverlays(gui.getFontRenderer(), data.getInput(), px, py);
gui.getItemRenderer().renderItemAndEffectIntoGUI(data.getOutput(), px + 60, py);
gui.getItemRenderer().renderItemOverlays(gui.getFontRenderer(), data.getOutput(), px + 60, py);
gui.getItemRenderer().zLevel = 0.0F;
gui.drawProgressArrow(px + 27, py + 2, partialTicks);
}
}
Aggregations