Download Recipes for All — Minecraft Mods — MetaMods

Recipes for All

Active

Downloads

0

Last update

7 years ago
Client
Utils

Recipes For All

A small mod that automatically unlocks all recipes in the vanilla recipe book immediately after a player enters the world. The server version ensures the feature works for all connected players - you don't need to install the mod on the client side when playing on servers. Of course, for single-player use, it should be installed locally.

The system intelligently filters recipes: excludes those that lack necessary ingredients or final items. This prevents incorrect recipes that cannot be used in actual crafting from appearing.

Technical Features

Due to the mod's compactness, the source code is provided directly here:

package com.mr208.rfa;

import com.google.common.collect.Lists;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.IRecipe;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent;

import java.util.ArrayList;

@EventBusSubscriber
@Mod(modid = "rfa", name = "Recipes For All", version = "1.0.0", acceptableRemoteVersions = "*")
public class RecipesForAll
{

    @SubscribeEvent
    public static void onPlayerLoggin(PlayerLoggedInEvent event)
    {
        if(event.player instanceof EntityPlayerMP)
        {
            ArrayList<IRecipe> recipes = Lists.newArrayList(CraftingManager.REGISTRY);
            recipes.removeIf((recipe)-> recipe.getRecipeOutput().isEmpty());
            recipes.removeIf((recipe)-> recipe.getIngredients().isEmpty());
            event.player.unlockRecipes(recipes);
        }
    }

}

An excellent solution for those tired of having to sequentially learn recipes and want to focus on creativity and exploring the game world!

Project members
mallrat208

mallrat208

Created: 19 May 2018

ID: 77789