Skip to content

Commit

Permalink
change from record
Browse files Browse the repository at this point in the history
  • Loading branch information
Jsinco committed Aug 19, 2024
1 parent 6783c03 commit 817ddac
Showing 1 changed file with 39 additions and 9 deletions.
48 changes: 39 additions & 9 deletions src/main/java/com/dre/brewery/storage/records/BreweryMiscData.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,48 @@
/**
* Miscellaneous save data about brewery.
* These were added by the original author(s) and their source/usage hasn't been completely
* read through.
* <p>
* These params may not be correct:
* @param installTime The time brewery was installed
* @param mcBarrelTime The time it takes for a barrel to brew
* @param prevSaveSeeds Previous save seeds
* @param brewsCreated Brews created. Implementers need to store the hashcode of this list.
* @param brewsCreatedHash Hashcode of brews created
* read through by me.
*/
public record BreweryMiscData(long installTime, long mcBarrelTime, List<Long> prevSaveSeeds, List<Integer> brewsCreated, int brewsCreatedHash) implements SerializableThing {
public class BreweryMiscData implements SerializableThing {

private long installTime;
private long mcBarrelTime;
private List<Long> prevSaveSeeds;
private List<Integer> brewsCreated;
private int brewsCreatedHash;


public BreweryMiscData(long installTime, long mcBarrelTime, List<Long> prevSaveSeeds, List<Integer> brewsCreated, int brewsCreatedHash) {
this.installTime = installTime;
this.mcBarrelTime = mcBarrelTime;
this.prevSaveSeeds = prevSaveSeeds;
this.brewsCreated = brewsCreated;
this.brewsCreatedHash = brewsCreatedHash;
}

@Override
public String getId() {
return "misc";
}


public long installTime() {
return installTime;
}

public long mcBarrelTime() {
return mcBarrelTime;
}

public List<Long> prevSaveSeeds() {
return prevSaveSeeds;
}

public List<Integer> brewsCreated() {
return brewsCreated;
}

public int brewsCreatedHash() {
return brewsCreatedHash;
}
}

0 comments on commit 817ddac

Please sign in to comment.