World info saving
This commit is contained in:
@@ -7,9 +7,11 @@ package mc.core;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@AllArgsConstructor
|
||||
@Data
|
||||
public class Location {
|
||||
public class Location implements Serializable{
|
||||
private double x, y, z;
|
||||
|
||||
public static Location copyOf(Location location) {
|
||||
|
||||
14
core/src/main/java/mc/core/WarpPosition.java
Normal file
14
core/src/main/java/mc/core/WarpPosition.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package mc.core;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import mc.core.player.Look;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public class WarpPosition implements Serializable {
|
||||
private Location location;
|
||||
private Look look;
|
||||
}
|
||||
@@ -7,9 +7,11 @@ package mc.core.player;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public class Look {
|
||||
public class Look implements Serializable{
|
||||
private float yaw, pitch;
|
||||
|
||||
public void set(Look look) {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
package mc.core.world;
|
||||
|
||||
import mc.core.Location;
|
||||
import mc.core.WarpPosition;
|
||||
import mc.core.nbt.Taggable;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -45,14 +46,17 @@ public interface World extends Taggable, Serializable{
|
||||
UUID getWorldId();
|
||||
IWorldType getWorldType();
|
||||
|
||||
Location getSpawn();
|
||||
void setSpawn(Location location);
|
||||
WarpPosition getSpawn();
|
||||
void setSpawn(WarpPosition location);
|
||||
|
||||
Chunk getChunk(int x, int y, int z);
|
||||
void setChunk(int x, int y, int z, Chunk chunk);
|
||||
|
||||
Region getRegion (int x, int z);
|
||||
void setRegion (int x, int z, Region region);
|
||||
Region getRegion(int x, int z);
|
||||
void setRegion(int x, int z, Region region);
|
||||
|
||||
int getSeed ();
|
||||
int getSeed();
|
||||
|
||||
String getName();
|
||||
void setName(String name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user