Skip to content

Commit

Permalink
Tweak Sterling Generator
Browse files Browse the repository at this point in the history
  • Loading branch information
falseresync committed Jul 29, 2019
1 parent bb39ff4 commit 0a672ee
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
import javax.annotation.Nullable;

public class SterlingGeneratorBlockEntity extends AbstractMachineBlockEntity {
private static final int GENERATE_PER_TICK = 1;
private static final int TICK_PER_GENERATE = 5;
private static final int GENERATE_PER_FRAME = 1;
private static final int TICKS_PER_FRAME = 4;
private int burnTime = 0;
private int burnTimeTotal = 0;
private final PropertyDelegate propertyDelegate = new PropertyDelegate() {
Expand Down Expand Up @@ -82,7 +82,7 @@ protected boolean canInsertEnergy() {
protected void serverTick() {
if (burnTime > 0) {
burnTime--;
if (burnTime % TICK_PER_GENERATE == 0) energy.insertEnergy(Vivatech.INFINITE_VOLTAGE, GENERATE_PER_TICK, Simulation.ACTION);
if (burnTime % TICKS_PER_FRAME == 0) energy.insertEnergy(Vivatech.INFINITE_VOLTAGE, GENERATE_PER_FRAME, Simulation.ACTION);
} else if (inventory.get(0).getCount() > 0 && energy.getCurrentEnergy() < energy.getMaxEnergy()) {
burnTime = FurnaceBlockEntity.createFuelTimeMap().getOrDefault(inventory.get(0).getItem(), 0) / 2;
burnTimeTotal = burnTime;
Expand Down

0 comments on commit 0a672ee

Please sign in to comment.