Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
SquidDev opened this issue Aug 15, 2018 · 3 comments
Closed

Comments

@SquidDev
Copy link
Contributor

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.

@HenryLoenwind
Copy link
Member

"internal" is for internal use only...

@SquidDev
Copy link
Contributor Author

SquidDev commented Aug 15, 2018

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.

@EpicSquid
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants