Git Product home page Git Product logo

3snake3 / multi-lib Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 1.0 28 KB

Archived. Because outdated in 7.136. The updated version of multi-lib.js for 7.135 crafters. I didn't create this library, the original author: younggam/multi-lib, I just updated the code, because at the moment author cannot update this mod.

License: GNU General Public License v3.0

JavaScript 100.00%
mindustry-mod mindustry-mod-v7

multi-lib's People

Contributors

3snake3 avatar zelaux avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

zelaux

multi-lib's Issues

Game crash when open multi crafter block

i used the code

const multiLib=require("multi-lib/library");
//you can use GenericSmelter instead GenericCrafter
//also GenericSmelter.SmelterBuild instead GenericCrafter.GenericCrafterBuild
// ▼this has to be same with .json file name
//
const multi=multiLib.MultiCrafter(GenericCrafter,GenericCrafter.GenericCrafterBuild,"ammo-fac",[
/default form for each recipes. You can change values.
{
input:{
items:[], Modded Item: "mod-name-item-name/amount", Vanilla Item: "item-name/amount"
liquids:[], Modded Liquid: "mod-name-liquid-name/amount", Vanilla liquid: "liquid-name/amount"
power:0,
},
output:{
items:[],
liquids:[],
power:0,
},
craftTime:80,
},
/
{//1 you can skip recipe properties
output:{
power:5.25
},
craftTime:12
},
{//2
input:{
items:["coal/1","sand/1"],
liquids:["water/5"],
power:1
},
output:{
items:["thorium/1","surge-alloy/2"],
liquids:["slag/5"],
},
craftTime:60
},
{//3
input:{
items:["pyratite/1","blast-compound/1"],
liquids:["water/5"],
power:1
},
output:{
items:["scrap/1","plastanium/2","spore-pod/2"],
liquids:["oil/5"],
},
craftTime:72
},
{//4
input:{
items:["sand/1"],
},
output:{
items:["silicon/1"],
},
craftTime:30
},
],{
/you can customize block here. ex) load()/
},
/this is Object constructor. This way is much better than literal way{a:123}
you can replace this with {} if you don't want to modify entity
/
function Extra(){
/you can use customUpdate=function(){}. this function excuted before update()
also this.draw=function(){}
you can customize entity here.
ex)
this._myProp=0;
this.getMyProp=function(){
return this._myProp;
};
this.setMyProp=function(a){
this._myProp=a;
};
/
});

hjson file

name: Assembler
description: "Make ammo"
size: 3
itemCapacity: 40
liquidCapacity: 50
health: 750
requirements:
[
copper/350
titanium/150
tungsten/120
steel/200
graphite/90
]
category: crafting

then the game crash when i open the block description

Mindustry has crashed. How unfortunate.
Version: pre-alpha build 131
OS: Linux xnull (aarch64)
Java Version: 0
2 Mods: industrial:0.2.4.5, multi-lib:1.0.7

EcmaError: 'ReferenceError: "NumberValue" is not defined. (library#607)'
ScriptRuntime.constructError: 3741
ScriptRuntime.constructError: 3721
ScriptRuntime.notFoundError: 3798
ScriptRuntime.nameOrFunction: 1717
ScriptRuntime.name: 1671
library_10._c_anonymous_66: 607
library_10.call: 478
ArrowFunction.call: 33
InterfaceAdapter.invokeImpl: 141
InterfaceAdapter.lambda$invoke$0: 92
InterfaceAdapter.$r8$lambda$eCbvUJKud9uRuKkOr-KOpaMfYY8: 0
InterfaceAdapter$$ExternalSyntheticLambda0.run: 13
Context.call: 450
ContextFactory.call: 428
InterfaceAdapter.invoke: 92
VMBridge.lambda$newInterfaceProxy$0: 142
VMBridge.$r8$lambda$2rbCXLLvnIIB7GRsWozxBZ9kMPs: 0
VMBridge$$ExternalSyntheticLambda0.invoke: 11
Proxy.invoke: 1006
$Proxy4.get: -1
Table.table: 264
MemberBox.invoke: 104
NativeJavaMethod.call: 205
OptRuntime.call1: 23
library_10._c_anonymous_60: 604
library_10.call: 436
ArrowFunction.call: 33
InterfaceAdapter.invokeImpl: 141
InterfaceAdapter.lambda$invoke$0: 92
InterfaceAdapter.$r8$lambda$eCbvUJKud9uRuKkOr-KOpaMfYY8: 0
InterfaceAdapter$$ExternalSyntheticLambda0.run: 13
Context.call: 450
ContextFactory.call: 428
InterfaceAdapter.invoke: 92
VMBridge.lambda$newInterfaceProxy$0: 142
VMBridge.$r8$lambda$2rbCXLLvnIIB7GRsWozxBZ9kMPs: 0
VMBridge$$ExternalSyntheticLambda0.invoke: 11
Proxy.invoke: 1006
$Proxy4.get: -1
Table.table: 275
Table.table: 269
MemberBox.invoke: 104
NativeJavaMethod.call: 205
OptRuntime.call2: 32
library_10._c_anonymous_59: 615
library_10.call: 429
ContextFactory.doTopCall: 328
ScriptRuntime.doTopCall: 3114
library_10.call: 18
ArrowFunction.call: 33
InterfaceAdapter.invokeImpl: 141
InterfaceAdapter.lambda$invoke$0: 92
InterfaceAdapter.$r8$lambda$eCbvUJKud9uRuKkOr-KOpaMfYY8: 0
InterfaceAdapter$$ExternalSyntheticLambda0.run: 13
Context.call: 450
ContextFactory.call: 428
InterfaceAdapter.invoke: 92
VMBridge.lambda$newInterfaceProxy$0: 142
VMBridge.$r8$lambda$2rbCXLLvnIIB7GRsWozxBZ9kMPs: 0
VMBridge$$ExternalSyntheticLambda0.invoke: 11
Proxy.invoke: 1006
$Proxy5.display: -1
ContentInfoDialog.lambda$show$1: 74
ContentInfoDialog.$r8$lambda$VXQeg-ZdglA4Q8Y84i2P3sjNz9k: 0
ContentInfoDialog$$ExternalSyntheticLambda1.get: 6
Table.table: 264
ContentInfoDialog.show: 69
PlacementFragment.lambda$build$14: 323
PlacementFragment.$r8$lambda$33ONcOBRRiF6dcfolH_8VbI1Gd8: 0
PlacementFragment$$ExternalSyntheticLambda36.run: 2
Element$9.changed: 968
ChangeListener.handle: 13
Element.notify: 162
Element.fire: 133
Button.setChecked: 106
Button$1.clicked: 92
ClickListener.touchUp: 77
InputListener.handle: 31
Scene.touchUp: 366
InputMultiplexer.touchUp: 136
AndroidInput.processEvents: 294
AndroidGraphics.onDrawFrame: 367
GLSurfaceView$GLThread.guardedRun: 1577
GLSurfaceView$GLThread.run: 1272

Problems, i guess

Screenshot_478
i receive this ^
when i use multi.configurable= false
move configurable to hjson file, receive the same thing
*i copy and put the libary file into my own mod

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.