Comments (19)
The current recipes script in the bin/ folder don't produce data to the new recipe format.
But to do that we need the correspondence name -> [id,metadata]
( #7 ) so these scripts can be updated only once we can extract these items/blocks data.
from minecraft-data.
So, in order to do that extraction, I don't want to use html anymore.
wikitext is much easier to parse.
In order to do get that wikitext there are a few ways :
- getting the wikitext from the edit page
- using the API : check if it's actually possible to use it
- asking the team in charge of the wiki if they'd be ok with giving dumps (also see an example here https://dumps.wikimedia.org/) of the database
The problem with the dump is even if they agree to export them, I don't know how regularly they will do that (since the wiki content change regularly).
from minecraft-data.
Using the api is indeed possible (example)
Instead of using it manually, let's use this https://github.com/macbre/nodemw
from minecraft-data.
There's also a wikitext parser written in node.js (https://github.com/spencermountain/wtf_wikipedia).
Parsoid seems like a more advanced parser, but its purpose is generating html so it seems that won't do (spencermountain/wtf_wikipedia#1)
https://github.com/spencermountain/wtf_wikipedia doesn't work on minecraft wiki (tested on Blocks : it can't find the table and on Gravel : it can't read the infobox)
from minecraft-data.
This http://minecraft.gamepedia.com/Data_values is important.
current name in blocks.json and items.json correspond to nothing, wouldn't it be better to replace them by the "nameid" , for example swordDiamond -> diamond_sword (or even minecraft:diamond_sword) ?
from minecraft-data.
http://minecraft.gamepedia.com/Data_values/Block_IDs and http://minecraft.gamepedia.com/Data_values/Item_IDs should be used for the list of blocks and items (that even says if these blocks and items can have metadata) : parsing similar to https://github.com/PrismarineJS/minecraft-data/blob/master/bin/wiki_extractor/entities_extractor.js. Then more data can be found in the page of each block/item.
from minecraft-data.
http://minecraft.gamepedia.com/Category:Documentation_pages useful
http://minecraft.gamepedia.com/Template:ID_table
from minecraft-data.
Items extraction is done
Now trying blocks extraction :
- id
- name
- displayName
- hardness
- stackSize
- diggable
- boundingBox
- material
- harvestTools
material goes along with materials.json. Problem is it seems to have been written manually and doesn't correspond to anything specific in the wiki. Most related thing is this http://minecraft.gamepedia.com/Breaking#Best_tools but I don't really know if it's possible to write materials.json using this.
from minecraft-data.
material : done. materials.json will probably stay manual.
just harvestTools missing.
from minecraft-data.
blocks.json done !
from minecraft-data.
Total progress :
- entities
- items
- blocks
- materials : manual file (very simple + some edge cases only present in the text on the wiki)
- biomes
- instruments : manual from http://wiki.vg/Block_Actions
- recipes
from minecraft-data.
for biomes : http://minecraft.gamepedia.com/Biome + https://github.com/erich666/Mineways/blob/master/Win/biomes.cpp (http://minecraft.gamepedia.com/Biomes#Technical_details)
from minecraft-data.
for recipes : http://minecraft.gamepedia.com/index.php?title=Module:Recipe_list&action=edit
from minecraft-data.
Shapeless means it has multiple shapes. So recipes with only one item, or with 9 times the same item are shaped recipes (see http://minecraft.gamepedia.com/Module_talk:Crafting#Shapeless_recipes_marked_as_shaped_recipes and http://minecraft.gamepedia.com/Template_talk:Crafting#remove_shapeless_indicator_when_unambiguous)
from minecraft-data.
recipes done.
from minecraft-data.
only biomes missing.
from minecraft-data.
For biomes : see PrismarineJS/mineflayer#197
from minecraft-data.
So, biomes current values cannot really be automatically extracted : I added a line in the wiki about how to semi-automatically extract it.
from minecraft-data.
All the .json now have a extraction procedure ! closing.
The next step is about metadata extraction but that will be done in other issues.
from minecraft-data.
Related Issues (20)
- Review and fix protocol.json for 1.20.2 HOT 5
- blockMappings.json only available in v1.19.1?
- [1.20.2] Incorrect recipes, and inconsistent shape format HOT 2
- Support Minecraft PC 1.20.3 HOT 2
- Support Minecraft PC 1.20.4 HOT 1
- Several 1.20.2 recipes have invalid shape data (PC) HOT 2
- Create gh action bot to diff protocol files HOT 1
- 1.20.2 and 1.20.3 missing metadataKeys in entities.json. HOT 8
- Add sound id - sound name map for each version HOT 10
- Add blocks & items pc renames data HOT 1
- Add version: HOT 1
- Add version:
- Identifcation of experimental features/items? HOT 4
- why are the block IDs in this package different from the actual minecraft block IDs? HOT 2
- How can find the description for switches? HOT 4
- Issue with Block State (blocksB2J.json and blocksJ2B.json) Data in Version 1.20.30
- Tb
- Add version:
- Support Minecraft PC 1.20.5
- Support Minecraft PC 1.20.6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minecraft-data.