mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-14 01:04:12 +00:00
Optimized custom x-alyzer species names, they now depend on the type.
This commit is contained in:
1 parent
2aea5d9f76
commit
0435df0fb6
4 files changed
+17
-17
No files matched your search
+1
-1
Submodule api updated: 3f6be6bfc5...afbce9780f.
+1
-1
Submodule lang updated: 6263232985...6da7699bb6.
@@ -32,7 +32,6 @@ import forestry.core.gui.GuiAlyzer;
|
||||
import forestry.core.utils.StringUtil;
|
||||
import forestry.core.utils.Vect;
|
||||
import forestry.plugins.PluginApiculture;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
public class GuiBeealyzer extends GuiAlyzer {
|
||||
|
||||
@@ -146,11 +145,12 @@ public class GuiBeealyzer extends GuiAlyzer {
|
||||
newLine();
|
||||
newLine();
|
||||
|
||||
String customPrimaryBeeKey = "bees.custom.beealyzer." + bee.getGenome().getPrimary().getUnlocalizedName().replace("bees.species.", "");
|
||||
String customSecondaryBeeKey = "bees.custom.beealyzer." + bee.getGenome().getSecondary().getUnlocalizedName().replace("bees.species.", "");
|
||||
|
||||
drawSpeciesRow(StringUtil.localize("gui.species"), bee, EnumBeeChromosome.SPECIES, checkCustomName(customPrimaryBeeKey), checkCustomName(customSecondaryBeeKey));
|
||||
{
|
||||
String customPrimaryBeeKey = "bees.custom.beealyzer." + type.getName() + "." + bee.getGenome().getPrimary().getUnlocalizedName().replace("bees.species.", "");
|
||||
String customSecondaryBeeKey = "bees.custom.beealyzer." + type.getName() + "." + bee.getGenome().getSecondary().getUnlocalizedName().replace("bees.species.", "");
|
||||
|
||||
drawSpeciesRow(StringUtil.localize("gui.species"), bee, EnumBeeChromosome.SPECIES, checkCustomName(customPrimaryBeeKey), checkCustomName(customSecondaryBeeKey));
|
||||
}
|
||||
drawRow(StringUtil.localize("gui.lifespan"), bee.getGenome().getActiveAllele(EnumBeeChromosome.LIFESPAN.ordinal()).getName(),
|
||||
bee.getGenome().getInactiveAllele(EnumBeeChromosome.LIFESPAN.ordinal()).getName(), bee,
|
||||
EnumBeeChromosome.LIFESPAN);
|
||||
|
||||
@@ -16,13 +16,9 @@ import java.util.Locale;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
|
||||
import forestry.api.arboriculture.EnumTreeChromosome;
|
||||
import forestry.api.arboriculture.IAlleleFruit;
|
||||
import forestry.api.arboriculture.IAlleleGrowth;
|
||||
import forestry.api.arboriculture.ITree;
|
||||
import forestry.api.arboriculture.*;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IAlleleEffect;
|
||||
@@ -61,6 +57,7 @@ public class GuiTreealyzer extends GuiAlyzer {
|
||||
|
||||
int page = 0;
|
||||
ITree tree = null;
|
||||
EnumGermlingType treeType = EnumGermlingType.SAPLING;
|
||||
for (int k = 1; k < TreealyzerInventory.SLOT_ANALYZE_5 + 1; k++) {
|
||||
if (k == TreealyzerInventory.SLOT_ENERGY)
|
||||
continue;
|
||||
@@ -68,6 +65,7 @@ public class GuiTreealyzer extends GuiAlyzer {
|
||||
if (inventory.getStackInSlot(k) == null)
|
||||
continue;
|
||||
tree = PluginArboriculture.treeInterface.getMember(inventory.getStackInSlot(k));
|
||||
treeType = PluginArboriculture.treeInterface.getType(inventory.getStackInSlot(k));
|
||||
if (tree == null || !tree.isAnalyzed())
|
||||
continue;
|
||||
|
||||
@@ -77,7 +75,7 @@ public class GuiTreealyzer extends GuiAlyzer {
|
||||
|
||||
switch (page) {
|
||||
case 1:
|
||||
drawAnalyticsPage1(tree);
|
||||
drawAnalyticsPage1(tree, treeType);
|
||||
break;
|
||||
case 2:
|
||||
drawAnalyticsPage2(tree);
|
||||
@@ -126,7 +124,7 @@ public class GuiTreealyzer extends GuiAlyzer {
|
||||
endPage();
|
||||
}
|
||||
|
||||
private void drawAnalyticsPage1(ITree tree) {
|
||||
private void drawAnalyticsPage1(ITree tree, EnumGermlingType type) {
|
||||
|
||||
startPage(COLUMN_0, COLUMN_1, COLUMN_2);
|
||||
|
||||
@@ -147,10 +145,12 @@ public class GuiTreealyzer extends GuiAlyzer {
|
||||
newLine();
|
||||
newLine();*/
|
||||
|
||||
String customPrimaryTreeKey = "trees.custom.treealyzer." + tree.getGenome().getPrimary().getUnlocalizedName().replace("trees.species.", "");
|
||||
String customSecondaryTreeKey = "trees.custom.treealyzer." + tree.getGenome().getSecondary().getUnlocalizedName().replace("trees.species.", "");
|
||||
{
|
||||
String customPrimaryTreeKey = "trees.custom.treealyzer." + type.getName() + "." + tree.getGenome().getPrimary().getUnlocalizedName().replace("trees.species.", "");
|
||||
String customSecondaryTreeKey = "trees.custom.treealyzer." + type.getName() + "." + tree.getGenome().getSecondary().getUnlocalizedName().replace("trees.species.", "");
|
||||
|
||||
drawSpeciesRow(StringUtil.localize("gui.species"), tree, EnumTreeChromosome.SPECIES, checkCustomName(customPrimaryTreeKey), checkCustomName(customSecondaryTreeKey));
|
||||
drawSpeciesRow(StringUtil.localize("gui.species"), tree, EnumTreeChromosome.SPECIES, checkCustomName(customPrimaryTreeKey), checkCustomName(customSecondaryTreeKey));
|
||||
}
|
||||
newLine();
|
||||
|
||||
drawLine(StringUtil.localize("gui.saplings"), COLUMN_0);
|
||||
|
||||
Reference in new issue
Block a user