跳到正文

Recipes for All

作者:mallrat208

解锁完整的原版配方书

收藏

介绍

介绍由机器翻译自 CurseForge 原页面,仅供参考。

Recipes for All 是一个小型模组,当玩家加入世界时会解锁原版配方书中的所有配方。连接到装有此模组的服务器的客户端不需要安装此模组。不过,如果你希望在单人世界中也能使用此功能,建议在客户端安装。

没有材料或没有产出的配方不会被解锁,这可以防止那些你实际上无法合成的损坏配方显示出来。

这是一个极其微小的模组,因此我没有为它托管 GitHub 仓库,而是将源代码附在下方

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);
		}
	}
	
}

 

常见问题

Recipes for All 支持哪些 Minecraft 版本?

Recipes for All 支持 Minecraft Java 版 1.12.2,可用的加载器:Forge。下载时注意选择和你游戏版本一致的文件。

Recipes for All 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。

评论

登录后评论和评分

mallrat208 的其他作品

查看全部 →