Ender IO Zoo

Ender IO Zoo

961k Downloads

Forge's IEnergyStorage capability is not exposed for the null/internal side

SquidDev opened this issue ยท 3 comments

commented

Calling tile.hasCapability(CapabilityEnergy.ENERGY, null) returns null for EnderIO tiles, rather than the tile's internal energy buffer*. This makes it harder for mods which do not have a general sense of "direction" to interact with EnderIO tiles.

For instance, see InternalPoweredTileWrapper:

https://github.com/SleepyTrousers/EnderIO/blob/4eb096b0de5923b56362504ae7a2a31e7d4ba979/enderio-base/src/main/java/crazypants/enderio/base/power/forge/InternalPoweredTileWrapper.java#L25

Ideally this check would be facing == null || tile.canConnectEnergy(facing)

Affected Versions:

  • EnderIO: 1.12.2-5.0.31
  • EnderCore: 1.12.2-0.5.37
  • Minecraft: 1.12
  • Forge: 14.23.4.2750
  • SpongeForge? No
  • Optifine? No
  • Single Player, development environment

* OK, I realise the behaviour of a null direction is somewhat contentious. I've generally seen it used to mean "everything", but understand if not doing so is an intentional decision.

commented

"internal" is for internal use only...

commented

I've generally seen it used as an "internal view" of the object, rather than internal use only. I'd agree that the docs are a little ambiguous though - LexManos has suggested describing it as an "unknown/unimportant side" instead.

commented

This is an intentional decision for now. If you are a developer and are looking at this, treat Ender IO blocks as sided always. Internal is for access to our blocks only.