Nuclear Reactor Chamber not working with AE2 Export/Import bus

  • All started here:…Energistics-2/issues/3361 (this is another one thing that I want to fix)

    So I downloaded their repository and altered code to work properly with fuzzy upgrade. (Problem is - lzh_condensator does not overrides isDamageable and setItemDamage events, so I had to manipulate them in AE2 code, fuzzy upgrade now working properly for me)

    And after that I found out next problem: when you attach Export/Import bus to reactor itself - everything totaly fine.
    But when you attach them to reactor _chamber_, they are not working at all.
    After some debugging I found out, that for reactor chambers there is no ITEM_HANDLER_CAPABILITY, they use next code:

    if( te != null && te.hasCapability( CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, d ) )

    (te is net.minecraft.tileentity.TileEntity (that is chamber), d is side, like west,south, etc)

    so for reactor chamber second part of this check is false, for reactor itself - true

    As I understand, It cant be fixed from within AE2 code, so please add this property to reactor chamber (and maybe fix isDamageable/setItemDamage for CustomDamage that you use)
    Thank you in advance (probably not, I expect you to even ban me for insolence)

    • Official Post

    The reason why IC2 isn't using the vanilla damage system is because our damage can exceed the range of a short. ItemStacks only save the lower 16 bit of the damage (see ItemStack.writeToNBT()), a ItemStack exceeding that damage is also considered to be empty (see ItemStack.isEmpty()). We only use our own damage system for items, that might exceed that short value range. This is why you can't use isDamageable and setItemDamage.

    That being said, there are blocks in IC2 that do exactly what you atre looking for. The reactor coolant injectors allow you to recharge condensers in reactors. You'd only have to keep enough lapis/redstone in them.

    Regarding the capability not being exposed in the reactor chamber: yes, that's a bug. It's fixed in build 50