mirror of
https://github.com/BentoBoxWorld/CaveBlock.git
synced 2024-06-26 10:25:05 +02:00
* old generators in new api * add NewMaterialPopulator * forgot to prevent physics loop * I see... the new generator creates caves * apply getMinHeight and getMaxHeight * getMinHeight and getMaxHeight for populators too * summarize * general reformat on populators * small typos * comment sections * small reformat * warning on config * apply new API on BlockPopulator p.1 * apply new API on BlockPopulator p.2 * apply new API on BlockPopulator p.3 (final) * hasAI option
21 lines
640 B
Java
21 lines
640 B
Java
package world.bentobox.caveblock;
|
|
|
|
import org.bukkit.Location;
|
|
|
|
public class Utils {
|
|
|
|
/**
|
|
* Convert chunk location to world location
|
|
*
|
|
* @param x the x coordinate of the chunk location
|
|
* @param y the y coordinate
|
|
* @param z the z coordinate of the chunk location
|
|
* @param chunkX the x coordinate of the chunk
|
|
* @param chunkZ the z coordinate of the chunk
|
|
* @return the world location
|
|
*/
|
|
public static Location getLocationFromChunkLocation(int x, int y, int z, int chunkX, int chunkZ) {
|
|
return new Location(null, x + (chunkX * 16D), y, z + (chunkZ * 16D));
|
|
}
|
|
}
|