[Question] Modding TileEntityNuclearReactor (For Adv Ins Pipe) [No longer issue]

  • I was looking for a work around for Reactors spitting out ice and a friend of mine and I managed to get it (TileEntityNuclearReactor.class) decompiled and think we have a fix. But everytime we try to recompile it throws us...


    Basically the reason (As explained by my friend) Adv Insertion Pipes wont work is that the nuclear reactor components become "damaged" and the A.I.P. sees the damaged components as empty spaces inside the reactor, and tries to fill them. Thus when ice enters it gets popped out by the full reactor. When we go to recompile the fix it throws those errors at us.

  • Are you positive this isn't a problem with the insertion pipe? I have trouble believing that insertion and removal; which should be forge hooks, are a bug within IC2 (which should be using those very hooks).


    Now, to attach an insertion pipe you will have to have removed a chamber; which leaves at least that column of 6 slots as 'empty' spaces. So if your reactor is otherwise full, the ejection is legitimate behavior.

  • The model im using has 4 chambers and....



    Something about that string ejecting the extra ice. Anyhow the easiest way to notice the problem lies in the reactor code is to attach an advanced insertion pipe to a chest, fill the chest with say, ice, all 54 spots of a double chest with full ice stacks. attach an advanced insertion pipe, make it loop around to it's self. throw some ice in and watch. The ice will try to go into the chest, since there's no room, it will continue on the pipe line into its loop. The reactor will on the other hand, take the ice...then eject it because of all slots being filled. I might have the wrong section of code but it still stands that the advanced insertion pipe doesnt like the reactor code (since advanced insertion pipe will work on say, macerators or BC engines)


    -edit- Even RP tubes show the same problem

  • If the /displayed/ slots in the reactor are full then there's nothing you can do. From what I've heard the tileEntity for the reactor core must have a singular storage bank sized assigned to it. As there's no way of preventing the removal of stored items (and thus no way of preventing abuse of stored items; actually that's not true, a special 'null value' item object could be made which would have no use and which the recycler would treat as nothing...), the non-displayed slots are left 'empty'. When you fill past the limit of the displayed slots overflow /will/ happen.


    Your alternatives are to use a timed/counted system like RP2 offers (that is you can manually inject at an exact rate; RP2 would still have the overflow problem in your case) or to beg for some type of dummy-item solution as I describe above.

  • Do you mind breaking that down into laymen terms for me? Also, I assume the recycler you mention is reactor?


    From what I understand, from your example...
    Even though 4 chambers are attached. A.I.P. sees the extra 2x6 (from the missing 2 chambers) and tries to fill them, when in reality there are no spaces left so they get thrown out of the reactor instead of put back into a pipe/tube system?

  • Do you mind breaking that down into laymen terms for me? Also, I assume the recycler you mention is reactor?


    From what I understand, from your example...
    Even though 4 chambers are attached. A.I.P. sees the extra 2x6 (from the missing 2 chambers) and tries to fill them, when in reality there are no spaces left so they get thrown out of the reactor instead of put back into a pipe/tube system?

    Recycler == Machine recycler (makes scrap)



    The reactor core, for game engine limit reasons; MUST always state that it has MAXCHAMBERSIZE slots of inventory. The 'hidden' slots are empty. What updates in 1.337b are supposed to do is take anything from the extra chambers worth of columns and try to fit it in to OPEN spaces of the main chamber. Anything else, and anything that can't be left in a reactor gets popped back out.


    The reason hidden slots aren't filled with anything else, is that all existing items are either useful, even if only to the recycler; thus potential abuse. The only way out of that would be for IC2 to include an item that is specifically intended to be useless and just take space. No recipes need make it, no recipes would use it, and it's most useful aspect would be to toss in to lava pits and watch burn.

  • After updating to 1.337b, I see they fixed it. Which makes this a moot point now and me feel a little more stupid.


    Still, thank you for your feedback

  • you must override item allocation method to let pipes place items into right slots.


    for compilation-decompilation, make sure you have proper eclipse setup, it compile nice ever without MCP, but a bit harder to read due function naming.