Giter VIP home page Giter VIP logo

Comments (19)

rom1504 avatar rom1504 commented on July 22, 2024

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.

rom1504 avatar rom1504 commented on July 22, 2024

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.

rom1504 avatar rom1504 commented on July 22, 2024

Using the api is indeed possible (example)

Instead of using it manually, let's use this https://github.com/macbre/nodemw

from minecraft-data.

rom1504 avatar rom1504 commented on July 22, 2024

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.

rom1504 avatar rom1504 commented on July 22, 2024

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.

rom1504 avatar rom1504 commented on July 22, 2024

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.

rom1504 avatar rom1504 commented on July 22, 2024

http://minecraft.gamepedia.com/Category:Documentation_pages useful
http://minecraft.gamepedia.com/Template:ID_table

from minecraft-data.

rom1504 avatar rom1504 commented on July 22, 2024

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.

rom1504 avatar rom1504 commented on July 22, 2024

material : done. materials.json will probably stay manual.

just harvestTools missing.

from minecraft-data.

rom1504 avatar rom1504 commented on July 22, 2024

blocks.json done !

from minecraft-data.

rom1504 avatar rom1504 commented on July 22, 2024

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.

rom1504 avatar rom1504 commented on July 22, 2024

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.

rom1504 avatar rom1504 commented on July 22, 2024

for recipes : http://minecraft.gamepedia.com/index.php?title=Module:Recipe_list&action=edit

from minecraft-data.

rom1504 avatar rom1504 commented on July 22, 2024

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.

rom1504 avatar rom1504 commented on July 22, 2024

recipes done.

from minecraft-data.

rom1504 avatar rom1504 commented on July 22, 2024

only biomes missing.

from minecraft-data.

rom1504 avatar rom1504 commented on July 22, 2024

For biomes : see PrismarineJS/mineflayer#197

from minecraft-data.

rom1504 avatar rom1504 commented on July 22, 2024

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.

rom1504 avatar rom1504 commented on July 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.