Giter Site home page Giter Site logo

liplum / multicrafterlib Goto Github PK

View Code? Open in Web Editor NEW
38.0 3.0 10.0 1.89 MB

A Mindustry mod library provides a multiple-recipe crafter to produce items, fluids, power or even heat for Json and JavaScript mods.

Home Page: https://liplum.github.io/MultiCrafterLib/

License: GNU General Public License v3.0

Java 94.04% Kotlin 1.37% JavaScript 2.35% HTML 0.84% Batchfile 0.73% Shell 0.67%
mindustry mindustry-mod mindustry-mod-v7 multilib multicraft

multicrafterlib's People

Contributors

chrono-heritage avatar eschatologue avatar fredyjabe avatar jojofr1 avatar kirillrum avatar liplum avatar otamamori917 avatar slotterleet avatar stieno3000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

multicrafterlib's Issues

[Docs] Troubleshooting

Provide users information and detailed guide on how to fix some issues, warnings and errors, that they might encounter.

Parser issues

When implementing the parser with support for payloads multiple issue occurred.

The items, fluids and now payloads are not correctly parsed and are not showing or is making the recipe empty even though the syntax should be correct.
Power and heat is correctly shown and produced for most recipes.
Multiple of the values are empty when logged.

Steps to reproduce:

  • Build the latest version of the mod (no payloads support yet) and import it in-game
  • Build the jsproject and import it in-game

Multicrafter refuses to input power from batteries

image

the crafter here should be taking power from the batteries but it isn't for some reason (they are indeed fully charged and connected). it takes power directly from generators though.
also this is using the mod as a library (separate mod not injected) in case that helps.

Shell script to help users to zip Injection

Proposal

Many users tend to inject the MultiCrafter and keep their mod standalone, without adding MultiCrafterLib as a dependency. But not everyone is a computer expert. So it is necessary to write shell scripts to help them.

Supported platforms

  • Windows: bat
  • Unix-like: sh

[v2.0.0] To-do

If you encounter any bug, please open a new issue with as much details as possible.
If you have any ideas (really, anything you may have), feel free to comment.

  • MultiCrafter Block
    • Supports payloads
      • UI
        • Stats UI
        • Bars UI
          • How should this be implemented? There's no vanilla example as far as I know (only for units but we're talking about Payloads in general)
      • Consume payloads
      • Output payloads
        • Outputs indefinitely the first payload, timer didn't solve the issue (it actually always return false)
      • Fix save corruption (happen when reading save with payloads output)
        • Either he can't save/read the commandPos or the payloads
      • Parser support (JSON)
        • Payloads input doesn't consume
    • Codebase rewrite
      • Nullary constructor only (e.g. IOEntry() {{}})
      • Rewrite MultiCrafterParser
        • Register warnings/error
        • Give more detailed error to user
        • Allow user more freedom (e.g. empty input/ouput)
        • Instead of logging block loaded, log the information more globally to the modd [mod-name] X loaded with X warning and X error
      • Use Stack[] instead of Seq<Stack>
    • Fix bugs
  • Better documentation

    • Users (especially JSON) seem to struggle with how to make a simple MultiCrafter or how it works (based on Mindustry Discord research)
  • #29

  • Injection Update script?
    • Bash/Batch: Not universal, hard on Windows
    • Python: Universal, but not everyone might have it.
    • Java/Kotlin: Universal, but not everyone might have it and user can encounter issue.

This issue will be constantly updated with updated status and/or new ideas.

Personal ideas:

  • Support Attributes
  • Support Boost
  • Make Recipe an UnlockableContent. Will make it able to be locked behind a tech tree node and need to be researched. Unlocked by default.
  • Better bars, synced with the current recipe, show all the liquids in the block (like the items?), same for payloads. Differentiate input and output heat/power
  • Add a required value to the mod.json to specify which version of the library the mod uses
    • This is technically only for dependency mods but other mods that use injection/jitpack may also conflict due to possibly being loaded first (also another issues, it uses the first loaded instance of MultiCrafter and not the one included in the mod/dependency)

The Crafter cannot output power

image
These are my Multi Crafter with power generation, as shown in the screenshot, the crafters do not output the power, it seems just store it. Is it a bug or am I just do something wrong?

[Docs] Migration Guide

Since the v2.x.y will bring huge changes, a migration guide is required to help users migrate from the v1.x.y to the v2.x.y

Bars are not synced with the current recipe

Bars of a block is based on all the recipe (e.g. if one recipe has power then for all recipes the power bar appears).

How to reproduce:

  1. get a block with at least 2 recipes
  2. and well see by yourself

Same input/output stop crafter

If a recipe that has the same items in both input and output, when the crafter is full of items, it will stop working.

How to reproduce:

  1. Run :java:runClient gradle task.
  2. Build with this schematic:
bXNjaAF4nDVOQW7DIBCcYLAdRVGavqBSzxz6hp77gqoHYm8iIgwuBld9fbpgVaOdgWF3FuzRNZDeTITnj+ySfY/mmii+XPLt9Q2HkZYh2jnZ4AG0zlzILRCfXz0ONtGkl5DjQDgnm4y3edJD8Cv9hojz3axGVxq2UBzn7BYqLWO2CUdnv7Md/zOe5vBDUfswknYm3gina+AHPcdwpyFx5r7uXIMd+TcnLghVeMcQqMQi0EDsqt1sKCQ3UWj4hFZJ7lPsohePRx2UPCC3HFWkZchyazezK9KhL/IHF/I/1g==
  1. Switch to the first recipe which has copper.

new Jitpack release

I need heat support so I checked IOEntry code and I found that there's heat support on github's master branch but not on jitpack release v1.7
so I suggest new jitpack release that includes latest change on github master branch

[Java]Jitpack dependency not found.

Looking for pom.xml in build directory and ~/.m2
Found artifact: net.liplum:standalone:1.0
Found artifact: net.liplum:MultiCrafter:1.0
Found artifact: net.liplum:main:1.0
Found artifact: net.liplum:js:1.0
Found artifact: net.liplum:lib:1.0
2022-07-06T04:37:25.375111491Z
Exit code: 0

⚠️ ERROR: No build artifacts found
Expected artifacts in: $HOME/.m2/repository/net/liplum/js/1.0

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.