Solar Flux Reborn

Solar Flux Reborn

33M Downloads

some solar panel aren't there

DrollestDuck88 opened this issue ยท 58 comments

commented

Hi,

I was playing in a hand made modpack (I made it my self) in 1.18.2 with the mod solar flux reborn and noticed that the draconic evolution's solar panel and avaritia's are not existing

I would like too have them (I could create them with cubejs but i don't know how to code in java or java script)

I don't want to wait until every mod in the pack is updated to 1.19.2 or hupper version

commented

Use builtin JS feature (see configs for more information).

commented

what is JS feature?

commented

case of the dumb. it is there but i can't open it
(is it because my game is opened?)

commented

Close the game. You are going to have restart anyway.

commented

config/solarflux/custom_panels.js

commented

is it in the win r menu?

i m in the mod config but i don't see it

commented

my game is closed but i cannot open the config (custom_panel)

commented

What kind of text editor are you using and why does it try to compile the JavaScript file?

commented

Script :
C:\User(me)\AppData\Roaming.minecaft\config\solarflux\custom_panels.js
Line : 34
Caract. : 8
Error : ';' expected
Code : 800A03EC
Source : Microsoft JScript compilation error
(I had to translate to english cause it was in french (yes i speak french))
I basicaly recreated the error message that it give me when i try to open it

commented

text editor ? you mean translator? it's google (yes i know it can be crap but i deal with what i have)
and for the javascript file i don't know

commented

Text editor.

commented

i downloaded the newest one

commented

even if i try something it give me the same error message

commented

Text editor.

i don't know what it is too

commented

Google "Notepad", or "Notepad++".

commented

wich version??

commented

. . .

commented

what do i do now?

commented

all i want to do is add them to my game
Is there the code i could just copy and paste? realy quick?
i won't make a modpack with this don't be affraid (or i will put the rights of every mods cause it's not my creation)

commented

what do i do now?

Hi there,

If you have Notepad++ installed onto your computer, you will want to head into your games config folder, click into the "Solar Flux" folder, and then right click "custom_panels.js" and choose "Open With", in here select Notepad++ and it should open the file.

Once this is opened, you should be able to create the data for the solar panels in here. If you have another version with the panels existing in, you should be able to copy/paste the data for the panels from one version to the other, I believe.

Once you have the data created, you should be able to save the file by pressing the "CTRL" and "S" buttons on your keyboard at the same time, then start up your game and if everything is done correct, these panels should be created!

If you run into further issues with this, can you send in a screenshot or copy of the custom_panels.js file that you have so that we can see if we can identify what may be going wrong?

commented

i doesn't let me open it
i just drag and drop
i just want to create them back (it's all i ask for)(pls)

commented

In that case, can you try right clicking on the file, click "Open With", and in the pop up window, select "Notepad++", you may need to select the dropdown menu to view more items in the list if it doesn't appear straight away

commented

That is very odd, the file should be able to be opened in Notepad++, to confirm, are you opening it by double clicking the file, or by right clicking and choosing "Open With"?

commented

i don't have any other version openned
and i left click (my bad it's twice(i tested)) and it does the message i created up in the conversation

commented

i can choose edit with it

commented

Hmm, if you click that, does it open up a window with a list of applications?

If so, it could be your PC is displaying it slightly differently, if you can choose Notepad++ to edit the file with, then that should work!

commented

Hmm, if you click that, does it open up a window with a list of applications?

If so, it could be your PC is displaying it slightly differently, if you can choose Notepad++ to edit the file with, then that should work!

no i don't think so it's more my way of describing it

commented

i openned it
but unfortunetely i don't have any other version of the mod i can open now

commented

Hm, alright, just to 100% verify that we're not getting any wires crossed here, can you confirm that you are following the process in this gif?

https://cdn.discordapp.com/attachments/543153093001347087/1082850455916388513/pOESk3ygxp.gif

commented

yes it's kind of the same thing

commented

so is there somewhere where i could find the code??

commented

With this file, as the panels aren't included by default any more, you would need to set up the code for the panels manually, there should be a video guide linked in the file explaining the process for doing this! ๐Ÿ˜„

commented

but with avaritia it's another level (how do i do that?)

commented

I'm not entirely sure I understand what you mean by that, would this be something in the Avaritia mod? If so, I'm not sure myself as it's been a few years since I've used that mod

commented

both of the mods are not in 1.19.2

im i gonna find the code anyway?? or is it just if the mod is loaded?

commented

im playing in 1.18.2 but the version where the solar panels (Draconic evolution and Avaritia) are is 1.19.2 or .3 but the other mods are not in this version of the game

commented

will i be able to find the code to just copy and paste or i will need to wait until the mods are updated?

commented

Ah, if the other mods aren't updated for the Minecraft version that you're using, then you wouldn't be able to use the aspects of those mods, as they'd be required for the recipes and such to function.

commented

how will i do to add the solar panel??

commented

Unfortunately, as I'd mentioned prior, if the mods that these panels are from aren't available for the Minecraft version you're using, you can't use these panels.

You could custom create equivalent panels with the custom_panels.js file, but you can't use these specific solar panels without the mods they are from.
For creating custom solar panels, if you want to do so, I would highly recommend following the video tutorial in the custom_panels.js file, which explains the process of custom coding a new panel to the game.
The video tutorial can also be found here: https://www.youtube.com/watch?v=WVr6-3E7lA8

commented

If the mods aren't available for the version you are using, then you will need to wait for them to update.

commented

ok i already coded 2 and both are not in my game
how can i do it if i have followed the instruction?
how can i make them appear in the game

commented

i don't know what i did wrong

commented

Can you provide your entire log file, so that we can review it to see what may be occurring?

commented

i think it's that

commented

i have trouble shooting now

it says

Solar Flux Reborn (solarflux) has failed to load correctly
java.lang.reflect.InvocationTargetException: null

commented

latest.log
there sorry i had issues

commented

it doesn't support js files

commented

I'm not sure what to suggest, in that case, other than going over the file again and making sure that there's no missing characters or anything anywhere, as without being able to look over the file itself, I can't see exactly what's gone wrong. The most information I have accessible to me is that it looks like the primary issue is on line 165 of the code, so I'd suggest starting there with looking over the file.

commented

I have cheked every thing and i made some errors (I corrected them) so i think i was my fault

still not bouting up correctly

commented

Alright, after checking the log file, there isn't much information in there, though it looks to report that a crash report was created, in this case, can you head into crash-reports folder and send through the latest crash report file?

commented

i will try my best on my side to correct every thing i possibly can too
crash-2023-03-13_19.18.04-fml.txt

commented

in the crash report it says that minecraft and forge are suspected but on the minecraft loading screen (game launched) it says Solar Flux Reborn
so i don't know

commented

From what I can see in the report, it looks like possibly a formatting error in the code, presumably from the custom_panels.js file, looks like possibly a missing closing bracket, or a bracket placed in the wrong location from what I can tell.

Can you send the custom_panels.js file you've made so that we can have a look to see how it's all formatted?

commented

`if(ismodloaded("draconicevolution"))
if(isModLoaded("solarflux"))
if(ismodloaded("avaritia"))
{
}

panel()
.name("wyvern")
.height(4 / 16.0)
.generation(65536)
.capacity(256000000)
.transfer(512000)
.buildAndRegister()
.langBuilder().put("en_us", "Wyvern Solar Panel")
.build();
.recipeBuilder()
.shape("8E8", "ECE", "8E8")
.bind("E", item("draconic_evolution", "wyvern_energy_core"))
.bind("c", item("draconic_evolution", "wyvern_core"))
.bind("8", item("solarflux", "sp_8"))
.build(2);

panel() 
    .name("draconic") 
    .height(4 / 16.0) 
	.generation(131072) 
	.capacity(512000000) 
	.transfer(1024000)
.buildAndRegister()
	.langBuilder() 
	        .put("en_us", "Draconic Solar Panel")
	    .build();
    .recipeBuilder()
        .shape("hth", "tft", "hth")
        .bind("t", item("draconic_evolution", "draconic_energy_core"))
        .bind("f", item("draconic_evolution", "draconic_core"))
        .bind("h", item("solarflux", "wyvern_solar_panel"))
    .build(2);

` basically what i wrote

commented

I'm not sure what to suggest, in that case, other than going over the file again and making sure that there's no missing characters or anything anywhere, as without being able to look over the file itself, I can't see exactly what's gone wrong. The most information I have accessible to me is that it looks like the primary issue is on line 165 of the code, so I'd suggest starting there with looking over the file.

you say 165? it's a the bottom of the page totally

        .result(ourMaterial, 1)
        .input(item("solarflux", "ender_glass"))
        .cookTime(400) // 20 seconds
        .xp(10.0)
        .register();
}

}

(lines 160 to 166)

commented

the 2 "}" are part of the code

commented

here is the entire document (the code)

/*

  • 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.
    1. 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
    1. At the end of the chain, call .build()=>SolarPanel (alternatively, .buildAndRegister()=>SolarPanel, to skip step #5)
    1. 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
    1. 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.
    1. To register the panel, append .register()=>SolarPanel after ending the chain.
    1. 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"

var ourMaterial = false;

/** This function is called when mod is being constructed */
function init()

{

	if(ismodloaded("draconicevolution"))
    if(isModLoaded("solarflux"))
	if(ismodloaded("avaritia"))
	{
		
    }

panel()
.name("wyvern")
.height(4 / 16.0)
.generation(65536)
.capacity(256000000)
.transfer(512000)
.buildAndRegister()
.langBuilder().put("en_us", "Wyvern Solar Panel")
.build();
.recipeBuilder()
.shape("8E8", "ECE", "8E8")
.bind("E", item("draconic_evolution", "wyvern_energy_core"))
.bind("c", item("draconic_evolution", "wyvern_core"))
.bind("8", item("solarflux", "sp_8"))
.build(2);

panel() 
    .name("draconic") 
    .height(4 / 16.0) 
	.generation(131072) 
	.capacity(512000000) 
	.transfer(1024000)
.buildAndRegister()
	.langBuilder() 
	        .put("en_us", "Draconic Solar Panel")
	    .build();
    .recipeBuilder()
        .shape("hth", "tft", "hth")
        .bind("t", item("draconic_evolution", "draconic_energy_core"))
        .bind("f", item("draconic_evolution", "draconic_core"))
        .bind("h", item("solarflux", "wyvern_solar_panel"))
    .build(2);

}
{

// Example: (textures are extracted in /textures/ by default), uncomment to try it out! (Requires game restart)

/* Comment Start

// You might need to use CraftTweaker or something else to make the material obtainable!
ourMaterial = newMaterial("example")
    .langBuilder()
        .put(english, "Example Material")
    .build();

panel()
	.name("example")
	.height(8 / 16.0)
	.generation("8388608")
	.capacity("3355443200")
	.transfer("50331648")
.buildAndRegister()
	.langBuilder()
		    .put(english, "Example Solar Panel")
		.build()
	.recipeBuilder()
		.shape("ppp", "8c8", "8h8")
		.bind('p', item("solarflux", "photovoltaic_cell_6"))
		.bind('8', item("solarflux:sp_8"))
		.bind('c', tag("forge", "storage_blocks/emerald"))
		.bind('h', ourMaterial) // Here we use the newly added material in the recipe!
	.build(2);

Comment end*/

}

/*

  • This method is used to register additional recipes
  • Below listed all vanilla options for adding recipes.
    */

function registerRecipes($)
{
// IF you have a mod with custom recipe type, register them with the following:
// $.add(IRecipe<?>)
// Just don't forget to import the recipe class.
// To pass an ingredient to a recipe wrap your item()/tag() call in a ingredient().
// Basically this will create Minecraft Ingredient: ingredient(tag("forge", "storage_blocks/emerald"))

if(ourMaterial)
{
    $.shaped() // Shaped recipe example
        .result(ourMaterial, 2)
        .shape("###", "#$#", "###")
        .map('$', item("solarflux", "ender_glass"))
        .map('#', tag("forge", "rods/blaze"))
        .register();

    $.shapeless() // Shapeless recipe example
        .result(ourMaterial, 1)
        .add(item("solarflux", "ender_glass"))
        .add(tag("forge", "rods/blaze"))
        .add(tag("forge", "rods/blaze"))
        .add(tag("forge", "rods/blaze"))
        .register();

    $.stoneCutting() // Stone cutting recipe example
        .result(ourMaterial, 1)
        .input(item("solarflux", "ender_glass"))
        .register();

    // $.blasting() can be replaced with the following: (they have exactly same construction options)
    //     $.smelting()
    //     $.campfire()
    //     $.smoking()
    $.blasting() // Blasting cutting recipe example
        .result(ourMaterial, 1)
        .input(item("solarflux", "ender_glass"))
        .cookTime(400) // 20 seconds
        .xp(10.0)
        .register();
}

}

every "}" is part of the code