use of binnie.core.gui.database.ControlSpeciesBox in project Binnie by ForestryMC.
the class PageWood method onValueChanged.
@Override
public void onValueChanged(final ItemStack species) {
this.deleteAllChildren();
final WindowAbstractDatabase database = Window.get(this);
new ControlText(this, new Area(0, 0, this.getSize().xPos(), 24), this.getValue().toString(), TextJustification.MIDDLE_CENTER);
ITreeBreedingSystem breedingSystem = (ITreeBreedingSystem) database.getBreedingSystem();
final Collection<IAlleleSpecies> trees = breedingSystem.getTreesThatHaveWood(species, database.isMaster(), database.getWorld(), database.getUsername());
new ControlSpeciesBox(this, 4, 24, this.getSize().xPos() - 8, this.getSize().yPos() - 4 - 24).setOptions(trees);
}
use of binnie.core.gui.database.ControlSpeciesBox in project Binnie by ForestryMC.
the class PageFruit method onValueChanged.
@Override
public void onValueChanged(final ItemStack species) {
this.deleteAllChildren();
final WindowAbstractDatabase database = Window.get(this);
new ControlText(this, new Area(0, 0, this.getSize().xPos(), 24), I18N.localise("extratrees.gui.database.tab.fruit." + (this.treesThatBearFruit ? "natural" : "potential")), TextJustification.MIDDLE_CENTER);
ITreeBreedingSystem breedingSystem = (ITreeBreedingSystem) database.getBreedingSystem();
final Collection<IAlleleSpecies> trees;
if (this.treesThatBearFruit) {
trees = breedingSystem.getTreesThatBearFruit(species, database.isMaster(), database.getWorld(), database.getUsername());
} else {
trees = breedingSystem.getTreesThatCanBearFruit(species, database.isMaster(), database.getWorld(), database.getUsername());
}
new ControlSpeciesBox(this, 4, 24, this.getSize().xPos() - 8, this.getSize().yPos() - 4 - 24).setOptions(trees);
}
use of binnie.core.gui.database.ControlSpeciesBox in project Binnie by ForestryMC.
the class PagePlanksTrees method onValueChanged.
@Override
public void onValueChanged(final ItemStack species) {
this.deleteAllChildren();
final WindowAbstractDatabase database = Window.get(this);
new ControlText(this, new Area(0, 0, this.getSize().xPos(), 24), species.getDisplayName(), TextJustification.MIDDLE_CENTER);
final Collection<IAlleleSpecies> trees = getTreesThatMakePlanks(species, database.isMaster(), database.getWorld(), database.getUsername());
new ControlSpeciesBox(this, 4, 24, this.getSize().xPos() - 8, this.getSize().yPos() - 4 - 24).setOptions(trees);
}
Aggregations