diff --git a/src/main/java/dev/dubhe/anvilcraft/api/power/PowerGrid.java b/src/main/java/dev/dubhe/anvilcraft/api/power/PowerGrid.java index 6c2733244..977219bb6 100644 --- a/src/main/java/dev/dubhe/anvilcraft/api/power/PowerGrid.java +++ b/src/main/java/dev/dubhe/anvilcraft/api/power/PowerGrid.java @@ -121,11 +121,8 @@ protected void tick() { storages.add(storage); if (need <= 0) break; } - if (need > 0) { - this.update(false); - return; - } - for (IPowerStorage storage : storages) { + if (need > 0) this.update(false); + else for (IPowerStorage storage : storages) { this.generate += storage.extract(this.consume - this.generate); } } diff --git a/src/main/java/dev/dubhe/anvilcraft/block/entity/ChargeCollectorBlockEntity.java b/src/main/java/dev/dubhe/anvilcraft/block/entity/ChargeCollectorBlockEntity.java index 659811615..8ab4ceeae 100644 --- a/src/main/java/dev/dubhe/anvilcraft/block/entity/ChargeCollectorBlockEntity.java +++ b/src/main/java/dev/dubhe/anvilcraft/block/entity/ChargeCollectorBlockEntity.java @@ -98,7 +98,7 @@ public void saveAdditional(@NotNull CompoundTag tag, HolderLookup.@NotNull Provi @Override public void gridTick() { - if (this.cooldownCount >= 1) { + if (this.cooldownCount > 1) { this.cooldownCount -= 1; return; }