Selection GUI Crafting - 继续

模组

原名 Selection GUI Crafting - Continued · 作者 MasterEnderman

一个模组工具,允许使用你手持的物品进行合成。所有可能的配方都会在一个整洁的图形用户界面(GUI)中显示,支持同时排队多个合成操作。附带 GroovyScript 和 CraftTweaker 支持。

0 本站下载 0 关注 更新于 1 周前

最新 3.1.0 · 1.12.2 · Forge

一键开服(送7天)

标题画面

这是由 Gliese_832_c 开发的 Selection GUI Crafting 模组的衍生版本(Fork)。

是衍生版?不,是重写!(版本 2.0.0+)

起初这只是一个对原版模组的简单衍生,但很快演变成了一次彻底的重写。原有的合成系统显得过于笨拙且不够用户友好。新的系统更加直观易用,并且提供了更多的自定义选项和灵活性,以更好地满足整合包开发者的需求。此外还增加了对 GroovyScript 的支持。旧的 CraftTweaker 支持也经过重写,以适应新的系统架构。

再次重写!(版本 3.0.0+)

没错,又一次重写。这次我终于花时间将这个模组改造得更加模块化。现在,GUI 可以通过物品或方块来触发,每个“触发器”都可以调整配方的整体属性。此外,现在有了限制配方的方法,例如你可以将配方锁定在游戏阶段(Game Stages)、Reskillable 技能等级甚至进度(Advancements)之后。更进一步,如果通用的配方构建器功能不足,你还可以执行一组命令。此更新还带来了重构后的 JEI 集成以及各种其他生活便利性改进!

这到底是什么?

SelectionGUI Crafting 允许整合包作者将合成配方添加到一个选择式 GUI 中,该 GUI 通过手持特定物品时右键点击来触发。例如,这可用于粘土制品的合成。你不需要在合成台中手动以不同方式排列粘土球,而是可以让玩家一手拿着铲子,另一只手拿着粘土,然后选择想要制作的粘土物品。另一个使用示例是锻造:一手拿锤子,另一手拿锭,然后选择你想要的工具头部。

CraftTweaker & GroovyScript 集成(版本 3.0.0+)

我尽量让两者的语法尽可能相似。我还会在 GroovyScript 维基以及 CraftTweaker 维基上发布额外的文档。以下是几个示例,正式文档正在搭建中。

CraftTweaker


val test = mods.selectionguicrafting.category.categoryBuilder();
test.id("test");
test.trigger(<minecraft:apple>);
test.trigger(<minecraft:diamond_pickaxe>, 10.0, 0.1, 10.0);
test.trigger(<minecraft:grass>.asBlock(), 2.0, 2.0, 2.0);
test.register();

val myRecipe = mods.selectionguicrafting.recipe.recipeBuilder(); myRecipe.category("test"); myRecipe.output(<minecraft:sand> * 2); myRecipe.input(<minecraft:snow> * 3); myRecipe.input(<ore:blockGlass>); myRecipe.input(<minecraft:diamond_pickaxe>, 10); myRecipe.register();

mods.selectionguicrafting.recipe.recipeBuilder().category("test").output(<minecraft:dirt> * 5).input(<minecraft:stone> * 2).input(<minecraft:cobblestone> * 2).gamestage(["my_first_stage"]).skill("reskillable.farming", 4).register();

mods.selectionguicrafting.recipe.recipeBuilder().category("test").output(<minecraft:diamond> * 2).input(<minecraft:gold_ingot> * 2).mainHand(<minecraft:diamond_pickaxe>, 5).gamestage(["my_second_stage"]).advancement(["minecraft:adventure/adventuring_time"]).register();

GroovyScript


Crafting Category:
All recipes in the mod are divided into categories. Each category has its own set of recipes. Each category can have its own texture for the background, border, frame, decoration, and progress bar. The category can also have its own sounds, particles, can specify how the sounds are played, if recipes in the category can be added to the crafting queue, and how the output items are handed to the player.

mods.selectionguicrafting.category.removeByName('dummy_category_1') // mods.selectionguicrafting.category.removeAll()

mods.selectionguicrafting.category.categoryBuilder() .id('dummy_category') .trigger(item('minecraft:diamond')) .background('selectionguicrafting:textures/gui/background/wood.png') .register()

mods.selectionguicrafting.category.categoryBuilder() .id('blub') .trigger(item('minecraft:stone_shovel')) .background('selectionguicrafting:textures/gui/background/lake.png') .backgroundType('SINGLE_CUT') .register()

mods.selectionguicrafting.category.categoryBuilder() .id('dead') .trigger(block('minecraft:snow')) .background('selectionguicrafting:textures/gui/background/deadlands.png') .decoration('selectionguicrafting:textures/gui/decor/gold.png') .border('selectionguicrafting:textures/gui/background/wood.png') .backgroundType('SINGLE_CUT') .register()

Crafting Recipe: Creates a recipe that is shown in the specified category. Each recipe requires at least an input and output. There can also be an optional input for either hand. The recipe can have its own frame, sounds, particles, progress bar, can specify how the sounds are played, if the recipe can be added to the crafting queue, how the output items are handed to the player, how much durability is consumed if the tool is a damageable item, the crafting time, and how much XP is rewarded. Most of these have a fallback to the category settings.

// mods.selectionguicrafting.recipe.removeByCategory('dummy_category') mods.selectionguicrafting.recipe.removeByInput(item('minecraft:cobblestone')) mods.selectionguicrafting.recipe.removeByOutput(item('minecraft:stone')) // mods.selectionguicrafting.recipe.removeAll()

mods.selectionguicrafting.recipe.recipeBuilder() .category('dummy_category') .input(item('minecraft:stone') * 3) .output(item('minecraft:cobblestone') * 2, 0.5f) .time(200) .xp(1) .sound('minecraft:block.anvil.land', 1.0f, 1.0f) .register()

mods.selectionguicrafting.recipe.recipeBuilder() .category('blub') .input(item('minecraft:diamond')) .output(item('minecraft:wheat_seeds') * 5, 0.5f) .register()

mods.selectionguicrafting.recipe.recipeBuilder() .category('dummy_category') .input(item('minecraft:stone') * 32) .output(item('minecraft:diamond') * 50, 0.5f) .output(item('minecraft:clay') * 2, 0.1f) .time(200) .xp(1) .sound('minecraft:block.anvil.land', 1.0f, 1.0f) .register()

mods.selectionguicrafting.recipe.recipeBuilder() .category('dead') .input(item('minecraft:wheat_seeds') * 3) .output(item('minecraft:sand') * 2) .time(40) .queueable(false) .outputType('DROP') .xp(1) .register()

mods.selectionguicrafting.recipe.recipeBuilder() .category('dead') .input(item('minecraft:stick') * 3) .output(item('minecraft:sand') * 2) .frame('selectionguicrafting:textures/gui/frame/iron.png') .time(40) .queueable(false) .command('kill @p') .register()

你是这个资源的作者?登录后可认领此资源。

评论 0

0.0
暂无评分
5 星
0
4 星
0
3 星
0
2 星
0
1 星
0
我的评分

登录后参与评分

还没有评论,来抢沙发吧

评论配图

相似资源