Giter VIP home page Giter VIP logo

Comments (10)

roblabla avatar roblabla commented on July 22, 2024

👍 to removing the indexing, the data should be as natural as possible. Building an index table isn't hard to do in most languages anyway ^^.

from minecraft-data.

Gjum avatar Gjum commented on July 22, 2024

Not opposed, as it often depends on how the data are used and should be done by each application.

from minecraft-data.

rom1504 avatar rom1504 commented on July 22, 2024

So... not sure that's so easy. That means changing everywhere in mineflayer that use that indexing, also probably everywhere in stuff using mineflayer.

from minecraft-data.

roblabla avatar roblabla commented on July 22, 2024

@rom1504 we just need to create a js that exposes the indexed minecraft_data, and use that in the files instead of minecraft_data, don't we ? I don't think there would be a lot of code-level changes.

from minecraft-data.

rom1504 avatar rom1504 commented on July 22, 2024

@roblabla yeah sure, it actually already kind of exist there https://github.com/andrewrk/mineflayer/blob/master/lib/item_index.js

Problem is it also exists here https://github.com/Darthfett/helperbot/blob/master/lib/items.js#L14
and there https://github.com/rom1504/rbot/blob/5802c9806077be85974c830426aa387dc1d58257/task.js#L27

Also in lot of places in mineflayer (there for example https://github.com/andrewrk/mineflayer/blob/7890055e1046098487d8ce6ac5ded811813ea7b9/lib/block.js#L14)

So : yes we should provide a wrapper in mineflayer instead of providing the raw data, but that means changing stuff in lot of places.

Not sure this https://github.com/andrewrk/mineflayer/blob/master/doc/api.md#enums should still be in mineflayer API.

from minecraft-data.

rom1504 avatar rom1504 commented on July 22, 2024

I'm using the diff to check whether the data I'm extracting looks correct or not, so I'll do this change only when #8 is done.

from minecraft-data.

rom1504 avatar rom1504 commented on July 22, 2024

I'm not entirely sure we should get rid of indexing in the end.
The fact that it makes the diff easier to read is really useful (see 2655321 for example)
It might be possible to define a standard way to sort the blocks/items/recipes enums so that the diff is still useful but that would mean adding that sorting to all extractors when stringify currently does that sorting automatically.

from minecraft-data.

rom1504 avatar rom1504 commented on July 22, 2024

If we keep the indexing, maybe also index variations by metadata.

from minecraft-data.

Gjum avatar Gjum commented on July 22, 2024

When we start indexing everything by ID and metadata, we also should do it with recipes.json. Although there it would also involve drastic changes in the format because of multiple recipes per item (same ID and metadata).

from minecraft-data.

rom1504 avatar rom1504 commented on July 22, 2024

Well if we want to index recipes by id+metadata we could just index by something like "1:1" for stone with metadata=1.

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.