Updated The Architect section of the documentation
This commit is contained in:
parent
6aff707708
commit
1c66a2fc61
7 changed files with 159 additions and 35 deletions
|
@ -19,14 +19,16 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public class PageAltarRecipe extends Page {
|
||||
public class PageAltarRecipe extends Page
|
||||
{
|
||||
|
||||
public List<ItemStack> input;
|
||||
public ItemStack output;
|
||||
public int tier;
|
||||
public int bloodRequired;
|
||||
|
||||
public PageAltarRecipe(AltarRecipeRegistry.AltarRecipe recipe) {
|
||||
public PageAltarRecipe(AltarRecipeRegistry.AltarRecipe recipe)
|
||||
{
|
||||
this.input = recipe.getInput();
|
||||
this.output = recipe.getOutput();
|
||||
this.tier = recipe.getMinTier().toInt();
|
||||
|
@ -35,36 +37,40 @@ public class PageAltarRecipe extends Page {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer) {
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("alchemicalwizardry" + ":textures/gui/guide/altar.png"));
|
||||
public void draw(Book book, CategoryAbstract category, EntryAbstract entry, int guiLeft, int guiTop, int mouseX, int mouseY, GuiBase guiBase, FontRenderer fontRenderer)
|
||||
{
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("bloodmagicguide" + ":textures/gui/altar.png"));
|
||||
guiBase.drawTexturedModalRect(guiLeft + 42, guiTop + 53, 0, 87, 146, 104);
|
||||
|
||||
guiBase.drawCenteredString(fontRenderer, TextHelper.localize("text.recipe.altar"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0);
|
||||
guiBase.drawCenteredString(fontRenderer, TextHelper.localize("guide.BloodMagic.page.bloodAltar"), guiLeft + guiBase.xSize / 2, guiTop + 12, 0);
|
||||
|
||||
int inputX = (1 + 1) * 20 + (guiLeft + guiBase.xSize / 7) + 1;
|
||||
int inputY = (20) + (guiTop + guiBase.ySize / 5) - 1; //1 * 20
|
||||
GuiHelper.drawItemStack(input.get(0), inputX, inputY);
|
||||
if (GuiHelper.isMouseBetween(mouseX, mouseY, inputX, inputY, 15, 15)) {
|
||||
if (GuiHelper.isMouseBetween(mouseX, mouseY, inputX, inputY, 15, 15))
|
||||
{
|
||||
guiBase.renderToolTip(input.get(0), mouseX, mouseY);
|
||||
}
|
||||
|
||||
if (output == null) {
|
||||
if (output == null)
|
||||
{
|
||||
output = new ItemStack(Blocks.BARRIER);
|
||||
}
|
||||
int outputX = (5 * 20) + (guiLeft + guiBase.xSize / 7) + 1;
|
||||
int outputY = (20) + (guiTop + guiBase.xSize / 5) - 1; // 1 * 20
|
||||
GuiHelper.drawItemStack(output, outputX, outputY);
|
||||
if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15)) {
|
||||
if (GuiHelper.isMouseBetween(mouseX, mouseY, outputX, outputY, 15, 15))
|
||||
{
|
||||
guiBase.renderToolTip(output, outputX, outputY);
|
||||
}
|
||||
|
||||
if (output.getItem() == Item.getItemFromBlock(Blocks.BARRIER)) {
|
||||
if (output.getItem() == Item.getItemFromBlock(Blocks.BARRIER))
|
||||
{
|
||||
guiBase.drawCenteredString(fontRenderer, TextHelper.localize("text.furnace.error"), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6, 0xED073D);
|
||||
guiBase.drawCenteredString(fontRenderer, TextHelper.localize("bm.string.tier") + ": " + String.valueOf(tier), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 15, 0);
|
||||
guiBase.drawCenteredString(fontRenderer, "LP: " + String.valueOf(bloodRequired), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 30, 0);
|
||||
}
|
||||
guiBase.drawCenteredString(fontRenderer, TextHelper.localize("text.recipe.altar.tier", String.valueOf(tier)), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6, 0);
|
||||
guiBase.drawCenteredString(fontRenderer, TextHelper.localize("text.recipe.altar.bloodRequired", String.valueOf(bloodRequired)), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 15, 0);
|
||||
guiBase.drawCenteredString(fontRenderer, TextHelper.localize("guide.BloodMagic.page.tier", String.valueOf(tier)), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6, 0);
|
||||
guiBase.drawCenteredString(fontRenderer, TextHelper.localize("guide.BloodMagic.page.lp", String.valueOf(bloodRequired)), guiLeft + guiBase.xSize / 2, guiTop + 4 * guiBase.ySize / 6 + 15, 0);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue