Releases: WolfyScript/CustomCrafting
Error Tracking & Bug Fixes | 5.a3.0.0
Note
As always this version requires the latest scafall version to work, due to breaking issues.
Error Tracking
This update introduces error tracking to assist in the maintenance of the plugin/mod.
The Error tracking integration makes issues/errors more visible, and gives insight on how well the plugin/mod functions in production. Which in return enables far quicker bug fixes and improvements than previously possible.
How does it work?
When an error happens within the plugin/mod, the error and additional context in which the error has happened is send to a server.
On the server, the information is collected and presented on a dashboard. Given the additional context information, the cause of the issue can be tracked down and fixed a lot easier and quicker.
What information is collected?
The idea is not to use this as telemetry (I'm not Google lol). The environment in which the plugin/mod runs may contain personal information, so care needs to be taken.
I try to collect as little information as possible while still benefiting the error tracking and development.
Information collected
- timestamp (UTC) -
when was the error first seen? last seen? - minecraft version -
is minecraft version supported? - customcrafting version -
which version is affected? latest version? already fixed in later version? - platform info (type, version) - e.g.
which platform is affected? e.g. spigot/paper/fabric - exception stacktrace -
where in the code did the error happen? - list of installed plugins/mods and their version -
are there common plugins/mods? possible conflicts? - runtime info (JDK) -
is the jdk version correct/supported? - thread name and id
useful for multithreaded scenarios. on which thread did the error occur? - breadcrumbs -
set within the code to determine configurations and code paths taken before the error ocurred
This list may be incomplete in case I overlooked something that sentry collects.
Information NOT collected
- Computer Name, Computer User, or similar Personal Identifiable Information, is not and will never be collected!
- Full Server Logs
- Logs unrelated to CustomCrafting / other projects of mine
- Errors unrelated to CC / other projects of mine
Note: in rare cases (should be very unlikely), personal info may end up in the stacktrace due to the exception that is thrown.
The Software behind it
The error tracking is possible thanks to the Sentry SDK.
While Sentry provides their own cloud services with additional features like performance monitoring, I deem that unnecessary and too intrusive.
So I opted to use a more privacy focused self-hosted alternative called Bugsink purely focused on error tracking.
That way the data, even though it should be anonymized anyway (but you never know what may sneak into those stacktraces), is not handled by third-parties.
Opt-Out
I am working on a solution to easily opt out of the error tracking via a command in game or console.
You can also disable it before running the plugin by using the following steps:
open jar archive → open com/wolfyscript/customcrafting/vals.properties → set sentry.enabled to false
By using the pre-release versions, you opt into error tracking and accept the above-mentioned data collection.
🚀 Features
- feat: sentry sdk error tracking (
details)
🐛 Fixes
- fix(spigot): campfire recipes missing block entity context (
details) - fix(spigotlike): furnace add missing block entity context (
details) - fix(spigotlike): invalid crafting matrix shrink logic (
details) - fix(spigotlike): previous recipe in crafter (
details) - fix(spigotlike): crafter not using random result (
details)
🧪 Tests
- test: rename test recipes (
details)
4.19.1.0
🐛 Fixes
- fix: paper method call breaking spigot compat (
details) - fix: null player data in gui (
details) - fix: only need to check lockdown once (
details) - fix: possible npe in CraftListener ItemsAdder fix (
details) - fix: make sure lists returned by recipe registry are immutable (
details)
⚙️ Build & CI/CD
- build: add 1.21.4 to the modrinth supported versions (
details)
Separate Paper version & Bug Fixes | 5.a2.0.0
Getting closer to the final alpha version. Still a few things to work on and test before the jump to beta.
This update in particular adds a whole separate version for paper, a variety of test recipes, and fixes issues plus oversights.
Note
As always this version requires the latest scafall version to work, due to breaking issues.
Separate Paper Version
Starting with this update there is going to be a separate customcrafting and scafall jar file for paper specifically.
If you are using Paper you should use that to benefit from the improvements and extra features.
Currently, that extra includes only the Stonecutter recipe support, which is missing in the Spigot version.
Resources Configuration
Separated the Backup Destinations from the Resource Destinations (which are now just called Sources).
The sources define where resources are loaded from (Local directory, H2, SQLite, MySQL, etc.).
The Backup destinations define where backups will get saved when created. (local directory or zip file)
Recipe Priority Implementation
Turns out the whole recipe priority was never actually implemented... Until now.
Recipes of higher priority are checked before recipes of lower priority.
On Fabric, where custom recipe proxies are registered into the vanilla recipe system, vanilla recipes have a priority of 0 (e.g. crafting, stonecutter, smelting, blasting, smoking and campfire recipes).
Bug Fixes
- fix(common): not handling disabled recipes
- fix(fabric): not handling disabled recipes
- fix: backup not created when dir already exists
- fix: grindstone recipe matching
- fix: incorrect trimmed shape width/height
- fix: incorrect item repair cost in anvil
- fix: incorrect shape shrink algo
- fix: invalid ingredient recipe index in shaped crafting recipes
- fix: invalid evaluated ingredient position
- fix: improve & fix shape and crafting matrix shrink logic
- fix: missing type mapping for ingredient RemainsIgnoreOptions
Full Changelog: v-5.a0.1.0...v-5.a2.0.0 (messed up previous tag... whoops)
4.19.0.4
4.19.0.3
4.19.0.2
Initiate v5 ALPHA: A Fresh Start | 5.a0.1.0
This release marks the start of the alpha stage of CustomCrafting v5.
What is different in v5?
v5 is a complete rewrite & redesign of the entire plugin and recipe structure. It adds features and improvements not feasible in v4.
With v5, CustomCrafting has now transformed into a mod instead of a plugin.
In recent times, Minecraft has changed a lot, new modding/plugin platforms have emerged or separated themselves from their original project (like Paper). It's now a major task to make plugins multi-platform.
Therefore, v5 focuses on the Minecraft internals instead of platform specific APIs. In order to keep compatibility, the goal of v5 is to integrate into each platform as best as possible (like Events, Listeners, Third-party Plugins/Mods), while keeping most of its codebase independent.
That is where scafall comes in. Scafall allows for the creation of cross-platform APIs, which other mods and plugins may use, and makes it easier to link platform specific implementations together.
This comes with a variety of new challenges, so going forward CustomCrafting (and scafall) will only support the latest Minecraft version, including minor versions (feature drops)!
TLDR
- CustomCrafting v5 should be considered a mod now, and uses Minecraft internals directly
- Only supports the latest Minecraft version, including Minor versions (Version Drops)
- Requires the scafall library/mod See releases here
- Provides a cross-platform API
You can read more about the Roadmap here
New Features
This initial alpha introduces some major overhauls to the resource loading and recipe structure.
Warning
This is still alpha! Not meant for production!
The API and therefor the configuration and recipe structure may change dramatically!
This is meant as a preview for what's to come. You may try it out, and report issues, but production use is discouraged.
Configure multiple custom recipe sources and their load order
- Load from local directory
- Load from many different SQL sources
- SQLite
- H2
- MySQL
- MariaDB
- PostgreSQL
- MS SQLServer
- OracleDB
New & Improved Recipes
While not all recipes, like the Stonecutter and Cauldron recipes, are implemented yet, v5 expands the functionality of all recipe types. Especially the ones that had a bit of a lacklustre feature set in v4.
Tip
This version adds some default recipes that showcase some of the new features.
They'll get loaded on startup and can be found here in the v5 branch
Improved Anvil Recipes
- Rename Options (formatted, pre and suffix, cost, repair cost)
- Durability Combination Options (bonus, ratio combination)
- Item Repair Options (cost per item, enchants)
- Enchanting Options (preserve, upgrade cost, conflict cost, and more...)
Improved Grindstone Recipes
- Enchant Removal Options
- Enchant Merge Options
- Durability Combination Options
- Repair Cost Options
Improved Recipe Items
- Full SNBT support for vanilla item stacks
- Support for DataFixerUpper via version property
Improved Command Result Action
- Full command context support
- Target Selectors
@p,@n,@r,@a,@e,@s(depending on source) - Target Selector arguments
- Target Selectors
- and basically anything else from vanilla commands
Up Next
- Rethink the inner-jar system. Do we need it? Is there a better way to handle libs?
- Compatibility with third-party Items and ItemStacks
- Figure out a Dependency system for loading recipes
- Expand to other platforms (Fabric, Sponge)
You can read more about the Roadmap here
Fabric Support & Advanced Ingredients | v5.a1.0.0
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.