quilt-standard-libraries icon indicating copy to clipboard operation
quilt-standard-libraries copied to clipboard

Brewing recipes

Open Platymemo opened this issue 1 year ago • 9 comments

Allows the creation of brewing recipes in a similar fashion to other recipe types.

The three kinds of brewing recipes are quilt:potion_brewing, quilt:custom_potion_brewing, and quilt:potion_item_brewing. potion brewing and custom potion brewing are functionally similar, with the addition that custom potion brewing allows multiple status effects, much like the turtle master potion but without having to register a potion first. potion item brewing is how you transform a regular potion into a splash potion, etc.

This PR also de-hardcodes the potion slots in the brewing stand, having it check a tag, quilt:potions instead.

The base AbstractBrewingRecipe and supporting infrastructure are general enough that they should support a subclass providing recipes on arbitrary item stacks.

Additionally, this PR opens up a brewing stand fuel registry as an item content registry to allow modders and users to easily add new fuels or modify existing ones.

Platymemo avatar Aug 05 '22 09:08 Platymemo

This will break with vanilla clients

Patbox avatar Aug 05 '22 09:08 Patbox

This will break with vanilla clients

How does this break vanilla? And is it any better ways?

oliviathevampire avatar Aug 05 '22 10:08 oliviathevampire

If a datapack (or otherwise server side mod) uses that feature, vanilla clients won't be able to join server, as recipe packet will contain recipe type it can't read. QSL and it's datapackable additions should be compatible with vanilla clients

Patbox avatar Aug 05 '22 10:08 Patbox

As the recipe is only used serverside, if we can strip the recipes from being sent to a vanilla client this would work. But... that sounds very hacky.

I'm not familiar at all with Minecraft or Quilt's networking so I don't know if it's possible to detect vanilla clients and strip the recipes if so.

We could just strip them entirely from being sent to clients, but I wouldn't want to do that for recipe integrations in mods like EMI.

Platymemo avatar Aug 05 '22 20:08 Platymemo

It should be possible. Polymer library does that for example https://github.com/Patbox/polymer/blob/dev/1.19.1/polymer/src/main/java/eu/pb4/polymer/mixin/item/packet/SynchronizeRecipesS2CPacketMixin.java#L37

Patbox avatar Aug 06 '22 04:08 Patbox

~~https://github.com/QuiltMC/quilt-standard-libraries/pull/161/commits/312b54e75ce4cb90c9e528b95b4c064cf39f405f is already a separate PR! (#163) Please revert it, as it will cause conflicts when 163 is merged.~~ nevermind I'm dumb

Leo40Git avatar Aug 09 '22 10:08 Leo40Git

~312b54e is already a separate PR! (#163) Please revert it, as it will cause conflicts when 163 is merged.~ nevermind I'm dumb

I was going to say, I made that commit because I saw #163!

Platymemo avatar Aug 09 '22 11:08 Platymemo