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); } }}
你是这个资源的作者?登录后可认领此资源。
相似资源
缓冲的原始输入和线程化的事件轮询
可定制的鞘翅模组,支持装饰纹饰、旗帜图案等更多功能!
一个用于收集生物掉落物的多区块模组。
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
原版世界生成优化模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
评论 0
登录后参与评分
还没有评论,来抢沙发吧