lucaargolo / extra-generators

A technology mod for Minecraft that adds a variety of generators to your world.
Mozilla Public License 2.0
2 stars 4 forks source link

Also move energy into targets that allow insertion, but have capacity=0 #7

Closed shartte closed 2 years ago

shartte commented 2 years ago

https://github.com/lucaargolo/extra-generators/blob/bd6948b9610efa2aea89c46fc43ac0cddf6640b7/src/main/kotlin/io/github/lucaargolo/extragenerators/common/blockentity/AbstractGeneratorBlockEntity.kt#L156

This is the case for AE2 energy acceptors since they don't actually have a capacity. They forward energy into the internal grid using an invisible buffer that has no bound.

Check could be

if(target.supportsInsertion() && (target.amount < target.capacity || target.capacity == 0)) {
Technici4n commented 2 years ago

You can just omit the capacity check altogether.