PSA: Monster 1.0.6 and 1.0.7 Hotfix

Status
Not open for further replies.

Lathanael

New Member
Jul 29, 2019
959
0
0
I'm fairly certain all mods support it.
Wrong
Just an off-topic question. Is there a way to tell right off the bat if a mod (any mod) supports that feature or not?
Unfortunately not otherwise Eyamaz and we(as in rest of the modpack team) wouldn't wish all mods supporting it. Some modders reference it in the documentation but for most it's either an undocumented feature or not working at all :(
 

Siro

New Member
Jul 29, 2019
638
0
0
Wrong

Unfortunately not otherwise Eyamaz and we(as in rest of the modpack team) wouldn't wish all mods supporting it. Some modders reference it in the documentation but for most it's either an undocumented feature or not working at all :(

For the mods that have readable source code available, they'll have something along the lines of
Code:
if (!id==0)
in their configuration code which basically says, if the id isn't 0, do this code to register the mod-added stuff. Mods without ID configs will definitely not have this feature at all. Some mods don't like turning off individual features so they explicitly don't support it.
 

GreatOrator

New Member
Jul 29, 2019
2,613
0
0
I think it would look more like
if (id != 0)

Actually, no, the way it is written makes sense. It is basically saying (in layman's terms) if the id is equal to 0 then do whatever. It is checking for the zero before processing that particular block, item, etc.

So most likely the entire function reads something similar to run the function if id is NOT 0.
 

Nerixel

New Member
Jul 29, 2019
1,239
0
0
Actually, no, the way it is written makes sense. It is basically saying (in layman's terms) if the id is equal to 0 then do whatever. It is checking for the zero before processing that particular block, item, etc.

So most likely the entire function reads something similar to run the function if id is NOT 0.
"if(id != 0)" is how you check if something is not equal to something else in Java. "if(!id==0)" errored when I tested it.
 

GreatOrator

New Member
Jul 29, 2019
2,613
0
0
if you look at the original post, he is not saying that is the only thing on the line, only that they contain something like that. In creating a complete function that would most certainly be the correct context if they are trying to determine if a particular item is needed by simply stating do not use this id if it is equal to 0.

Now it may be something I am missing with java, but programming in general that would be a proper syntax.
 

Kahless61

New Member
Jul 29, 2019
249
0
0
You would have to use more parenthesis in that case to enclose the comparison, since inversion (the !) gets evaluated first.
if(!(id==0))
Which makes for more confusing code, but some programmers are more confusing.
I'm a java, php, and C programmer, btw.
 

Siro

New Member
Jul 29, 2019
638
0
0
"if(id != 0)" is how you check if something is not equal to something else in Java. "if(!id==0)" errored when I tested it.

It wasn't meant to be literal code. One can go get the code snippet from OpenBlocks if one wishes.
 

Nerixel

New Member
Jul 29, 2019
1,239
0
0
We need to get back on topic, any second a moderator's gonna come in here and slap us all, but the code syntax was all Kahless was trying to correct (I think). The meaning of the statement itself was correct.
 
Status
Not open for further replies.