Skip to content

Fabric Support & Advanced Ingredients | v5.a1.0.0

Pre-release
Pre-release

Choose a tag to compare

@WolfyScript WolfyScript released this 02 Sep 18:07
· 15 commits to v-4.19 since this release
8d39cc7

Note

Requires the latest scafall alpha you can find here.

Fabric Server Support

This version introduces support for Fabric server-side only. Server-side only mods allow vanilla clients to connect to the Fabric server, so similar to Spigot, players don't need to install any client mods.

The Fabric implementation provides many benefits compared to the Spigot implementation.
It integrates custom recipes that have a vanilla counterpart directly into the vanilla recipe mechanism, this means better integration with existing mods and improved recipe book support. Not to mention the nonexistent glitchy ingredient behaviour that sometimes occurs on Spigot due to how that API functions.

Stonecutter recipes are challenging to implement, because the selection is client-side using item types only.
So recipes may show up in the selection even though they don't exactly match.
To prevent that, CustomCrafting checks if a recipe matches after it has been selected in the menu and either outputs the stack or not.

Current Recipe support

Recipe Type Spigot Fabric Paper (Planned)
Crafting (Player + Crafter) 🟢 🟢 🔵
Smelting 🟢 🟢 🔵
Smoking 🟢 🟢 🔵
Blasting 🟢 🟢 🔵
Campfire 🟢 🟢 🔵
Repairing (Anvil) 🟢 🟢 🔵
Smithing 🟢 🟢 🔵
Grinding 🟢 🟢 🔵
Stonecutting 🔴
(Missing API)
Requires Paper impl.
🟢 🔵

🟢 - Supported. Implemented with all advanced Features
🔴 - Unsupported. Not Implemented
🔵 - Planned to be supported in future alpha

Advanced Ingredients

This update introduces new Ingredient options that allow to fine tune how they are matched and/or consumed.
These options are optional and use defaults that make them behave like they previously did.
Options all have their own Registry, so third-party plugins/mods can register their own custom behaviour for each option type.

You can find more info in the recipes api package and RegistryTypes interface.

Matching Options

These options specify how the Ingredient choices are matched against the source stack in the inventory.

Exact

(Default)
A simple matching solution that checks if the source stack has the same type and components as the ingredient choice.

Item

Checks if the source stack is of the same type as the ingredient choice.

mustContain: A set of data component keys that the source stack must have.
mustNotContain: A set of data component keys that the source stack must not have.

Consumption Options

Specifies how the Ingredient is consuming the source stack when the result is collected or produced.

Consume

(Default)
Consumes the amount from the source item and returns its remains.
If the remains can be stored on the source stack or the source stack is empty after consumption, then the remains are put into place. Otherwise, the remains are either stored in the inventory or dropped on the ground.

remains - Configures how the remainders of a source stack is determined.

Replace

Replaces the source stack with the specified replacement stack.

replacement - The stack to replace the source stack with

Keep

Keeps the source item as is without consuming it.

modifier - Modifies the source stack using the Recipe Item Modifier settings.

Recipe Item Modifier

The previous "Result Modifier" has been generalized and works both for Results and Ingredients now.
This makes it possible to modify both using information about the ingredients used in a recipe.

Next Up

  • Separate Paper implementation to support more features, that are not possible on Spigot.
  • Testing of all the Recipes features across platforms, making sure the behaviour is consistent across all of them.