added "Kostil" in Location (sorry)
This commit is contained in:
@@ -9,6 +9,7 @@ import lombok.Setter;
|
|||||||
import mc.core.exception.ResourceUnloadedException;
|
import mc.core.exception.ResourceUnloadedException;
|
||||||
import mc.core.world.World;
|
import mc.core.world.World;
|
||||||
import mc.core.world.chunk.Chunk;
|
import mc.core.world.chunk.Chunk;
|
||||||
|
import mc.core.world.chunk.ChunkSection;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.lang.ref.Reference;
|
import java.lang.ref.Reference;
|
||||||
@@ -71,6 +72,15 @@ public class Location implements Serializable, Cloneable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ChunkSection getChunkSection() {
|
||||||
|
World world;
|
||||||
|
if ((world = getWorld()) == null) {
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
return world.getChunk(getBlockX(), getBlockY(), getBlockZ());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Location clone() {
|
public Location clone() {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user