dragonfly icon indicating copy to clipboard operation
dragonfly copied to clipboard

Crafting recipes are incomplete

Open Flonja opened this issue 1 year ago • 2 comments

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.

Flonja avatar Apr 21 '24 11:04 Flonja

Fixed in https://github.com/df-mc/dragonfly/commit/223f13677b87f1116e2084299689a3ea91288de9

TwistedAsylumMC avatar Apr 27 '24 19:04 TwistedAsylumMC

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

image image

Flonja avatar May 04 '24 13:05 Flonja

This appears to be fixed

DaPigGuy avatar Dec 01 '24 11:12 DaPigGuy