mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-27 02:20:30 +00:00
e6125bcf60
This attempts to reduce some duplication in recipe serialisation (and deserialisation) by moving the structure of a recipe (group, category, ingredients, result) into seprate types. - Add ShapedRecipeSpec and ShapelessRecipeSpec, which store the core properties of shaped and shapeless recipes. There's a couple of additional classes here for handling some of the other shared or complex logic. - These classes are now used by two new Custom{Shaped,Shapeless}Recipe classes, which are (mostly) equivalent to Minecraft's shaped/shapeless recipes, just with support for nbt in results. - All the other similar recipes now inherit from these base classes, which allows us to reuse a lot of this serialisation code. Alas, the total code size has still gone up - maybe there's too much abstraction here :). - Mostly unrelated, but fix the skull recipes using the wrong UUID format. This allows us to remove our mixin for nbt in recipes (as we just use our custom recipe now) and simplify serialisation a bit - hopefully making the switch to codecs a little easier. |
||
---|---|---|
.. | ||
src | ||
build.gradle.kts |