Search in sources :

Example 1 with ItemRegistryMail

use of forestry.mail.items.ItemRegistryMail in project ForestryMC by ForestryMC.

the class ModuleMail method registerItemsAndBlocks.

@Override
public void registerItemsAndBlocks() {
    items = new ItemRegistryMail();
    blocks = new BlockRegistryMail();
}
Also used : BlockRegistryMail(forestry.mail.blocks.BlockRegistryMail) ItemRegistryMail(forestry.mail.items.ItemRegistryMail)

Example 2 with ItemRegistryMail

use of forestry.mail.items.ItemRegistryMail 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[] {}));
}
Also used : BlockRegistryMail(forestry.mail.blocks.BlockRegistryMail) ItemRegistryCore(forestry.core.items.ItemRegistryCore) FluidStack(net.minecraftforge.fluids.FluidStack) ResourceLocation(net.minecraft.util.ResourceLocation) ItemRegistryApiculture(forestry.apiculture.items.ItemRegistryApiculture) ItemRegistryMail(forestry.mail.items.ItemRegistryMail) ICircuit(forestry.api.circuits.ICircuit) EnumStampDefinition(forestry.mail.items.EnumStampDefinition) ItemStack(net.minecraft.item.ItemStack)

Aggregations

BlockRegistryMail (forestry.mail.blocks.BlockRegistryMail)2 ItemRegistryMail (forestry.mail.items.ItemRegistryMail)2 ICircuit (forestry.api.circuits.ICircuit)1 ItemRegistryApiculture (forestry.apiculture.items.ItemRegistryApiculture)1 ItemRegistryCore (forestry.core.items.ItemRegistryCore)1 EnumStampDefinition (forestry.mail.items.EnumStampDefinition)1 ItemStack (net.minecraft.item.ItemStack)1 ResourceLocation (net.minecraft.util.ResourceLocation)1 FluidStack (net.minecraftforge.fluids.FluidStack)1