use of forestry.api.circuits.ICircuit in project ForestryMC by ForestryMC.
the class ModuleMail method registerRecipes.
@Override
public void registerRecipes() {
ItemRegistryCore coreItems = ModuleCore.getItems();
ItemRegistryMail items = getItems();
BlockRegistryMail blocks = getBlocks();
ItemStack stampGlue;
ItemStack letterGlue;
if (ForestryAPI.enabledModules.contains(new ResourceLocation(Constants.MOD_ID, ForestryModuleUids.APICULTURE))) {
ItemRegistryApiculture beeItems = ModuleApiculture.getItems();
stampGlue = beeItems.honeyDrop.getItemStack();
letterGlue = beeItems.propolis.getWildcard();
} else {
stampGlue = new ItemStack(Items.SLIME_BALL);
letterGlue = new ItemStack(Items.SLIME_BALL);
}
RecipeUtil.addShapelessRecipe("letter", items.letters.getItemStack(), Items.PAPER, letterGlue);
if (Config.craftingStampsEnabled) {
for (EnumStampDefinition stampDefinition : EnumStampDefinition.VALUES) {
if (Config.collectorStamps.contains(stampDefinition.getUid())) {
continue;
}
ItemStack stamps = items.stamps.get(stampDefinition, 9);
RecipeUtil.addRecipe("stamps", stamps, "XXX", "###", "ZZZ", 'X', stampDefinition.getCraftingIngredient(), '#', Items.PAPER, 'Z', stampGlue);
RecipeManagers.carpenterManager.addRecipe(10, Fluids.SEED_OIL.getFluid(300), ItemStack.EMPTY, stamps, "XXX", "###", 'X', stampDefinition.getCraftingIngredient(), '#', Items.PAPER);
}
}
// Recycling
RecipeUtil.addRecipe("letter_recycling", new ItemStack(Items.PAPER), "###", '#', OreDictUtil.EMPTIED_LETTER_ORE_DICT);
// Carpenter
RecipeManagers.carpenterManager.addRecipe(10, new FluidStack(FluidRegistry.WATER, 250), ItemStack.EMPTY, items.letters.getItemStack(), "###", "###", '#', coreItems.woodPulp);
RecipeUtil.addShapelessRecipe("catalogue", items.catalogue.getItemStack(), items.stamps.getWildcard(), new ItemStack(Items.BOOK));
RecipeUtil.addRecipe("mailbox", new ItemStack(blocks.mailbox), " # ", "#Y#", "XXX", '#', "ingotTin", 'X', "chestWood", 'Y', coreItems.sturdyCasing);
RecipeUtil.addRecipe("trade_station", new ItemStack(blocks.tradeStation), "Z#Z", "#Y#", "XWX", '#', coreItems.tubes.get(EnumElectronTube.BRONZE, 1), 'X', "chestWood", 'Y', coreItems.sturdyCasing, 'Z', coreItems.tubes.get(EnumElectronTube.IRON, 1), 'W', ItemCircuitBoard.createCircuitboard(EnumCircuitBoardType.REFINED, null, new ICircuit[] {}));
}
use of forestry.api.circuits.ICircuit in project ForestryMC by ForestryMC.
the class CircuitBoard method onInsertion.
@Override
public void onInsertion(Object tile) {
for (int i = 0; i < circuits.length; i++) {
ICircuit circuit = circuits[i];
if (circuit == null) {
continue;
}
circuit.onInsertion(i, tile);
}
}
use of forestry.api.circuits.ICircuit in project ForestryMC by ForestryMC.
the class CircuitBoard method onLoad.
@Override
public void onLoad(Object tile) {
for (int i = 0; i < circuits.length; i++) {
ICircuit circuit = circuits[i];
if (circuit == null) {
continue;
}
circuit.onLoad(i, tile);
}
}
use of forestry.api.circuits.ICircuit in project ForestryMC by ForestryMC.
the class CircuitBoard method addTooltip.
@Override
@SideOnly(Side.CLIENT)
public void addTooltip(List<String> list) {
if (layout != null) {
list.add(TextFormatting.GOLD + layout.getUsage() + ":");
List<String> extendedTooltip = new ArrayList<>();
for (ICircuit circuit : circuits) {
if (circuit != null) {
circuit.addTooltip(extendedTooltip);
}
}
if (GuiScreen.isShiftKeyDown() || extendedTooltip.size() <= 4) {
list.addAll(extendedTooltip);
} else {
list.add(TextFormatting.ITALIC + "<" + Translator.translateToLocal("for.gui.tooltip.tmi") + ">");
}
} else {
int socketCount = type.getSockets();
String localizationKey = "item.for.circuitboard.tooltip." + (socketCount == 1 ? "singular" : "plural");
String tooltip = Translator.translateToLocalFormatted(localizationKey, type.getSockets());
list.add(tooltip);
}
}
use of forestry.api.circuits.ICircuit in project ForestryMC by ForestryMC.
the class ItemElectronTube method getCircuits.
private static Multimap<ICircuitLayout, ICircuit> getCircuits(ItemStack itemStack) {
Multimap<ICircuitLayout, ICircuit> circuits = ArrayListMultimap.create();
Collection<ICircuitLayout> allLayouts = ChipsetManager.circuitRegistry.getRegisteredLayouts().values();
for (ICircuitLayout circuitLayout : allLayouts) {
ICircuit circuit = SolderManager.getCircuit(circuitLayout, itemStack);
if (circuit != null) {
circuits.put(circuitLayout, circuit);
}
}
return circuits;
}
Aggregations