-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1fc0e03
commit 3f5be78
Showing
4 changed files
with
3 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 1 addition & 24 deletions
25
src/main/java/org/lins/mmmjjkx/rykenslimefuncustomizer/objects/machine/MachineRecord.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,3 @@ | ||
package org.lins.mmmjjkx.rykenslimefuncustomizer.objects.machine; | ||
|
||
import io.github.thebusybiscuit.slimefun4.core.machines.MachineOperation; | ||
|
||
public record MachineRecord(int capacity, int totalTicks) implements MachineOperation { | ||
private static int progress = 0; | ||
|
||
@Override | ||
public void addProgress(int i) { | ||
if (progress >= totalTicks) { | ||
progress = i; | ||
return; | ||
} | ||
progress += i; | ||
} | ||
|
||
@Override | ||
public int getProgress() { | ||
return progress; | ||
} | ||
|
||
@Override | ||
public int getTotalTicks() { | ||
return totalTicks; | ||
} | ||
} | ||
public record MachineRecord(int capacity) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters