Archived
0

added "Kostil" in Location (sorry)

This commit is contained in:
2018-08-12 23:40:34 +03:00
parent 0cf51120c0
commit cf7811b906

View File

@@ -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 {