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)

Dear visitor, welcome to IC² Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

MauveCloud

Coal Miner

  • "MauveCloud" is male

Posts: 1,048

Location: California

  • Send private message

21

Tuesday, July 7th 2015, 3:53pm

Well since it is sortet first by ModName and then Crop name it does effect it really because a G comes before a I so the list which you are using is completly differend then i told. Try it out with Vanilla IC2 Exp...

I briefly tried using IC2 exp build 746 with no other mods (though for the sake of my eyes, I did use a couple of resource packs), and starting with the "sugar cane" item, I put them in a checkerboard pattern (except for the center, which had water). Once they grew, I set up crossbreeding. I mostly got reed, but on the first try, I got 1 pumpkin crop and 1 stickreed crop. I crossed the stickreed with reed, and got something that started like wheat. It might have been Hops instead, but I wasn't interested enough in proving you wrong on this point to continue. If you can provide more specific steps to reproduce in-game, I'm willing to try further, though.

Well not almost it is impossible. IC2 Has 24 crops. the first 12 he is skipping. If the 13th is not the one you are searching for then he skips a couple others...

Also addition. As long this bug exists i block every version of IC2 Exp that will be higher then 677. (Until it get fixed)

I think you're misinterpreting the decompiled code. It looks to me more like a binary search for the crop with a result range that includes the number returned from the random number generator. So technically yes, it initially skips the first half of the crop list, but then depending on the ratios and the random number it got, it can go forward or back for the next crop to check.

Speiger

TMT & IC2 Classic Dev

  • "Speiger" is male
  • "Speiger" started this thread

Posts: 997

Location: Germany

  • Send private message

22

Wednesday, July 8th 2015, 3:31am

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
int min = 0;
int max = cropsArray.length-1;
while(min < max)
{
   int currentCheck = (min + max) / 2;
   int checkValue = pointArray[currentCheck];
   if(checkValue >= randomNumber)
   {
       max = currentCheck;
   }
   else
   {
       min = currentCheck + 1;
   }
}

Do you not see the mistake?

MauveCloud

Coal Miner

  • "MauveCloud" is male

Posts: 1,048

Location: California

  • Send private message

23

Wednesday, July 8th 2015, 3:40am

I see no mistake there, except possibly in your understanding of what the code is doing. The previous loop (which you didn't include) made sure that the values in pointArray are non-decreasing as the array index increases. On each iteration, depending on the value previously obtained for "randomNumber" and the value in the middle of the currently-searched array section, either the first half or the second half of the array section currently being searched is excluded from further search. What are you seeing as a mistake?

Speiger

TMT & IC2 Classic Dev

  • "Speiger" is male
  • "Speiger" started this thread

Posts: 997

Location: Germany

  • Send private message

24

Wednesday, July 8th 2015, 3:55am

I did not include everything before or after that, because that code is ok,

Min and Max have to be the same number and based on that number he picks the new crop.
from the array.

So my problem is that this system skips a lot of possebilities right in the begining
because 0 + 24 / 2 = 12. If that crop ID is not that he is searching for he put the min on to 13,
then he starts over again 13 + 24 = 37 / 18,5 (rounded up because int 19)
if 19 is not the crop he is searching for then he put min to 20,
start over again 20 + 24 / 2 = 22

And and and. It is not the pointgeneration that is broken it is where he search for a crop to pick that is broken...

MauveCloud

Coal Miner

  • "MauveCloud" is male

Posts: 1,048

Location: California

  • Send private message

25

Wednesday, July 8th 2015, 4:10am

That's wrong on at least two points:
1. Since the array is size 24 when not using other mods that add crops, it starts with (0+23)/2, which equals 11 (integer division truncates, it doesn't round, at least for positive integers - behavior of dividing negative integers can vary between programming languages). This one's a minor nitpick, though.
2. you seem to be missing the point of the if statement - sometimes it increases the min (technically to 12 for the first iteration) and searches higher next (index 17), but other times it decreases max instead and searches lower next (index 5 for the second iteration in that case).

Speiger

TMT & IC2 Classic Dev

  • "Speiger" is male
  • "Speiger" started this thread

Posts: 997

Location: Germany

  • Send private message

26

Wednesday, July 8th 2015, 4:17am

That's wrong on at least two points:
1. Since the array is size 24 when not using other mods that add crops, it starts with (0+23)/2, which equals 11 (integer division truncates, it doesn't round, at least for positive integers - behavior of dividing negative integers can vary between programming languages). This one's a minor nitpick, though.
2. you seem to be missing the point of the if statement - sometimes it increases the min (technically to 12 for the first iteration) and searches higher next (index 17), but other times it decreases max instead and searches lower next (index 5 for the second iteration in that case).


Ok some part i did misscalculate (the 0-23 part) thanks for correting me.
But i am aware of it that he decreases the Number of the max, and yeah he can decrease the total number with that, but only to a certan point... and so some results are not possible or are very rare to get... (even if it should be a high chance),
why not instead adding a few extra points to the total number and let a Random pick the a number and then which one is the closest to it... That would be way easier and also handle all crops... (that have points)

Edit: I saw before that you can decrease the Max number but did not realize his effect...

MauveCloud

Coal Miner

  • "MauveCloud" is male

Posts: 1,048

Location: California

  • Send private message

27

Wednesday, July 8th 2015, 4:27am

why not instead adding a few extra points to the total number and let a Random pick the a number and then which one is the closest to it... That would be way easier and also handle all crops... (that have points)


I don't really understand what you're suggesting, but the current code is an application of the standard binary search algorithm, so I'm fairly sure it already handles all crops, and will generally have better performance than the sequential search that was used in builds 677 and earlier.

Speiger

TMT & IC2 Classic Dev

  • "Speiger" is male
  • "Speiger" started this thread

Posts: 997

Location: Germany

  • Send private message

28

Wednesday, July 8th 2015, 4:40am

why not instead adding a few extra points to the total number and let a Random pick the a number and then which one is the closest to it... That would be way easier and also handle all crops... (that have points)


I don't really understand what you're suggesting, but the current code is an application of the standard binary search algorithm, so I'm fairly sure it already handles all crops, and will generally have better performance than the sequential search that was used in builds 677 and earlier.


Well i think both ways taking the same average time... But personally i like the old one more (only the picking part), but the world is sadly not a Wishing spot... xD

Speiger

TMT & IC2 Classic Dev

  • "Speiger" is male
  • "Speiger" started this thread

Posts: 997

Location: Germany

  • Send private message

29

Wednesday, August 12th 2015, 11:19am

Just so you know. IC2 Classic will be released this weekend.
With that also this crop plugin.. Ill update the Exp calculator before the release to the latest Exp version (if something did change)
^^" It is close xD

Shadowlife

Exaggerator :D

Posts: 135

Location: Here.

  • Send private message

30

Wednesday, August 12th 2015, 5:52pm

Quoted from "xkcd.com"

BTC 1FhCLQK2ZXtCUQDtG98p6fVH7S6mxAsEey
We did not invent the algorithm. The algorithm consistently finds Jesus. The algorithm killed Jeeves.
The algorithm is banned in China. The algorithm is from Jersey. The algorithm constantly finds Jesus.
This is not the algorithm. This is close.


Sorry, couldn't stop myself.

Anyways, thanks for the hard work, I appreciate it. If i manage to find some time, which is rather scarce as of now for me, I'll check this out for sure!
Iff yu find misstaks, you may keep them! (Or tell me if neccessary...)

Speiger

TMT & IC2 Classic Dev

  • "Speiger" is male
  • "Speiger" started this thread

Posts: 997

Location: Germany

  • Send private message

31

Wednesday, August 12th 2015, 6:27pm

Quoted from "xkcd.com"

BTC 1FhCLQK2ZXtCUQDtG98p6fVH7S6mxAsEey
We did not invent the algorithm. The algorithm consistently finds Jesus. The algorithm killed Jeeves.
The algorithm is banned in China. The algorithm is from Jersey. The algorithm constantly finds Jesus.
This is not the algorithm. This is close.


Sorry, couldn't stop myself.

Anyways, thanks for the hard work, I appreciate it. If i manage to find some time, which is rather scarce as of now for me, I'll check this out for sure!


But that is only 1.7.10 and not 1.6.4...
^^" Got merged by IC2 Classic...

Shadowlife

Exaggerator :D

Posts: 135

Location: Here.

  • Send private message

32

Thursday, August 13th 2015, 3:47pm

I'm using MultiMC most of the time, so I don't have any problem with setting up a new pack for testing and stuff :D
Iff yu find misstaks, you may keep them! (Or tell me if neccessary...)

Speiger

TMT & IC2 Classic Dev

  • "Speiger" is male
  • "Speiger" started this thread

Posts: 997

Location: Germany

  • Send private message

33

Friday, August 14th 2015, 8:15pm

Release is out^^"

DreamMasterXXL

Mod Tweaker

  • "DreamMasterXXL" is male
  • Germany

Posts: 597

Location: Germany

  • Send private message

34

Friday, August 14th 2015, 10:06pm

Are there Gregtech crops shown too in your Mod ?
If not i would suggest it ;-)

Speiger

TMT & IC2 Classic Dev

  • "Speiger" is male
  • "Speiger" started this thread

Posts: 997

Location: Germany

  • Send private message

35

Friday, August 14th 2015, 10:46pm

Are there Gregtech crops shown too in your Mod ?
If not i would suggest it ;-)


Special Textures&Special Icons nope... I have an API which he can use..
I told him already about that... (Before i made this post here i think even)

But Chance calculation is default supporting every mod that is using the IC2 Crop API.

Speiger

TMT & IC2 Classic Dev

  • "Speiger" is male
  • "Speiger" started this thread

Posts: 997

Location: Germany

  • Send private message

36

Thursday, November 12th 2015, 12:52pm

Update:

Changelog:

A simple Pre classic Update.
There will be a quick update after Classic gets released. I just added Prepairing&Compatiblity with the API with this update

-Updated: IC2 Classic API. Some adjustments to the new Classic Update (Pre update)
-Added: Tea compatiblity.

38

Friday, February 19th 2016, 2:56pm

I think this is a useful mod. Can I reproduce this mod to MCBBS ?

Speiger

TMT & IC2 Classic Dev

  • "Speiger" is male
  • "Speiger" started this thread

Posts: 997

Location: Germany

  • Send private message

39

Friday, February 19th 2016, 4:48pm

First what is MCBBS?
Second what do you mean by Reproduce?

Chocohead

Drowning in mods.

  • "Chocohead" is male
  • Korea, Democratic People's Republic of United Kingdom

Posts: 5,979

Location: Badly generated chunks.

  • Send private message

40

Friday, February 19th 2016, 5:55pm

It could be Minecraft Buggy Block System, but I doubt it's that ;)
145 Mods isn't too many. 9 types of copper and 8 types of tin aren't too many. 3 types of coffee though?

I know that you believe that you understood what you think I said, but I am not sure you realise that what you read was not what I meant.


---- Minecraft Crash Report ----
// I just don't know what went wrong :(

I see this too much.

Counter:

Hits today: 60,501 | Hits yesterday: 80,423 | Hits record: 152,331 | Hits total: 65,225,192