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

Crafting recipes are incomplete #864

Open
Flonja opened this issue Apr 21, 2024 · 2 comments
Open

Crafting recipes are incomplete #864

Flonja opened this issue Apr 21, 2024 · 2 comments

Comments

@Flonja
Copy link
Contributor

Flonja commented Apr 21, 2024

Research

What the user sees

(Even though the materials are there, the recipe doesn't give a diamond pickaxe)
image
(When in creative the items show up like they are supposed to do)
image

What debugging will do

In server/item/recipe/vanilla.go:

-	for _, s := range craftingRecipes.Shaped {
+	for i, s := range craftingRecipes.Shaped {
		input, ok := s.Input.Items()
		output, okTwo := s.Output.Stacks()
+		for _, out := range s.Output {
+			if out.Name == "minecraft:diamond_pickaxe" {
+				fmt.Printf("%v: ok1?%v ok2?%v\n", i, ok, okTwo) 
#				Returns: "208: ok1?false ok2?true"
+				if !ok {
+					_, _ = s.Input.Items()
#					Breakpoint here
+				}
+				if !okTwo {
+					_, _ = s.Output.Stacks()
#					Breakpoint here
+				}
+			}
+		}
		if !ok || !okTwo {
			// This can be expected to happen - refer to the comment above.
			continue
		}
		Register(Shaped{
			shape: Shape{int(s.Width), int(s.Height)},
			recipe: recipe{

Which led me to this:
image
Where it tried to recognize an empty item(?) I don't know how it is supposed to be generated, but it does seem to be the fault.
It would make sense why the sword and shovel recipes were showing up, since they are shapeless recipes and these are shaped.

@TwistedAsylumMC
Copy link
Member

Fixed in 223f136

@Flonja
Copy link
Contributor Author

Flonja commented May 4, 2024

Problem still occurs
(Edited to add:) Furnace recipes too

image
image

@Sandertv Sandertv reopened this May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants