Skript icon indicating copy to clipboard operation
Skript copied to clipboard

Recipe Support

Open Absolutionism opened this issue 1 year ago • 3 comments

Description

This PR aims to add support for recipes including:

  • [x] BukkitClasses#Recipe
  • [x] SkriptClasses#RecipeType
  • [x] DefaultComparators#RecipeType->RecipeType
  • [x] CondDiscoveredRecipes
  • [x] CondRecipeExists
  • [x] EffDiscoverRecipe
  • [x] EffRemoveRecipe
  • [x] EffResetRecipes
  • [x] ExprAllRecipes
  • [x] ExprGetRecipe
  • [x] ExprRecipeCategory
  • [x] ExprRecipeCookingTime
  • [x] ExprRecipeExperience
  • [x] ExprRecipeGroup
  • [x] ExprRecipeIngredients
  • [x] ExprRecipeKey
  • [x] ExprRecipeKeyConverter
  • [x] ExprRecipeResult
  • [x] ExprRecipeType
  • [x] SecRegisterRecipe
  • [x] Utils#NamespacedUtils
  • [x] Utils#RecipeUtils

Target Minecraft Versions: any Requirements: none Related Issues: #5261

Absolutionism avatar Oct 16 '24 01:10 Absolutionism

related issue #5261

Fusezion avatar Oct 16 '24 02:10 Fusezion

So uuh thinking about moving this to a module?

nada

Absolutionism avatar Oct 16 '24 04:10 Absolutionism

I mentioned it to smurf once, but mentioning it in the pr itself will be good, what's the thought about a proper RecipeChoice implementation to have more support of ingredients.

If this goes through a custom ItemTypeChoice should be created to enable skript's item types correctly and not converting to an itemstack always.

This should be pretty safe due to the fact recipes and these can't be serialized by default

Fusezion avatar Oct 17 '24 04:10 Fusezion

well i should be able to treat a mutable crafting recipe the same as a crafting recipe hence they should have the same interface, and it would allow it to pass instanceof CraftingRecipe

So, I tried to have the subclasses extends their respective Bukkit recipe class, but unfortunately it wont let me.

Absolutionism avatar Nov 16 '24 18:11 Absolutionism

well i should be able to treat a mutable crafting recipe the same as a crafting recipe hence they should have the same interface, and it would allow it to pass instanceof CraftingRecipe

So, I tried to have the subclasses extends their respective Bukkit recipe class, but unfortunately it wont let me.

ah are they final?

sovdeeth avatar Nov 16 '24 18:11 sovdeeth

ah are they final?

It just says "Class can not extend multiple classes"

Absolutionism avatar Nov 16 '24 18:11 Absolutionism

ah are they final?

It just says "Class can not extend multiple classes"

oh right the sub recipes aren't interfaces

sovdeeth avatar Nov 16 '24 20:11 sovdeeth

~~Waiting on #7267 and #7286 to be merged.~~ All good

Absolutionism avatar Dec 19 '24 21:12 Absolutionism

i think you can turn a few expressions into SPEs. didnt comment on all of them

Yeah, so I remember awhile ago I tried updating them to SPE but it failed. I know now it was because I was doing register and not registerDefault which I didn't know existed at the time from the previous attempt.

Absolutionism avatar Dec 25 '24 21:12 Absolutionism

Do you still intend to work on this?

sovdeeth avatar Jun 03 '25 05:06 sovdeeth

Do you still intend to work on this?

no

Absolutionism avatar Jun 03 '25 05:06 Absolutionism