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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
package pers.gwyog.gtneioreplugin.plugin;
import java.awt.Rectangle;
import codechicken.lib.gui.GuiDraw;
import codechicken.nei.recipe.TemplateRecipeHandler;
import codechicken.nei.recipe.TemplateRecipeHandler.RecipeTransferRect;
import net.minecraft.client.resources.I18n;
import net.minecraft.util.EnumChatFormatting;
public 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("gui.nei.seeAll"));
transferRects.add(new RecipeTransferRect(new Rectangle(getGuiWidth()-stringLength-3, 5, stringLength, 9), getOutputId()));
}
public String getOutputId() {
return null;
}
public String getBiomeTranslated(String unlocalizedBiome) {
return unlocalizedBiome.equals("None")? I18n.format("gtnop.biome.none.name"): unlocalizedBiome;
}
public String getWorldNameTranslated(boolean genOverworld, boolean genNether, boolean genEnd, boolean genMoon, boolean genMars) {
String worldNameTranslated = "";
if (genOverworld) {
if (!worldNameTranslated.isEmpty())
worldNameTranslated += ", ";
worldNameTranslated += I18n.format("gtnop.world.overworld.name");
}
if (genNether) {
if (!worldNameTranslated.isEmpty())
worldNameTranslated += ", ";
worldNameTranslated += I18n.format("gtnop.world.nether.name");
}
if (genEnd) {
if (!worldNameTranslated.isEmpty())
worldNameTranslated += ", ";
worldNameTranslated += I18n.format("gtnop.world.end.name");
}
if (genMoon) {
if (!worldNameTranslated.isEmpty())
worldNameTranslated += ", ";
worldNameTranslated += I18n.format("gtnop.world.moon.name");
}
if (genMars) {
if (!worldNameTranslated.isEmpty())
worldNameTranslated += ", ";
worldNameTranslated += I18n.format("gtnop.world.mars.name");
}
return worldNameTranslated;
}
public int getGuiWidth() {
return 166;
}
}
|