Skip to content

Commit

Permalink
fix travel upgrade items using wrong way to determine power stored (#131
Browse files Browse the repository at this point in the history
)

Signed-off-by: Glease <[email protected]>
  • Loading branch information
Glease authored Jul 23, 2023
1 parent 0dd56b6 commit 070660e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ public void extractInternal(ItemStack equipped, int power) {

@Override
public int canExtractInternal(ItemStack equipped, int power) {
return extractEnergy(equipped, power, true);
return Math.min(getEnergyStored(equipped), power);
}

private boolean isTravelUpgradeActive(EntityPlayer ep, ItemStack equipped) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ public void extractInternal(ItemStack equipped, int power) {

@Override
public int canExtractInternal(ItemStack equipped, int power) {
return extractEnergy(equipped, power, true);
return Math.min(getEnergyStored(equipped), power);
}

private boolean isTravelUpgradeActive(EntityPlayer ep, ItemStack equipped) {
Expand Down

0 comments on commit 070660e

Please sign in to comment.