Giter Club home page Giter Club logo

json-generator's Introduction

JSON-Generator

Easy-to-use generator to make the JSON files primarily for mods, but also can be used for resource packs.

A full rewrite is in progress for this app, to improve many of its issues.

If you find any issues, report them on the github here, and Deviouslrd will attend to it!

Local Development Fork

To edit this generator for your own purposes, theres just a couple steps.

  1. Clone the repo to a local folder (easy to do with the github desktop app, or via cli)
  2. Open the repo in your favourite code editor, and open a terminal of sorts.
  3. Run npm i to install all the dependencies and to acquire the node modules required to run it.
  4. When that is finished, run npm start or npm run start to run the program.
  5. Enjoy the chaos that is the JSON generator. (I'm not kidding)

Credits:

json-generator's People

Contributors

deviouslrd avatar fnige avatar siuolplex avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

json-generator's Issues

[SUGGESTION] Dynamic box sizes

Is your feature request related to a problem? Please describe.

See if input box length can be changed based off the value it has.
Otherwise just expand the box lengths.

[SUGGESTION] Upgrade CSS and HTML format

Is your feature request related to a problem? Please describe.

Self-explanatory, I want the appearance to be vastly improved before release 1.0. It looks fine right now, but will need improvement before its truly released.

How? I'm not sure yet. Feel free to send example pictures in this issue if you've done some tinkering.
If you want to tinker, just open up the chrome console (ctrl+shift+i) and modify the page as needed.

[SUGGESTION] More tests for inputs

Is your feature request related to a problem? Please describe.

Just like bricks will get sliced to brick for slabs, stairs, walls, etc., do something for pillars, if it has pillar then cut it off so that the file name and files aren't broken. Comment for other stuff that could follow suit as well.

[SUGGESTION] When the generator fails to generate, make it clear it didnt

Description

Long title, but if it fails to generate something, utilize the error text box to say "An error occurred. See the console for details." or put beginning of the error into the text box.

Method of achieving this

Detect when it throws an error, maybe via try/catch system to get the error detected.

[SUGGESTION] Help page

Is your feature request related to a problem? Please describe.

As much as I have tried to make this easy to use, its not super simple. A help page or docs of sorts is required.

Describe the solution you'd like

Can be done with a new browser window in the menu toolbar. Contains suggestions on what folder to save to, based on your needs, specific help for how to use it. Put a button on the homepage for it as well.

[SUGGESTION] more options with blockstates

Description

blockstate gen should have additional options for custom values

Method of achieving this

allow for adding a custom property for blockstates and generate one for every possibility.
ex. specify 2 integer values and one boolean.
output file would look something like this:

{
  "variants": {
    "param1=0,param2=0,param3=false": {
      "model": "<your model here>"
    },
    "param1=1,param2=0,param3=false": {
      "model": "<your model here>"
    }
    "param1=2,param2=0,param3=false": {
      "model": "<your model here>"
    }
}

etc.

Icon

Icon is needed at some point.
Maybe a hammer or something, idk.

--icon=[path of icon here], requires this in teh build script for the icon

[SUGGESTION] File path support for resource packs and data packs.

Is your feature request related to a problem? Please describe.

The structure for data packs and resource packs is not usable as the current file structure mechanism is mod-only.
WHile this is useful for consistency+ / mod devs, it can't be used for resource packs or data packs.

Either make a radio button setting for the file format you want, or keep it as is and only for mods.
Please give thoughts on this.

[SUGGESTION] Allow ability to get "stonecutting" and "from_stonecutting" recipies.

As an example, I can use the generator to make a stonecutter recipe for my cut red sandstone wall and stair using either cut red sandstone or red sandstone, but not both at the same time.
image
image

In this given example, I can only use the generator to either have cut red sandstone give me the recipe, or red sandstone, but not both. (This functionality is vanilla to default sandstone with you being able to use sandstone and cut sandstone to get a cut sandstone slab)

[SUGGESTION] Modular system sort of ish

Description

Definitely not well planned out, but here goes.
A standardized system for adding whatever other json files you want generated to be added with ease.

The chance this works is low, but its a great idea if i do successfully follow through

At least i think so

Method of achieving this

Code magic or smth idk

[SUGGESTION] More check boxes for common 'Block' variants

This could maybe be a sub category of the block check box where you could choose if you wanted different variants and their respective stairs/walls/slabs.

This would include things like:

  • cut_[block] (EX: cut_sandstone)
  • [block]_block (EX: diamond_block)
  • [block]_brick (EX: stone_brick)
  • polished_[block] (EX: polished_granite)

[BUG] Advancements

Describe the bug

Mod name is not turned into proper format, creates new folder structure.
Then even then it doesnt write any file.

Expected behavior

Proper folder structure, for it to actually write hte file lol

[SUGGESTION] Merger of Recipes and Advancements

Description

I think that advancements should be merged into recipes, this would allow the advancements to actually be useful and help with the recipes.

Method of achieving this

Generate the advancements alongside the recipes.

[SUGGESTION] Template generator

Is your feature request related to a problem? Please describe.

Add a checkbox on every page to generate a template file, for custom editing beyond the given ones.

All the files

An all-in-one generator tab, creates all the json files. Tons of inputs, creates all the other tabs in one click. All input boxes need seperate localstorage functionality (add that to the other boxes in the tabs which require more than mod name and block name)

[SUGGESTION] Save Checkbox data between pages

Is your feature request related to a problem? Please describe.

For efficiency, save the checkbox values between pages so you can quickly generate the new set of files.

Describe the solution you'd like

Save value, probably a number which the onload function would read + tick the boxes based off the value.

[SUGGESTION] Empty Box error

Description

This ensures all the boxes are full, to prevent broken recipes and the like.

Method of achieving this

Detect empty boxes inside the generator, and if a box is empty, throw an error and not generate the file.

[SUGGESTION] Stonecutter improvements

(All from Siuolthepic)

  1. Its slow, as you have to semi-manually generate slabs, stairs, walls, and pillars for each variant.
  2. Texture namespace is used for both variables in the json creation, as such you cant have multiple variables per.
  3. Tags are not supported, which for things such as stone bricks or the alike, is very annoying.

SOLUTIONS:

  1. Bigger box, some sort of checkbox system or preset system to automiatcally create json files for the core blocks.
  2. Set the result to be modName, change texture namespace box to be item namespace instead, additionally create new localStorage entry for that too.
  3. Some sort of tag support, see https://discord.com/channels/789668409875890227/797144492158746674/802761042744311869

Use local storage to save stuff between pages

Self-explanatory, use the local storage function of JS/electron to save the inputs between the different pages, so it doesn't get lost between pages.
Same functionality is used for saving the filepath, make the value for the save location display the localStorage.path variable instead of awaiting the showOpenDialog promise from running to put it in there.

If you dont know what im talking about, just ignore this lolololol

[SUGGESTION] Multi-face Texture support

Is your feature request related to a problem? Please describe.

Allow the use of different textures on each side. Will make a lot more boxes and stuff, probably gotta use javascript to create and remove the boxes depending on the radio button selected.

Gonna be difficult, especially with the dynamic box part.

[SUGGESTION] Undo-type feature

Is your feature request related to a problem? Please describe.

If you accidentally have the wrong filepath, then you can quickly undo the file creation (i.e. delete it). Totally not bc i just did that.

Describe the solution you'd like

See above

Describe alternatives you've considered

Save alternate filepath for advancements/loot tables/recipes

[SUGGESTION] More advancement functionality

Description

Primarily just add regular gameplay advancements, or more examples for other events. Examine vanilla's method, compare to the recipe version.

Method of achieving this

Add a radio selection between recipe advancement and gameplay advancement.

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.