GithubHelp home page GithubHelp logo

jcw87 / infinitecraftwiki Goto Github PK

View Code? Open in Web Editor NEW

This project forked from expitau/infinitecraftwiki

0.0 0.0 0.0 391.45 MB

A crafting guide for neal.fun's infinite craft

JavaScript 28.09% CSS 8.14% HTML 63.77%

infinitecraftwiki's Introduction

InfiniteCraftWiki

This is a webpage that provides a guide on how to craft various items in neal.fun's Infinite Craft.

Visit the live site to see it in action!

Importing Save Files

This site has support for importing your crafted elements from Infinite Craft. To do this, go to https://neal.fun/infinite-craft/, right click -> Inspect element -> Console, and paste the following code:

fetch("https://raw.githubusercontent.com/expitau/InfiniteCraftWiki/main/web/data/index.json").then(res => res.json()).then(data => { index = Object.fromEntries(Object.entries(data).map(x => [x[1][1], x[0]])); window.location.href = `https://expitau.github.io/InfiniteCraftWiki?s=${JSON.parse(localStorage.getItem('infinite-craft-data')).elements.map(a => index[a.text]).filter(x => x).join(",")}` })

This will automatically redirect after a few seconds and load your data.

Developers

Data Format

The data is stored in a JSON file, with two keys "index" and "data". The "index" has a list of base64 values mapping to elements. The "data" is a string of semicolon-separated recipes, where each recipe is a comma-separated list of elements. The first 2 elements in the recipe are the ingredients, and the last is the result. The actual elements can be looked up in the index, which stores the icon, the name of the element, and the "cost", which is the smallest number of elements needed to create it.

Example Data

{
    "index": {
        "B": ["๐Ÿ”ฅ","Fire",1],
        "C": ["๐ŸŒ","Earth",1],
        "D": ["๐ŸŒฌ๏ธ","Wind",1],
        "E": ["๐ŸŒซ๏ธ","Dust",2],
        "F": ["๐ŸŒ‹","Lava",2],
        "G": ["๐ŸŒ‹","Volcano",2]
    },
    "data": "D,C,E;B,C,F;B,B,G"
}

(This corresponds to three recipes, Wind + Earth = Dust, Fire + Earth = Lava, and Fire + Fire = Volcano. The costs are the minimal costs for each item.)

See data.json for the current data, and the bottom of index.html for a way to parse it into a dictionary of recipes and backlinks.

Acknowledgements

infinitecraftwiki's People

Contributors

expitau avatar reumarks avatar

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.