Skip to content

Commit

Permalink
Some more documentation/ removing unused imports/pom update for versi…
Browse files Browse the repository at this point in the history
…on 0.1 instead 1.0
  • Loading branch information
Pavel Fedin committed Nov 25, 2016
1 parent 2ad9938 commit 8c7d838
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@
</testResources>

<directory>target</directory>
<finalName>MRegioneer-1.0-SNAPSHOT</finalName>
<finalName>MRegioneer-0.1-SNAPSHOT</finalName>
</build>
</project>
7 changes: 3 additions & 4 deletions src/main/java/ru/wpstuio/amorphine/mcaliases/Region.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.mojang.nbt.CompoundTag;
import com.mojang.nbt.NbtIo;
import net.minecraft.world.level.chunk.storage.RegionFile;
import org.apache.commons.collections4.map.LRUMap;
import ru.wpstuio.amorphine.utils.Coordinates2d;
import ru.wpstuio.amorphine.utils.Formulae;

Expand Down Expand Up @@ -53,7 +52,7 @@ public Chunk[][] getChunks() {

/**
* Returns a chunk with given local coordinates from region
* @param cords
* @param cords XZ coordinates for chunk
* @return
*/
public Chunk getChunk(Coordinates2d cords) {
Expand All @@ -62,7 +61,7 @@ public Chunk getChunk(Coordinates2d cords) {

/**
* Saves given chunk data to region file;
* @param chunk
* @param chunk chunk to be saved to mca-file
* @throws IOException
*/
public void saveChunk(Chunk chunk) throws IOException{
Expand All @@ -79,7 +78,7 @@ public void saveChunk(Chunk chunk) throws IOException{

/**
* Saves given tag as a chunk to mca-file;
* @param cords
* @param cords local XZ coordinates the chunk will be saved to in mca file
* @param tag
* @throws IOException
*/
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/ru/wpstuio/amorphine/mcaliases/World.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ public World(File world_dir) throws IOException {
}
}

/**
* Returns a region with specified coordinates from cache. If it is not in the cache, it is put there.
* @param x
* @param z
* @return
*/
public Region getRegion(int x, int z) {

Coordinates2d cords = new Coordinates2d(x, z);
Expand Down

0 comments on commit 8c7d838

Please sign in to comment.