Mod Feedback [By Request] RotaryCraft Suggestions

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Reika

RotaryCraft Dev
FTB Mod Dev
Sep 3, 2013
5,079
5,331
550
Toronto, Canada
sites.google.com
A survival version of the World edit wand would be nice. Or just add a recipe and make it consume blocks from your inventory. The Remote IO block replacer is the only thing other than the TC wand of equal trade that allows anything like this. I am not a fan of magic mods, so TC is out and adding an entire mod for one tool seems like a waste anyways. Since I play SP, it's not a huge deal and I use the World edit wand anyways, but I would like if it used my inventory.
ChromatiCraft has such an item.
 
  • Like
Reactions: YX33A

Sm31415

New Member
Jul 29, 2019
19
0
0
Would it be possible to add a slot to the magnetostatic engines so that they can be powered internally by the Flux capacitors?
 
  • Like
Reactions: YX33A

ljfa

New Member
Jul 29, 2019
2,761
-46
0
IIRC you can put flux capacitors in energy cells, so you can place one next to your magnetostatic.
 
  • Like
Reactions: YX33A

The Skeptical Tech

New Member
Jul 29, 2019
85
0
0
Just lovely.
Code:
 @Override
public boolean equals(Object obj) {
return false;
}
According to that, one of those objects is not even equal to itself.

Worse, every test of list.contains() or map.get() is going to return null with that crap as the key.

That is... just wrong. It looks like one of those things where you make a method stub and fill in "return true/false" just to keep the IDE happy until you add the actual code later.

public float getOptionFloatValue(GameSettings.Options p_74296_1_)
{
return p_74296_1_ == GameSettings.Options.FOV ? this.fovSetting : (p_74296_1_ == GameSettings.Options.GAMMA ? this.gammaSetting : (p_74296_1_ == GameSettings.Options.SATURATION ? this.saturation : (p_74296_1_ == GameSettings.Options.SENSITIVITY ? this.mouseSensitivity : (p_74296_1_ == GameSettings.Options.CHAT_OPACITY ? this.chatOpacity : (p_74296_1_ == GameSettings.Options.CHAT_HEIGHT_FOCUSED ? this.chatHeightFocused : (p_74296_1_ == GameSettings.Options.CHAT_HEIGHT_UNFOCUSED ? this.chatHeightUnfocused : (p_74296_1_ == GameSettings.Options.CHAT_SCALE ? this.chatScale : (p_74296_1_ == GameSettings.Options.CHAT_WIDTH ? this.chatWidth : (p_74296_1_ == GameSettings.Options.FRAMERATE_LIMIT ? (float)this.limitFramerate : (p_74296_1_ == GameSettings.Options.ANISOTROPIC_FILTERING ? (float)this.anisotropicFiltering : (p_74296_1_ == GameSettings.Options.MIPMAP_LEVELS ? (float)this.mipmapLevels : (p_74296_1_ == GameSettings.Options.RENDER_DISTANCE ? (float)this.renderDistanceChunks : (p_74296_1_ == GameSettings.Options.STREAM_BYTES_PER_PIXEL ? this.field_152400_J : (p_74296_1_ == GameSettings.Options.STREAM_VOLUME_MIC ? this.field_152401_K : (p_74296_1_ == GameSettings.Options.STREAM_VOLUME_SYSTEM ? this.field_152402_L : (p_74296_1_ == GameSettings.Options.STREAM_KBPS ? this.field_152403_M : (p_74296_1_ == GameSettings.Options.STREAM_FPS ? this.field_152404_N : 0.0F)))))))))))))))));
}
I don't even...

That monstrosity is going to be an absolute pain to debug.

I like ternaries too, but that is going way too far. Somebody likes LISP too much I think.
 
  • Like
Reactions: YX33A

1M Industries

New Member
Jul 29, 2019
537
0
0
I found another in GameSettings:


Code:
 public float getOptionFloatValue(GameSettings.Options p_74296_1_)
{
return p_74296_1_ == GameSettings.Options.FOV ? this.fovSetting : (p_74296_1_ == GameSettings.Options.GAMMA ? this.gammaSetting : (p_74296_1_ == GameSettings.Options.SATURATION ? this.saturation : (p_74296_1_ == GameSettings.Options.SENSITIVITY ? this.mouseSensitivity : (p_74296_1_ == GameSettings.Options.CHAT_OPACITY ? this.chatOpacity : (p_74296_1_ == GameSettings.Options.CHAT_HEIGHT_FOCUSED ? this.chatHeightFocused : (p_74296_1_ == GameSettings.Options.CHAT_HEIGHT_UNFOCUSED ? this.chatHeightUnfocused : (p_74296_1_ == GameSettings.Options.CHAT_SCALE ? this.chatScale : (p_74296_1_ == GameSettings.Options.CHAT_WIDTH ? this.chatWidth : (p_74296_1_ == GameSettings.Options.FRAMERATE_LIMIT ? (float)this.limitFramerate : (p_74296_1_ == GameSettings.Options.ANISOTROPIC_FILTERING ? (float)this.anisotropicFiltering : (p_74296_1_ == GameSettings.Options.MIPMAP_LEVELS ? (float)this.mipmapLevels : (p_74296_1_ == GameSettings.Options.RENDER_DISTANCE ? (float)this.renderDistanceChunks : (p_74296_1_ == GameSettings.Options.STREAM_BYTES_PER_PIXEL ? this.field_152400_J : (p_74296_1_ == GameSettings.Options.STREAM_VOLUME_MIC ? this.field_152401_K : (p_74296_1_ == GameSettings.Options.STREAM_VOLUME_SYSTEM ? this.field_152402_L : (p_74296_1_ == GameSettings.Options.STREAM_KBPS ? this.field_152403_M : (p_74296_1_ == GameSettings.Options.STREAM_FPS ? this.field_152404_N : 0.0F)))))))))))))))));
}
That is one line.

I have not seen a mess of ternaries this big since the 1.2.5 copy of RenderBlocks.

Come to think of it, I have never seen Mojang use a switch statement, which does the same thing as that, only readably. I wonder if they know it exists...?
MUST.......REFRAIN.......FROM.......SCREAMING!!!!!!!!!
Seriously though, that is.....just wrong. I have never seen something that bad outside of a REALLY bad nightmare. What were the developers thinking? Or were they even thinking at all........
 

RavynousHunter

New Member
Jul 29, 2019
2,784
-3
1
MUST.......REFRAIN.......FROM.......SCREAMING!!!!!!!!!
Seriously though, that is.....just wrong. I have never seen something that bad outside of a REALLY bad nightmare. What were the developers thinking? Or were they even thinking at all........
You hit the nail on the head, 'ere. They aren't thinking, and that's the problem. No thinking person would permit such a monstrosity from being written, much less actually used.
 
  • Like
Reactions: Padfoote

keybounce

New Member
Jul 29, 2019
1,925
0
0
You are assuming that the actual source was like that.

Remember, there is a program whose goal is to obfuscate the output from the compiler, into something that is valid bytecode but won't return the original source.
 

RavynousHunter

New Member
Jul 29, 2019
2,784
-3
1
You are assuming that the actual source was like that.

Remember, there is a program whose goal is to obfuscate the output from the compiler, into something that is valid bytecode but won't return the original source.
The bytecode for the various operators must be the same, otherwise, the obfuscated code would never work. Unless the obfuscator goes thru and analyzes the unobfuscated output and changes various forms of control flow to something similar, but not the same, then those will always be the same. Thus an "if" will produce a different bytecode than a ternary statement.
 

Reika

RotaryCraft Dev
FTB Mod Dev
Sep 3, 2013
5,079
5,331
550
Toronto, Canada
sites.google.com
You are assuming that the actual source was like that.

Remember, there is a program whose goal is to obfuscate the output from the compiler, into something that is valid bytecode but won't return the original source.
Again, I compare the source of mods to the results of decompilation all the time, and the relation is nearly 1:1. Java is very easily decompiled.


EDIT:
So it appears they do know about switch, but it does them little good.
I found more, this time in SoundHandler:
Code:
            switch (SoundHandler.SwitchType.field_148765_a[soundentry.getSoundEntryType().ordinal()])
            {
                case 1:
                  ---stuff---
                    break;
                case 2:
                  ---stuff---
                    break;
                default:
                    throw new IllegalStateException("IN YOU FACE");
 
Last edited:

1M Industries

New Member
Jul 29, 2019
537
0
0
Again, I compare the source of mods to the results of decompilation all the time, and the relation is nearly 1:1. Java is very easily decompiled.


EDIT:
So it appears they do know about switch, but it does them little good.
I found more, this time in SoundHandler:
Code:
            switch (SoundHandler.SwitchType.field_148765_a[soundentry.getSoundEntryType().ordinal()])
            {
                case 1:
                  ---stuff---
                    break;
                case 2:
                  ---stuff---
                    break;
                default:
                    throw new IllegalStateException("IN YOU FACE");
GAH!!!! THE PAIN!!!! NOOOOOOOOOOO!!!!!!!!!!!!!!!!!!!!!
 
  • Like
Reactions: YX33A

RavynousHunter

New Member
Jul 29, 2019
2,784
-3
1
That's not too bad, but I cringe every time I see cases without braces. It just looks...wrong. I'm a bit anal with explicitly defining my scope.
 
  • Like
Reactions: YX33A

Reika

RotaryCraft Dev
FTB Mod Dev
Sep 3, 2013
5,079
5,331
550
Toronto, Canada
sites.google.com
A new one. This is not the syntax, but the semantics.
Through careful debugging I have determined that Mojang, in its infinite wisdom, has decided to set up the sound system to reload the file from the hard drive every time it plays. Not only is that terrible for performance and hard disk lifespan, but it is going to severely hinder my ability to adapt my sound system.
 
  • Like
Reactions: YX33A

DREVL

Well-Known Member
Jul 10, 2013
1,251
380
99
I am going to be useless and ask if someone can think of a cool way of telling R how Rotary can cut down trees... Rotary itself doesn't really use wood. But still.
 

1M Industries

New Member
Jul 29, 2019
537
0
0
A new one. This is not the syntax, but the semantics.
Through careful debugging I have determined that Mojang, in its infinite wisdom, has decided to set up the sound system to reload the file from the hard drive every time it plays. Not only is that terrible for performance and hard disk lifespan, but it is going to severely hinder my ability to adapt my sound system.
Right. Time to bug Mojang about fixing that. I really don't want more lag caused by excessive sound usage.
 
  • Like
Reactions: Padfoote