This commit is contained in:
Shiroyasha 2025-09-14 20:52:18 +03:00
commit d8d0e9d536
Signed by: shiroyashik
GPG key ID: E4953D3940D7860A
2567 changed files with 167778 additions and 0 deletions

View file

@ -0,0 +1,103 @@
/*
* This JavaScript file can be used to initialize your own solar panels.
* First off, all methods have return types (they are specified after the "=>")
* How-to: (or watch the tutorial https://youtu.be/WVr6-3E7lA8 ;3)
* 1. To create a new panel, you need to make a builder, call panel()=>SolarPanelBuilder to begin the builder chain.
* 2. Chain elements:
* - .name("yourname")=>SolarPanelBuilder // mandatory
* - .height(float)=>SolarPanelBuilder // optional, float value is between [0;1]
* - .generation("amount")=>SolarPanelBuilder // mandatory, pass the number as a string
* - .capacity("amount")=>SolarPanelBuilder // mandatory, pass the number as a string
* - .transfer("amount")=>SolarPanelBuilder // mandatory, pass the number as a string
* 3. At the end of the chain, call .build()=>SolarPanel (alternatively, .buildAndRegister()=>SolarPanel, to skip step #5)
* 4. Languages: call after build chain end (operate on panel), start language chain with .langBuilder()=>LanguageBuilder
* - .put("en_us", "Your Solar Panel Name")=>LanguageBuilder
* After that, call as many lang assigns as you want:
* - .put("lang", "Your Solar Panel Name")=>LanguageBuilder
* End chain with .build()=>SolarPanel
* 5. Recipes: call after build chain end (operate on panel), start recipe chain with .recipeBuilder()=>RecipeBuilder
* - .shape(string...)=>RecipeBuilder // Specify the needed string amount (1 string = 1 row)
* After you specified the recipe shape, bind all ingredients:
* - .bind('c', item("modid", "item_name"))=>RecipeBuilder
* End chain with .build(AMOUNT)=>SolarPanel // AMOUNT is the int value (0;64] of items in the recipe output, if omitted, will be defaulted to 1.
* 6. To register the panel, append .register()=>SolarPanel after ending the chain.
* 7. Texturing: (all textures are stored in "textures" folder)
* "yourname_base.png", optionally with "yourname_base.mcmeta" (for animations)
* "yourname_top.png", optionally with "yourname_top.mcmeta" (for animations)
*
* Additional methods & features:
* - isModLoaded("modid")=>boolean // returns if the specified mod is loaded. Could be useful for setting up mod-dependent solar panels.
* - you can have a line "import path.to.Class;" to avoid using Java.type("path.to.Class") stuff. Created outside of any functions, declares a new variable with the simple class name.
* - you can have a line "define a_key !value!" to make the compiler replace all a_key with !value! at runtime.
*/
// define english "en_us"
/** This function is called when mod is being constructed */
function init()
{
/*Monifactory Custom solars*/
// Bathyal
panel()
.name('bathyal')
.height(0.5)
.generation(32768)
.capacity(1200000)
.transfer(300000)
.build()
.langBuilder()
.put("en_us", "Bathyal Solar Panel")
.build()
.register()
// Abyssal
panel()
.name('abyssal')
.height(0.5)
.generation(131072)
.capacity(4000000)
.transfer(1000000)
.build()
.langBuilder()
.put("en_us", "Abyssal Solar Panel")
.build()
.register()
// Hadal
panel()
.name('hadal')
.height(0.5)
.generation(524288)
.capacity(12000000)
.transfer(3000000)
.build()
.langBuilder()
.put("en_us", "Hadal Solar Panel")
.build()
.register()
// Neutronium
panel()
.name("neutronium")
.generation(2500000)
.capacity(200000000)
.transfer(50000000)
.build()
.langBuilder()
.put("en_us", "Neutronium Solar Panel")
.build()
.register()
// Infinity
panel()
.name("infinity")
.generation(99999999)
.capacity(999999999)
.transfer(999999999)
.build()
.langBuilder()
.put("en_us", "Infinity Solar Panel")
.build()
.register()
}

32
config/solarflux/main.cfg Normal file
View file

@ -0,0 +1,32 @@
[CFG=1.0.0]
C "Main"={
/* Should HammerLib display tooltips on the solar panels if no tooltip engine providers exist? */
B "Enable HammerLib Tooltips"=true
/* How much energy (percent) will get lost while picking up the solar panel? (Range: [0.0; 100.0]) */
D "Pickup Energy Loss"=5.0
/* How much energy should be generated when it is raining? 0 - nothing, 1 - full power. (Range: [0.0; 1.0]) */
D "Rain Multiplier"=0.3
/* How much energy should be generated when it is thundering? 0 - nothing, 1 - full power. (Range: [0.0; 1.0]) */
D "Thunder Multiplier"=0.1
}
C "Upgrades"={
/* How far should the Block Charging Upgrade reach? (Range: (0.0; +)) */
D "Block Charging Upgrade Range"=16.0
/* How much should each capacity upgrade add, in percent? (Range: [0.0; 100.0]) */
D "Capacity Upgrade Bonus"=10.0
/* How much should each efficiency upgrade add, in percent? (Range: [0.0; 100.0]) */
D "Efficiency Upgrade Bonus"=5.0
/* How much should each transfer rate upgrade add, in percent? (Range: [0.0; 100.0]) */
D "Transfer Rate Upgrade Bonus"=15.0
/* How far should the Traversal Upgrade reach? (Range: [0; 16)) */
I "Traversal Upgrade Range"=5
}

187
config/solarflux/panels.cfg Normal file
View file

@ -0,0 +1,187 @@
[CFG=1.0.0]
C "Solar Flux"={
C "1"={
/* How much FE does this solar panel store? (Range: [1; 9223372036854775807]) */
I "Capacity"=200
/* How much FE does this solar panel produce per tick? (Range: [1; 9223372036854775807]) */
I "Generation Rate"=1
/* How high is this solar panel? (Range: [0.0; 16.0)) */
D "Height"=6.0
/* How much FE does this solar panel emit to other block, per tick? (Range: [1; 9223372036854775807]) */
I "Transfer Rate"=50
}
C "2"={
/* How much FE does this solar panel store? (Range: [1; 9223372036854775807]) */
I "Capacity"=400
/* How much FE does this solar panel produce per tick? (Range: [1; 9223372036854775807]) */
I "Generation Rate"=2
/* How high is this solar panel? (Range: [0.0; 16.0)) */
D "Height"=6.0
/* How much FE does this solar panel emit to other block, per tick? (Range: [1; 9223372036854775807]) */
I "Transfer Rate"=100
}
C "3"={
/* How much FE does this solar panel store? (Range: [1; 9223372036854775807]) */
I "Capacity"=1200
/* How much FE does this solar panel produce per tick? (Range: [1; 9223372036854775807]) */
I "Generation Rate"=8
/* How high is this solar panel? (Range: [0.0; 16.0)) */
D "Height"=6.0
/* How much FE does this solar panel emit to other block, per tick? (Range: [1; 9223372036854775807]) */
I "Transfer Rate"=300
}
C "4"={
/* How much FE does this solar panel store? (Range: [1; 9223372036854775807]) */
I "Capacity"=4000
/* How much FE does this solar panel produce per tick? (Range: [1; 9223372036854775807]) */
I "Generation Rate"=32
/* How high is this solar panel? (Range: [0.0; 16.0)) */
D "Height"=6.0
/* How much FE does this solar panel emit to other block, per tick? (Range: [1; 9223372036854775807]) */
I "Transfer Rate"=1000
}
C "5"={
/* How much FE does this solar panel store? (Range: [1; 9223372036854775807]) */
I "Capacity"=12000
/* How much FE does this solar panel produce per tick? (Range: [1; 9223372036854775807]) */
I "Generation Rate"=128
/* How high is this solar panel? (Range: [0.0; 16.0)) */
D "Height"=6.0
/* How much FE does this solar panel emit to other block, per tick? (Range: [1; 9223372036854775807]) */
I "Transfer Rate"=3000
}
C "6"={
/* How much FE does this solar panel store? (Range: [1; 9223372036854775807]) */
I "Capacity"=40000
/* How much FE does this solar panel produce per tick? (Range: [1; 9223372036854775807]) */
I "Generation Rate"=512
/* How high is this solar panel? (Range: [0.0; 16.0)) */
D "Height"=6.0
/* How much FE does this solar panel emit to other block, per tick? (Range: [1; 9223372036854775807]) */
I "Transfer Rate"=10000
}
C "7"={
/* How much FE does this solar panel store? (Range: [1; 9223372036854775807]) */
I "Capacity"=120000
/* How much FE does this solar panel produce per tick? (Range: [1; 9223372036854775807]) */
I "Generation Rate"=2048
/* How high is this solar panel? (Range: [0.0; 16.0)) */
D "Height"=6.0
/* How much FE does this solar panel emit to other block, per tick? (Range: [1; 9223372036854775807]) */
I "Transfer Rate"=30000
}
C "8"={
/* How much FE does this solar panel store? (Range: [1; 9223372036854775807]) */
I "Capacity"=400000
/* How much FE does this solar panel produce per tick? (Range: [1; 9223372036854775807]) */
I "Generation Rate"=8192
/* How high is this solar panel? (Range: [0.0; 16.0)) */
D "Height"=6.0
/* How much FE does this solar panel emit to other block, per tick? (Range: [1; 9223372036854775807]) */
I "Transfer Rate"=100000
}
}
C "Solar Flux: Custom"={
C "custom_abyssal"={
/* How much FE does this solar panel store? (Range: [1; 9223372036854775807]) */
I "Capacity"=4000000
/* How much FE does this solar panel produce per tick? (Range: [1; 9223372036854775807]) */
I "Generation Rate"=131072
/* How high is this solar panel? (Range: [0.0; 16.0)) */
D "Height"=8.0
/* How much FE does this solar panel emit to other block, per tick? (Range: [1; 9223372036854775807]) */
I "Transfer Rate"=1000000
}
C "custom_bathyal"={
/* How much FE does this solar panel store? (Range: [1; 9223372036854775807]) */
I "Capacity"=1200000
/* How much FE does this solar panel produce per tick? (Range: [1; 9223372036854775807]) */
I "Generation Rate"=32768
/* How high is this solar panel? (Range: [0.0; 16.0)) */
D "Height"=8.0
/* How much FE does this solar panel emit to other block, per tick? (Range: [1; 9223372036854775807]) */
I "Transfer Rate"=300000
}
C "custom_hadal"={
/* How much FE does this solar panel store? (Range: [1; 9223372036854775807]) */
I "Capacity"=12000000
/* How much FE does this solar panel produce per tick? (Range: [1; 9223372036854775807]) */
I "Generation Rate"=524288
/* How high is this solar panel? (Range: [0.0; 16.0)) */
D "Height"=8.0
/* How much FE does this solar panel emit to other block, per tick? (Range: [1; 9223372036854775807]) */
I "Transfer Rate"=3000000
}
C "custom_infinity"={
/* How much FE does this solar panel store? (Range: [1; 9223372036854775807]) */
I "Capacity"=999999999
/* How much FE does this solar panel produce per tick? (Range: [1; 9223372036854775807]) */
I "Generation Rate"=99999999
/* How high is this solar panel? (Range: [0.0; 16.0)) */
D "Height"=6.0
/* How much FE does this solar panel emit to other block, per tick? (Range: [1; 9223372036854775807]) */
I "Transfer Rate"=999999999
}
C "custom_neutronium"={
/* How much FE does this solar panel store? (Range: [1; 9223372036854775807]) */
I "Capacity"=200000000
/* How much FE does this solar panel produce per tick? (Range: [1; 9223372036854775807]) */
I "Generation Rate"=2500000
/* How high is this solar panel? (Range: [0.0; 16.0)) */
D "Height"=6.0
/* How much FE does this solar panel emit to other block, per tick? (Range: [1; 9223372036854775807]) */
I "Transfer Rate"=50000000
}
}

View file

@ -0,0 +1,99 @@
[CFG=1.0.0]
C "recipes"={
/* Enable this recipe? */
B "solarflux:ae2/energy_upgrade"=false
/* Enable this recipe? */
B "solarflux:blank_upgrade"=false
/* Enable this recipe? */
B "solarflux:blazing_coating"=false
/* Enable this recipe? */
B "solarflux:block_charging_upgrade"=false
/* Enable this recipe? */
B "solarflux:capacity_upgrade"=false
/* Enable this recipe? */
B "solarflux:dispersive_upgrade"=false
/* Enable this recipe? */
B "solarflux:efficiency_upgrade"=false
/* Enable this recipe? */
B "solarflux:emerald_glass"=false
/* Enable this recipe? */
B "solarflux:ender_glass"=false
/* Enable this recipe? */
B "solarflux:furnace_upgrade"=false
/* Enable this recipe? */
B "solarflux:mirror"=false
/* Enable this recipe? */
B "solarflux:photovoltaic_cell_1"=false
/* Enable this recipe? */
B "solarflux:photovoltaic_cell_2"=false
/* Enable this recipe? */
B "solarflux:photovoltaic_cell_3"=false
/* Enable this recipe? */
B "solarflux:photovoltaic_cell_4"=false
/* Enable this recipe? */
B "solarflux:photovoltaic_cell_5"=false
/* Enable this recipe? */
B "solarflux:photovoltaic_cell_6"=false
/* Enable this recipe? */
B "solarflux:solar_panel_1"=false
/* Enable this recipe? */
B "solarflux:solar_panel_2"=false
/* Enable this recipe? */
B "solarflux:solar_panel_3"=false
/* Enable this recipe? */
B "solarflux:solar_panel_4"=false
/* Enable this recipe? */
B "solarflux:solar_panel_5"=false
/* Enable this recipe? */
B "solarflux:solar_panel_6"=false
/* Enable this recipe? */
B "solarflux:solar_panel_7"=false
/* Enable this recipe? */
B "solarflux:solar_panel_8"=false
/* Enable this recipe? */
B "solarflux:solar_panels/avaritia/infinity"=false
/* Enable this recipe? */
B "solarflux:solar_panels/avaritia/neutronium"=false
/* Enable this recipe? */
B "solarflux:solar_panels/kubejs/abyssal"=false
/* Enable this recipe? */
B "solarflux:solar_panels/kubejs/kubejs"=false
/* Enable this recipe? */
B "solarflux:solar_panels/kubejs/echo"=false
/* Enable this recipe? */
B "solarflux:transfer_rate_upgrade"=false
/* Enable this recipe? */
B "solarflux:traversal_upgrade"=false
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 B

View file

@ -0,0 +1,6 @@
{
"animation": {
"frametime": 20,
"interpolate": true
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 B

View file

@ -0,0 +1,6 @@
{
"animation": {
"frametime": 20,
"interpolate": true
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 514 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

View file

@ -0,0 +1,6 @@
{
"animation": {
"frametime": 20,
"interpolate": true
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View file

@ -0,0 +1,24 @@
{
"animation": {
"interpolate": true,
"frametime": 5,
"frames": [
{"index": 0, "time": 15},
{"index": 1, "time": 15},
{"index": 2, "time": 15},
{"index": 3, "time": 10},
{"index": 4, "time": 10},
5,
6,
7,
8,
7,
6,
5,
{"index": 4, "time": 10},
{"index": 3, "time": 10},
{"index": 2, "time": 15},
{"index": 1, "time": 15}
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6 KiB

View file

@ -0,0 +1,24 @@
{
"animation": {
"interpolate": true,
"frametime": 5,
"frames": [
{"index": 0, "time": 15},
{"index": 1, "time": 15},
{"index": 2, "time": 15},
{"index": 3, "time": 10},
{"index": 4, "time": 10},
5,
6,
7,
8,
7,
6,
5,
{"index": 4, "time": 10},
{"index": 3, "time": 10},
{"index": 2, "time": 15},
{"index": 1, "time": 15}
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 535 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 B