use of binnie.design.api.IDesignMaterial in project Binnie by ForestryMC.
the class WindowArboristDatabase method addTabs.
@Override
@SideOnly(Side.CLIENT)
protected void addTabs() {
new PageSpeciesOverview(this.getInfoPages(Mode.SPECIES), new DatabaseTab(ExtraTrees.instance, "species.overview"));
new PageSpeciesTreeGenome(this.getInfoPages(Mode.SPECIES), new DatabaseTab(ExtraTrees.instance, "species.genome"));
new PageSpeciesClassification(this.getInfoPages(Mode.SPECIES), new DatabaseTab(ExtraTrees.instance, "species.classification"));
new PageSpeciesResultant(this.getInfoPages(Mode.SPECIES), new DatabaseTab(ExtraTrees.instance, "species.resultant"));
new PageSpeciesMutations(this.getInfoPages(Mode.SPECIES), new DatabaseTab(ExtraTrees.instance, "species.further"));
new PageBranchOverview(this.getInfoPages(Mode.BRANCHES), new DatabaseTab(ExtraTrees.instance, "branches.overview"));
new PageBranchSpecies(this.getInfoPages(Mode.BRANCHES), new DatabaseTab(ExtraTrees.instance, "branches.species"));
new PageBreeder(this.getInfoPages(Mode.BREEDER), this.getUsername(), new DatabaseTab(ExtraTrees.instance, "breeder"));
this.createMode(TreeMode.FRUIT, new ModeWidgets(TreeMode.FRUIT, this, (area, modePage) -> {
ControlListBox<ItemStack> controlListBox = new ModeControlListBox(modePage, area);
ITreeBreedingSystem breedingSystem = this.getBreedingSystem();
controlListBox.setOptions(breedingSystem.getAllFruits());
return controlListBox;
}));
this.createMode(TreeMode.WOOD, new ModeWidgets(TreeMode.WOOD, this, (area, modePage) -> {
ControlListBox<ItemStack> controlListBox = new ModeControlListBox(modePage, area);
ITreeBreedingSystem breedingSystem = this.getBreedingSystem();
controlListBox.setOptions(breedingSystem.getAllWoods());
return controlListBox;
}));
this.createMode(TreeMode.PLANKS, new ModeWidgets(TreeMode.PLANKS, this, (area, modePage) -> {
ControlListBox<ItemStack> controlListBox = new ModeControlListBox(modePage, area);
List<ItemStack> planks = WoodManager.getAllPlankTypes().stream().map(IDesignMaterial::getStack).collect(Collectors.toList());
controlListBox.setOptions(planks);
return controlListBox;
}));
new PageFruit(this.getInfoPages(TreeMode.FRUIT), new DatabaseTab(ExtraTrees.instance, "fruit.natural"), true);
new PageFruit(this.getInfoPages(TreeMode.FRUIT), new DatabaseTab(ExtraTrees.instance, "fruit.potential"), false);
new PageWood(this.getInfoPages(TreeMode.WOOD), new DatabaseTab(ExtraTrees.instance, "wood.natural"));
new PagePlanksOverview(this.getInfoPages(TreeMode.PLANKS), new DatabaseTab(ExtraTrees.instance, "planks.overview"));
new PagePlanksTrees(this.getInfoPages(TreeMode.PLANKS), new DatabaseTab(ExtraTrees.instance, "planks.natural"));
}
use of binnie.design.api.IDesignMaterial in project Binnie by ForestryMC.
the class DesignHelper method getDesignBlock.
public static DesignBlock getDesignBlock(final IDesignSystem system, final int meta) {
final int plankID1 = meta & 0xFF;
final int plankID2 = meta >> 8 & 0xFF;
final int tile = meta >> 16 & 0x3FF;
final int rotation = meta >> 26 & 0x3;
final int axis = meta >> 28 & 0x7;
final IDesignMaterial type1 = system.getMaterial(plankID1);
final IDesignMaterial type2 = system.getMaterial(plankID2);
final IDesign type3 = Design.getDesignManager().getDesign(tile);
return new DesignBlock(system, type1, type2, type3, rotation, EnumFacing.VALUES[axis]);
}
use of binnie.design.api.IDesignMaterial in project Binnie by ForestryMC.
the class ComponentDesignerRecipe method getProduct.
@Override
public ItemStack getProduct() {
final ItemStack plank1 = this.getUtil().getStack(DesignerSlots.DESIGN_SLOT_1);
final ItemStack plank2 = this.getUtil().getStack(DesignerSlots.DESIGN_SLOT_2);
if (plank1.isEmpty() || plank2.isEmpty()) {
return ItemStack.EMPTY;
}
final IDesignMaterial type1 = this.type.getSystem().getMaterial(plank1);
final IDesignMaterial type2 = this.type.getSystem().getMaterial(plank2);
final IDesign design = this.getDesign();
return this.type.getBlock(type1, type2, design);
}
Aggregations