Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom brewing recipes #2046

Closed
mergu opened this issue Sep 21, 2019 · 23 comments
Closed

custom brewing recipes #2046

mergu opened this issue Sep 21, 2019 · 23 comments
Labels
Feature A new feature to add. Suggestion Possibly going to be added.

Comments

@mergu
Copy link
Contributor

mergu commented Sep 21, 2019

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

@mcmonkey4eva mcmonkey4eva added Feature A new feature to add. Suggestion Possibly going to be added. labels Sep 22, 2019
@mcmonkey4eva
Copy link
Member

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

@mcmonkey4eva mcmonkey4eva added the Waiting For Reply Waiting for a reply from the reporting user. label Oct 13, 2019
@mergu
Copy link
Contributor Author

mergu commented Oct 13, 2019

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

@SXRWahrheit
Copy link
Contributor

How would this differ from existing features?

@mergu
Copy link
Contributor Author

mergu commented Oct 14, 2019

Which existing features?

@SXRWahrheit
Copy link
Contributor

For example, <InventoryTag.fuel>

@mergu
Copy link
Contributor Author

mergu commented Oct 14, 2019

That's for furnaces

@SXRWahrheit
Copy link
Contributor

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

It seems like this request could be benefited by specificity!

@mergu
Copy link
Contributor Author

mergu commented Oct 14, 2019

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

@SXRWahrheit
Copy link
Contributor

What would that look like?

@mergu
Copy link
Contributor Author

mergu commented Oct 14, 2019

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 😄

@SXRWahrheit
Copy link
Contributor

Tags? Mechanisms?

@mergu
Copy link
Contributor Author

mergu commented Oct 14, 2019

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

@SXRWahrheit
Copy link
Contributor

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

@mergu
Copy link
Contributor Author

mergu commented Oct 14, 2019

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

@SXRWahrheit
Copy link
Contributor

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. :)

@mergu
Copy link
Contributor Author

mergu commented Oct 14, 2019

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

@DenizenScript DenizenScript locked as too heated and limited conversation to collaborators Oct 14, 2019
@mcmonkey4eva
Copy link
Member

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 mcmonkey4eva changed the title BrewerInventory support custom brewing recipes Oct 14, 2019
@DenizenScript DenizenScript unlocked this conversation Nov 6, 2019
@MrMaleficus
Copy link

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

@mcmonkey4eva mcmonkey4eva removed the Waiting For Reply Waiting for a reply from the reporting user. label Nov 24, 2019
@mcmonkey4eva
Copy link
Member

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

@mcmonkey4eva
Copy link
Member

mcmonkey4eva commented Nov 24, 2019

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
Copy link
Member

  • 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

@SXRWahrheit
Copy link
Contributor

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

@mcmonkey4eva
Copy link
Member

added by #2358

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature A new feature to add. Suggestion Possibly going to be added.
Projects
None yet
Development

No branches or pull requests

4 participants