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

Pickaxe recipe upside down? #231

Closed
njt1982 opened this issue Mar 19, 2019 · 14 comments · Fixed by #349
Closed

Pickaxe recipe upside down? #231

njt1982 opened this issue Mar 19, 2019 · 14 comments · Fixed by #349
Labels
Projects

Comments

@njt1982
Copy link
Contributor

njt1982 commented Mar 19, 2019

"473": [
{
"inShape": [
[
null,
497,
null
],
[
null,
497,
null
],
[
482,
482,
482
]
],
"result": {
"count": 1,
"id": 473
}
}
],

According to https://minecraft.gamepedia.com/Pickaxe the iron should be along the top, not along the bottom.

Why is the recipe vertically inverted?

@rom1504
Copy link
Member

rom1504 commented May 9, 2020

good question. Let's check the burger extractor

@njt1982
Copy link
Contributor Author

njt1982 commented Jun 1, 2020

It's not just the pickaxe, I think it's all of them...

https://github.com/PrismarineJS/burger-extractor/blob/878b8b1345f9e798bc8b0aa74dd611d5519dc447/src/extractors/recipes.js#L29-L55

I'm not quite sure how that section of code results an a 2D array shape... It looks like it loops over the "line" and converts item names into numeric IDs?

@TheDudeFromCI
Copy link
Member

In the array, the recipes are made assuming that inventory slot 0 is the bottom left corner of the grid, and slot 8 is the top right.

@njt1982
Copy link
Contributor Author

njt1982 commented Jul 17, 2020

Ahhh I thought 0 was top left!

Thanks @TheDudeFromCI - I wonder if this should be documented here:
https://github.com/PrismarineJS/minecraft-data/blob/95f19e5/doc/recipes.md

@TheDudeFromCI
Copy link
Member

Probably, yeah. I'll make a PR.

@TheDudeFromCI
Copy link
Member

So, apparently I never followed up on this issue. The recipes are indeed upside down and shouldn't be. The indices were loaded incorrectly which switching between versions.

Relevant discussions:
PrismarineJS/mineflayer#1112
PrismarineJS/prismarine-recipe#4

@njt1982
Copy link
Contributor Author

njt1982 commented Aug 20, 2020

@TheDudeFromCI so is the bug in the burger extractor that I linked to in #231 (comment) ?

@TheDudeFromCI
Copy link
Member

Most likely, yeah. I guess when the chance in 1.13 occured, the way data was stored is changed. The extractor wasn't updated properly, I'm guessing.

@njt1982
Copy link
Contributor Author

njt1982 commented Aug 20, 2020

So in that code, it loops over the shape backwards (--j)... is it just a simple matter of making it go forwards now?! 🤷🏻‍♂️

@TheDudeFromCI
Copy link
Member

Also checking the Minecraft version, but yes.

I guess it was never really a hard issue to solve. Even ignoring the extractors, someone could just write a simple 10 line JS script to import/flip/export them. I just don't think anyone's gotten around to it.

@njt1982
Copy link
Contributor Author

njt1982 commented Aug 20, 2020

@TheDudeFromCI You mean like this? 😉

https://github.com/njt1982/minecraft-item-browser/blob/5b73ce8de666fa2aaca1b943e1c980e2da7c26d6/src/components/Recipe.vue#L60-L67

EDIT: wondering why that snippet reference isn't expanding out into a code snippet preview

@TheDudeFromCI
Copy link
Member

Yep, basically.

@Ghosin9
Copy link

Ghosin9 commented Dec 6, 2020

bump! sorta solved, the crafting recipes are upside down, reversing them worked!

@rom1504
Copy link
Member

rom1504 commented Dec 7, 2020 via email

Easy Tasks automation moved this from To do to Done Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Easy Tasks
  
Done
Development

Successfully merging a pull request may close this issue.

4 participants