
这是由 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()

This is a fork of Selection GUI Crafting by Gliese_832_c.
Fork? Rewrite! (Version 2.0.0+)
What started as a fork of the original mod, quickly turned into a rewrite. The original crafting system felt way to clunky and not user-friendly. The new system is much more intuitive and user-friendly. It also allows much more customization and is more flexible to benefit the needs of modpack developers. An added bonus is the support for GroovyScript. The old CraftTweaker support was rewritten as well to reflect the new system.
Re-Rewrite! (Version 3.0.0+)
Yep another rewrite. Now I finally took the time to transform the mod into something much more modular. So now GUIs can be opened either by items or blocks, each 'trigger' can tweaks the overall stats of the recipes. Additionally there are now ways to restrict recipes, for example you can now lock recipes behind Game Stages, Reskillable skill levels and even advancements. Furthermore I added the possibility to execute a set of commands if the general recipe builder wasn't powerful enough. This update also comes with an overhauled JEI integration and various other quality of life improvements!
What even is this?
SelectionGUI Crafting gives modpack authors the ability to add crafting recipes into a selection GUI that is triggered by right-clicking while holding the right items. This could, for example, be used for clay recipes. Instead of manually arranging clay balls in a different way in a crafting table, it would be possible to make it so that you right-click with a spatula in one hand, clay in the other, and just select the clay item you want to make. Another use example would be forging. Right-click with a hammer in one hand, an ingot in the other, and select your desired toolhead.
CraftTweaker & GroovyScript Integration (Version 3.0.0+)
I tried to make them as similar as possible. I'll publish additional documentation to the GroovyScript wiki as well as the CraftTweaker wiki. Below are a few examples, while I'll setup proper documentation.
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
登录后参与评分
还没有评论,来抢沙发吧