You are not logged in.

IC2 Experimental builds (jenkins):
v2.0/2.1/2.2 / 2.3 / 2.5 / 2.6 (For Minecraft 1.6.4/1.7.2/1.7.10 / 1.8.9 / 1.9.4 / 1.10)
IndustrialCraft² recent version: v1.117! (For Minecraft 1.5.2 → topic)

1

Wednesday, March 4th 2015, 1:31pm

optimization source code

I'm not sure I chose the right forum, but here are the author modification "industrial" ...
I found a wasteful method of obtaining the difference tier in the "calculateRatioFor"

Source code

1
2
3
4
5
6
if (b.tier() < a.tier() - 1) {
   	value -= 2 * (a.tier() - b.tier());
 	}
 	if (b.tier() - 3 > a.tier()) {
   	value -= b.tier() - a.tier();
 	}

it can be rewritten as follows:

Source code

1
2
3
4
5
6
7
int tier = a.tier() - b.tier();
if (tier > 1) {
   	value -= 2 * tier;
 	}
 	if ( tier < -3) {
   	value += tier;
 	}

This is small change and the load too small, but I hope the mod will be a little better...

2

Wednesday, March 4th 2015, 2:12pm

in the "calculateRatioFor"

ic2.core.crop.TileEntityCrop::calculateRatioFor(Cropcard a, Cropcard b)
Line number is 404, as of 2.2.687

3

Thursday, March 5th 2015, 11:25pm

I've been wondering for a while now where I can find the source code, preferably with instructions on how to build it? I might try my hand at fixing some things.

SpwnX

IC² Creative Content Inventor, GT Public Relations Manager and your lovely forum moderator

  • "SpwnX" is male
  • Brazil

Posts: 8,359

Location: Nowhere to be found, unless I know you

  • Send private message

4

Thursday, March 5th 2015, 11:40pm

IC2 source is closed, by the way.
We need people to document GregTech, help us by joining the FTB wiki team: http://ftb.gamepedia.com/GregTech_6

xbony2

Copper Miner

  • "xbony2" is male
  • United States

Posts: 1,191

Location: United States of America

  • Send private message

5

Friday, March 6th 2015, 12:29am

Closed as in Closed Sourced. I know everybody's opened IC2 in JD-GUI before, but it's probably best not to post IC2 code unless you really have to. It's probably better to PM Player if you want to suggest a change to IC2.
Help the Official FTB Wiki reach 8000 9000 10,000 11,000 12,000 13,000 14,000 pages!

Someone should fix the gravel texture in the background...

6

Friday, March 6th 2015, 12:34am

The closest you can get to the sources are by disassembling or decompiling the developer jar. Personally I disassemble because it is lossless. One example of disassembly is the Class File Editor in Eclipse, if you just try and open an internal class of the IC2 jar from a Forge gradle setup.

7

Friday, March 6th 2015, 8:41am

That's actually not a significant optimization, the compiler may even do it itself.

I've adopted it anyway to improve readability and fixed the previously broken stat comparison.