blob: 71c770a86b0b9983eee3d5bc1b90d267b06a3b70 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
package pers.gwyog.gtneioreplugin.plugin;
import codechicken.lib.gui.GuiDraw;
import codechicken.nei.recipe.TemplateRecipeHandler;
import java.awt.*;
import net.minecraft.client.resources.I18n;
import net.minecraft.util.EnumChatFormatting;
public abstract class PluginBase extends TemplateRecipeHandler {
@Override
public int recipiesPerPage() {
return 1;
}
@Override
public String getRecipeName() {
return null;
}
@Override
public String getGuiTexture() {
return "gtneioreplugin:textures/gui/nei/guiBase.png";
}
@Override
public void loadTransferRects() {
int stringLength = GuiDraw.getStringWidth(EnumChatFormatting.BOLD + I18n.format("gtnop.gui.nei.seeAll"));
transferRects.add(new RecipeTransferRect(
new Rectangle(getGuiWidth() - stringLength - 3, 5, stringLength, 9), getOutputId()));
}
public abstract String getOutputId();
public int getGuiWidth() {
return 166;
}
/**
* Draw the "see all recipes" transfer label
*/
protected void drawSeeAllRecipesLabel() {
GuiDraw.drawStringR(
EnumChatFormatting.BOLD + I18n.format("gtnop.gui.nei.seeAll"), getGuiWidth() - 3, 5, 0x404040, false);
}
}
|