mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-02-07 10:36:41 +01:00
Fix issue with serialized GridPositions
This commit is contained in:
@@ -7,6 +7,7 @@ import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.SneakyThrows;
|
||||
|
||||
@Entity
|
||||
public final class GridPosition implements Serializable {
|
||||
@@ -38,8 +39,13 @@ public final class GridPosition implements Serializable {
|
||||
this.x = xzwidth.get(0);
|
||||
}
|
||||
|
||||
public GridPosition(String str) throws IOException {
|
||||
String[] listOfParams = str.replace(" ", "").replace("(", "").replace(")", "").split(",");
|
||||
@SneakyThrows
|
||||
public GridPosition(String str) {
|
||||
var listOfParams = str
|
||||
.replace(" ", "")
|
||||
.replace("(", "")
|
||||
.replace(")", "")
|
||||
.split(",");
|
||||
if (listOfParams.length != 3)
|
||||
throw new IOException("invalid size on GridPosition definition - ");
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user