Ender IO Zoo

Ender IO Zoo

966k Downloads

RF connection not working with IEnergyReceiver and IEnergyProvider on the same tile entity

LemADEC opened this issue ยท 5 comments

commented

Issue Description:

EnderIO power interface is making invalid assumption on CoFH Energy blocks

What happens:

When connecting with a tile entity implementing both IEnergyReceiver and IEnergyProvider, EnderIO only check for the latest and doesn't realize that the same tile entity can also receive energy.
As seen here: https://github.com/SleepyTrousers/EnderIO/blob/master/src/main/java/crazypants/enderio/power/PowerHandlerUtil.java#L21

What you expected to happen:

EnderIO should support tile entities with both direction of RF energy.

Steps to reproduce:

  1. place a WarpDrive energy bank
  2. fill the bank with energy by placing a EnderIO creative capacitor next to it
  3. empty the bank with energy by placing an empty EnderIO capacitor next to it

Affected Versions (Do not use "latest"):

  • EnderIO: EnderIO-1.7.10-2.3.0.424_beta-dev
  • EnderCore: EnderCore-1.7.10-0.2.0.31_beta-dev
  • Minecraft: 1.7.10
  • Forge: 10.13.4.1490

Your most recent log file where the issue was present:

N/A

commented

Umm - I don't know why you think the code is wrong - but it actually checks for IEnergyHandler first, and the EnergyHandlerPI class is both input and output.

commented

PowerHandlerUtil assums you can't be both IEnergyReceiver and IEnergyProvider which is incorrect as reported in the API comments here: https://github.com/SleepyTrousers/EnderIO/blob/master/src/main/java/cofh/api/energy/IEnergyHandler.java#L15

commented

I've got confused with another bug in my mod, there's indeed no missing in EnergyHanderPI. I've updated the original post accordingly.

commented

but it actually checks for IEnergyHandler first

Didn't that get deprecated as separate interface and is now just a shorthand for receiver+provider?

commented

yes, that's the object of this issue and the related pull request