Skip to content

Commit

Permalink
Fixed a rare bug because of which a treadmill could not transfer powe…
Browse files Browse the repository at this point in the history
…r to some nearby power consumers
  • Loading branch information
Kir-Antipov committed Jun 10, 2022
1 parent d12fa69 commit 800c232
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ private void transferEnergy(World world, BlockPos pos) {

for (int i = 0; i < 2; ++i) {
for (Direction direction : Direction.values()) {
EnergyStorage target = EnergyStorage.SIDED.find(world, pos.offset(direction), direction);
EnergyStorage target = EnergyStorage.SIDED.find(world, pos.offset(direction), direction.getOpposite());
if (target != null && target.supportsInsertion()) {
EnergyStorageUtil.move(back, target, Long.MAX_VALUE, null);
if (back.storedEnergy <= 0) {
Expand Down

0 comments on commit 800c232

Please sign in to comment.