TechReborn / Energy

An Energy API
MIT License
78 stars 13 forks source link

Can setStored be avoided? #5

Closed vpzomtrrfrt closed 3 years ago

vpzomtrrfrt commented 3 years ago

I can't think of a case where external objects setting stored energy is useful, but maybe there is one?

I have a use case where setting the stored energy is slower than it would be to insert or extract directly, and would ideally be able to override that behavior

drcrazy commented 3 years ago

It is used during world load. For example: https://github.com/TechReborn/RebornCore/blob/4be803f24979416c5dd3e0dbe81237786328f010/src/main/java/reborncore/common/powerSystem/PowerAcceptorBlockEntity.java#L337

vpzomtrrfrt commented 3 years ago

sure, but that's internal to PowerAcceptorBlockEntity so it doesn't mean anything else needs to implement it