mirror of
https://github.com/GTNewHorizons/bdlib.git
synced 2026-11-24 05:54:39 +00:00
Compare commits
2
Commits
1.11.0-GTNH
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d402315bdb | ||
|
|
eb0b7ab7c3 |
No files matched your search
@@ -3,9 +3,9 @@ name: Build and test
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master, main ]
|
branches: [ master, main, release/** ]
|
||||||
push:
|
push:
|
||||||
branches: [ master, main ]
|
branches: [ master, main, release/** ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-test:
|
build-and-test:
|
||||||
|
|||||||
@@ -38,8 +38,14 @@ abstract class TileBaseProcessor
|
|||||||
if (isWorking) {
|
if (isWorking) {
|
||||||
|
|
||||||
if ((progress < 1) && (power.stored > cfg.activationEnergy)) {
|
if ((progress < 1) && (power.stored > cfg.activationEnergy)) {
|
||||||
|
// As much as possible, but not more than to finish the recipe
|
||||||
val maxConsume = Math.min(
|
val maxConsume = Math.min(
|
||||||
Math.max(cfg.powerUseRate * power.stored, cfg.activationEnergy),
|
// Consume at least the activationEnergy
|
||||||
|
Math.max(
|
||||||
|
// Machine gets faster, when more power is stored, maximum is when stored power is full
|
||||||
|
cfg.powerUseRate * Math.min(power.stored, power.capacity),
|
||||||
|
cfg.activationEnergy
|
||||||
|
),
|
||||||
cfg.mjPerItem * (1 - progress)
|
cfg.mjPerItem * (1 - progress)
|
||||||
)
|
)
|
||||||
val consumed = power.extract(maxConsume, false)
|
val consumed = power.extract(maxConsume, false)
|
||||||
|
|||||||
Reference in new issue
Block a user