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

Adding blast resistance #384

Merged
merged 5 commits into from
Mar 23, 2021
Merged

Conversation

Moondarker
Copy link
Contributor

@Moondarker Moondarker commented Mar 21, 2021

Contains current minecraft-data data merged with burger-extracted blast resistance

Closes #383

@Moondarker Moondarker changed the title Adding blast-resistance Adding blast resistance Mar 21, 2021
@Moondarker Moondarker marked this pull request as draft March 21, 2021 12:05
@Moondarker
Copy link
Contributor Author

Gotta note, blast resistance = undefined (values added as 0 in latest commit) correspond very well with hardness = 0 in the same block, and there are a lot of such blocks in 1.16

Example: Dark Oak Stairs
1.15.2: "hardness": 2, "resistance": 3
1.16.2: "hardness": 0, "resistance": 0

What I mean is, something has got to be wrong with the way 1.16 data is extracted

@rom1504
Copy link
Member

rom1504 commented Mar 21, 2021

A bug in burger ?

@rom1504
Copy link
Member

rom1504 commented Mar 21, 2021

Did you write some kind of merge script to only add properties and not lose the ones you don't extract?

@Moondarker
Copy link
Contributor Author

Moondarker commented Mar 21, 2021

Yep, automated it with a node script to merge existing minecraft-data with resistance data gathered using burger + a powershell script to make it for every major version
Also, this comment PrismarineJS/burger-extractor#13 (comment) seems to be only partially true, minecraft-data for all versions >=1.13 was clearly extracted using burger-extractor, all versions <=1.12 on the other hand I'm not sure about

@Moondarker Moondarker marked this pull request as ready for review March 21, 2021 13:04
@Moondarker Moondarker marked this pull request as draft March 22, 2021 11:25
@Moondarker
Copy link
Contributor Author

Burger output is affected by Pokechu22/Burger#23, will see if I can make a quick workaround for now.

@Moondarker Moondarker marked this pull request as ready for review March 22, 2021 13:45
@Moondarker
Copy link
Contributor Author

This is ready for review, I don't think it can get any better for now. Output of Burger was patched using a list of special cases gathered from 1.16 sources
@rom1504, @Karang, the way minecraft-data was compiled desperately needs to be documented, it will become harder to add new data over time if we can't consistently reproduce results. Also, wiki is a nice source, but by no means a reliable one, especially for any version older than the latest one

@rom1504
Copy link
Member

rom1504 commented Mar 22, 2021

Ok will check the pr

About doc I completely agree and the easiest way to do this is that each new pr improve the doc a bit.

So can you add to the "add new version" guide in doc folder what you did here to get blast resistance so the next person can redo the same ?

@Moondarker
Copy link
Contributor Author

Yeah, I just need to clean up a little first. Amount of stuff I collected to get correct values is quite big, but it can be compressed substantially

@Moondarker
Copy link
Contributor Author

Moondarker commented Mar 22, 2021

Actually, just running burger-extractor with PrismarineJS/burger-extractor#13 should do

However, no matter what I do, I cannot reproduce blocks.json from minecraft-data by running burger-extractor, some step has to already be missing from "add new version" guide.

I can ofc make a mini-guide about merging new data with minecraft-data without re-generating files from scratch, but it's all about chicken or the egg paradox, and in future it will lead to problems in determining where different pieces of data came from (if everyone will be merging data like that)

@rom1504
Copy link
Member

rom1504 commented Mar 22, 2021

today mcdata is a big mix of extractor methods

in a perfect world there would be a single code base doing the whole extraction from scratch.

But we're not in this world, so let's document what we have and progress incrementally ;)

@Moondarker
Copy link
Contributor Author

Moondarker commented Mar 22, 2021

If we, as a species, lose in some aspects to computers - aspect №1 is data processing

What I mean is - documentation is good, but we can:

  1. Automate data merging process from different extractors
  2. Improve data extraction from game files instead of getting some parts from wiki

Doing at least one thing of listed above will greatly improve data consistency

P.S. I'm not saying that we should get everything from game files, but the most important and massive things: blocks, items, entities and related things (i.e. metadata descriptions) is something that should definitely come from game files

@rom1504
Copy link
Member

rom1504 commented Mar 22, 2021

yes what you are saying has been tried by several people
#283 has some information on this
the last tries on this are:

burger also has the same purpose

this is a big project, but if you feel like it's important, you could try to contribute to one of these efforts.

@rom1504
Copy link
Member

rom1504 commented Mar 22, 2021

unless someone decides to spend some serious time on this, we're not going to solve this extractor problem at once

so my suggestion is instead to document what needs to be done to run extractors and improve the extractors as we go

@rom1504 rom1504 merged commit 0491b2a into PrismarineJS:master Mar 23, 2021
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

Successfully merging this pull request may close these issues.

Add BlastResistence to Blocks
2 participants