Skip to content

Commit 800c232

Browse files
committed
Fixed a rare bug because of which a treadmill could not transfer power to some nearby power consumers
1 parent d12fa69 commit 800c232

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/dev/kir/sync/block/entity/TreadmillBlockEntity.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ private void transferEnergy(World world, BlockPos pos) {
203203

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

0 commit comments

Comments
 (0)