Clean up .utils

This commit is contained in:
KingRainbow44
2023-05-20 02:25:49 -04:00
Unverified
parent 51c5cb5c62
commit 1a6fa43367
147 changed files with 623 additions and 291 deletions
@@ -0,0 +1,39 @@
package emu.grasscutter.game.world;
import dev.morphia.annotations.Entity;
import dev.morphia.annotations.Transient;
import lombok.Getter;
import lombok.Setter;
@Entity
public class Location extends Position {
@Transient @Getter @Setter private Scene scene;
public Location(Scene scene, Position position) {
this.set(position);
this.scene = scene;
}
public Location(Scene scene, float x, float y) {
this.set(x, y);
this.scene = scene;
}
public Location(Scene scene, float x, float y, float z) {
this.set(x, y, z);
this.scene = scene;
}
@Override
public Location clone() {
return new Location(this.scene, super.clone());
}
@Override
public String toString() {
return String.format("%s:%s,%s,%s", this.scene.getId(), this.getX(), this.getY(), this.getZ());
}
}