Denizen icon indicating copy to clipboard operation
Denizen copied to clipboard

custom brewing recipes

Open mergu opened this issue 6 years ago • 22 comments

Now that we have custom crafting recipes working great, I started to look into making custom brewing recipes. Unfortunately that doesn't seem to be a thing but I'm still going to try to hack some in. Doesn't appear like we support brewing location/inventory stuff: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/BrewingStand.html https://hub.spigotmc.org/javadocs/spigot/org/bukkit/inventory/BrewerInventory.html

mergu avatar Sep 21 '19 20:09 mergu

What features are you actually wanting for this? Just a custom brewing recipe system? Or...?

mcmonkey4eva avatar Oct 13 '19 15:10 mcmonkey4eva

A custom brewing recipe system would be amazing. I was looking into mocking one myself but that would be even easier on me/others. Basically I'd like complete control over brewing stands - whether that's a builtin system or a bunch of tags/mecs/etc

Edit: This also should be supported: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/event/inventory/BrewingStandFuelEvent.html

mergu avatar Oct 13 '19 15:10 mergu

How would this differ from existing features?

SXRWahrheit avatar Oct 14 '19 03:10 SXRWahrheit

Which existing features?

mergu avatar Oct 14 '19 03:10 mergu

For example, <InventoryTag.fuel>

SXRWahrheit avatar Oct 14 '19 03:10 SXRWahrheit

That's for furnaces

mergu avatar Oct 14 '19 03:10 mergu

Right, and it's just shorthand for numbered item slots.

It seems like this request could be benefited by specificity!

SXRWahrheit avatar Oct 14 '19 03:10 SXRWahrheit

Accessors/mutators and an unimplemented event available in posted javadocs as usual. Going above and beyond this feature request would be to have a builtin system, but OP was just requesting better brewing stand support in general

mergu avatar Oct 14 '19 03:10 mergu

What would that look like?

SXRWahrheit avatar Oct 14 '19 03:10 SXRWahrheit

The ability to fully control all aspects of a brewing stand (exposed by the bukkit api at least - who knows what kind of nms/packet hackery you can achieve). Most of our other inventories are based directly off their bukkit javadocs so should be able to follow those quite easily 😄

mergu avatar Oct 14 '19 03:10 mergu

Tags? Mechanisms?

SXRWahrheit avatar Oct 14 '19 03:10 SXRWahrheit

Both, and an event, as mentioned in previous posts.

mergu avatar Oct 14 '19 03:10 mergu

You've alluded to that, yes, without being specific.

SXRWahrheit avatar Oct 14 '19 03:10 SXRWahrheit

Well whatever naming scheme is decided for the denizen implementation is up to the implementer. Ideally if they are convenience properties that already exist for other types of blocks they would be grouped in, like the fuel one you posted. Otherwise new tag/mec pairs should be made

mergu avatar Oct 14 '19 03:10 mergu

It might be helpful to that implementer, and thus more likely to be implemented, if you took the time to write out exactly what you're looking for. :)

SXRWahrheit avatar Oct 14 '19 03:10 SXRWahrheit

Sure, image image image

These are the types of operations that should be possible with brewing stands via denizen. Currently the only thing I would like to see remain is the ability to get the inventory or inventory holder, otherwise the rest would be nice to have as new additions and aliased properties to avoid inventory slot hacks

mergu avatar Oct 14 '19 04:10 mergu

Please stop this nonsense fighting. At this point (given the above and the preceding conversation on Discord) it's beyond clear that you're not just confused, you've made the active choice to give anti-answers.

mcmonkey4eva avatar Oct 14 '19 04:10 mcmonkey4eva

Some elements that can be handy :

BrewingStandRefueled event: Triggers when a brewing stand block is about to refuel

  • Context : -- <context.item> returns the ItemTag of the item about to be used as fuel. -- <context.power> returns the ElementTag(Number) of the fuel power of the item. -- <context.consuming> returns the ElementTag(Boolean) of whether the item will be consumed. -- <context.location> returns the LocationTag of the brewing stand.
  • Determination -- Element(Number) to set the new fuel power. -- Element(Boolean) to set whether the item will be consumed.

tag <InventoryTag.brewing_ingredient> & mec brewing_ingredient

  • Returns the item being used as the brewing ingredient in this brewer inventory.
  • Sets the brewing ingredient of this brewer inventory.

tag <LocationTag.brewing_fuel_level> & mec brewing_fuel_level

  • Returns the fuel level of this brewing stand block.
  • Sets the brewing fuel level of this brewing stand block.

tag <InventoryTag.brewing_results> & mec brewing_results

  • Returns the list of items in the result slots in this brewer inventory.
  • Sets the result slots in this brewer inventory.

tag <InventoryTag.is_brewing_stand>

  • Returns true if the inventory is a brewing stand

Support for custom brewing recipes

  • example template : https://one.denizenscript.com/haste/59671

MrMaleficus avatar Nov 06 '19 17:11 MrMaleficus

I believe said on Discord rather than here when that was posted, @MrMaleficus those seem like rather poor tag/mech names.

mcmonkey4eva avatar Nov 24 '19 11:11 mcmonkey4eva

The results don't appear to be independently tracked in Spigot. Probably just the normal inventory contents. Not sure if we should maybe just follow Spigot's API setup there. It makes sense, for a list of items to be treated as an inventory rather than a separate magical list thingy (vs. singular items, which make more sense to have a dedicated handler, and won't be missing any functionality the concept of "a set of items" normally has attached)

mcmonkey4eva avatar Nov 24 '19 11:11 mcmonkey4eva

  • Fuel/Ingredient: I just integrated them with existing tags instead (refer to changelog).
  • <InventoryTag.is_brewing_stand> is silly, just check the inventory_type.
  • fuel_level: added basically as requested.
  • Also tossed in a brewing_time.
  • event added very similar to request

Actual custom recipe system still TODO

mcmonkey4eva avatar Nov 24 '19 12:11 mcmonkey4eva

Ya boi is on 1.16 now and I would also like this feature please. <3

SXRWahrheit avatar Jul 29 '20 15:07 SXRWahrheit

added by #2358

mcmonkey4eva avatar Aug 24 '22 18:08 mcmonkey4eva