Skip to content

Commit

Permalink
Fix whitespace [skip actions]
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 18, 2022
1 parent 026ef9c commit 96da4b6
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 98 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class CompoundData extends GameResource {
private int id;

@Override
public int getId(){return this.id;}
public int getId() {return this.id;}
@Getter private int groupId;
@Getter private int rankLevel;
@Getter private boolean isDefaultUnlocked;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/emu/grasscutter/data/excels/CookRecipeData.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ public class CookRecipeData extends GameResource {
@Getter List<ItemParamData> inputVec;

@Override
public int getId() {
return this.id;
}
public int getId() {
return this.id;
}
@Override
public void onLoad() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,88 +4,88 @@

@Entity
public class ActiveForgeData {
private int forgeId;
private int avatarId;
private int count;

private int startTime;
private int forgeTime;

private int lastUnfinishedCount;
private boolean changed;

public int getFinishedCount(int currentTime) {
int timeDelta = currentTime - this.startTime;
int finishedCount = timeDelta / this.forgeTime;

return Math.min(finishedCount, this.count);
}

public int getUnfinishedCount(int currentTime) {
return this.count - this.getFinishedCount(currentTime);
}

public int getNextFinishTimestamp(int currentTime) {
return
(currentTime >= this.getTotalFinishTimestamp())
? this.getTotalFinishTimestamp()
: (this.getFinishedCount(currentTime) * this.forgeTime + this.forgeTime + this.startTime);
}

public int getTotalFinishTimestamp() {
return this.startTime + this.forgeTime * this.count;
}

public int getForgeId() {
return this.forgeId;
}
public void setForgeId(int value) {
this.forgeId = value;
}

public int getAvatarId() {
return this.avatarId;
}
public void setAvatarId(int value) {
this.avatarId = value;
}

public int getCount() {
return count;
}
public void setCount(int value) {
this.count = value;
}

public int getStartTime() {
return this.startTime;
}
public void setStartTime(int value) {
this.startTime = value;
}

public int getForgeTime() {
return this.forgeTime;
}
public void setForgeTime(int value) {
this.forgeTime = value;
}

public boolean isChanged() {
return this.changed;
}
public void setChanged(boolean value) {
this.changed = value;
}

public boolean updateChanged(int currentTime) {
int currentUnfinished = this.getUnfinishedCount(currentTime);

if (currentUnfinished != this.lastUnfinishedCount) {
this.changed = true;
this.lastUnfinishedCount = currentUnfinished;
}

return this.changed;
}
private int forgeId;
private int avatarId;
private int count;

private int startTime;
private int forgeTime;

private int lastUnfinishedCount;
private boolean changed;

public int getFinishedCount(int currentTime) {
int timeDelta = currentTime - this.startTime;
int finishedCount = timeDelta / this.forgeTime;

return Math.min(finishedCount, this.count);
}

public int getUnfinishedCount(int currentTime) {
return this.count - this.getFinishedCount(currentTime);
}

public int getNextFinishTimestamp(int currentTime) {
return
(currentTime >= this.getTotalFinishTimestamp())
? this.getTotalFinishTimestamp()
: (this.getFinishedCount(currentTime) * this.forgeTime + this.forgeTime + this.startTime);
}

public int getTotalFinishTimestamp() {
return this.startTime + this.forgeTime * this.count;
}

public int getForgeId() {
return this.forgeId;
}
public void setForgeId(int value) {
this.forgeId = value;
}

public int getAvatarId() {
return this.avatarId;
}
public void setAvatarId(int value) {
this.avatarId = value;
}

public int getCount() {
return count;
}
public void setCount(int value) {
this.count = value;
}

public int getStartTime() {
return this.startTime;
}
public void setStartTime(int value) {
this.startTime = value;
}

public int getForgeTime() {
return this.forgeTime;
}
public void setForgeTime(int value) {
this.forgeTime = value;
}

public boolean isChanged() {
return this.changed;
}
public void setChanged(boolean value) {
this.changed = value;
}

public boolean updateChanged(int currentTime) {
int currentUnfinished = this.getUnfinishedCount(currentTime);

if (currentUnfinished != this.lastUnfinishedCount) {
this.changed = true;
this.lastUnfinishedCount = currentUnfinished;
}

return this.changed;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ private static void queryCurrentRegion(Context ctx) {

String key_id = ctx.queryParam("key_id");

if(key_id == null)
if (key_id == null)
throw new Exception("Key ID was not set");

Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
import it.unimi.dsi.fastutil.ints.Int2IntMap;

public class PacketDestroyMaterialRsp extends BasePacket {
public PacketDestroyMaterialRsp(Int2IntMap returnMaterialMap) {
super(PacketOpcodes.DestroyMaterialRsp);

public PacketDestroyMaterialRsp(Int2IntMap returnMaterialMap) {
super(PacketOpcodes.DestroyMaterialRsp);

var proto = DestroyMaterialRsp.newBuilder();

returnMaterialMap.forEach((id, count) -> {
proto.addItemIdList(id);
proto.addItemCountList(count);
});
this.setData(proto);
}

this.setData(proto);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public PacketForgeStartRsp(Retcode retcode) {

ForgeStartRsp proto = ForgeStartRsp.newBuilder()
.setRetcode(retcode.getNumber())
.build();
.build();

this.setData(proto);
}
Expand Down

0 comments on commit 96da4b6

Please sign in to comment.