Skip to content

Commit

Permalink
Minor API Changes for 0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Outspending committed Dec 29, 2023
1 parent b15e2a1 commit 7a6da81
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 17 deletions.
8 changes: 8 additions & 0 deletions src/main/java/me/outspending/biomesapi/BiomeHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import lombok.experimental.UtilityClass;
import me.outspending.biomesapi.annotations.AsOf;
import me.outspending.biomesapi.exceptions.UnknownBiomeException;
import net.minecraft.world.level.biome.Biome;
import org.bukkit.Location;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

Expand Down Expand Up @@ -59,4 +61,10 @@ public static boolean isBiome(@NotNull BiomeResourceKey resourceKey) {
return getBiome(resourceKey) != null;
}

// TODO: Add a method to get a biome from a location
@AsOf("0.0.2")
public static @Nullable CustomBiome getBiome(@NotNull Location location) {
return null;
}

}
8 changes: 4 additions & 4 deletions src/main/java/me/outspending/biomesapi/BiomeSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public static final class Builder {
* @return The Builder object, for chaining method calls.
*/
@AsOf("0.0.1")
public @NotNull Builder depth(float depth) {
public @NotNull Builder depth(@Range(from = 0, to = 25) float depth) {
this.depth = depth;
return this;
}
Expand All @@ -80,7 +80,7 @@ public static final class Builder {
* @return The Builder object, for chaining method calls.
*/
@AsOf("0.0.1")
public @NotNull Builder scale(float scale) {
public @NotNull Builder scale(@Range(from = 0, to = 25) float scale) {
this.scale = scale;
return this;
}
Expand All @@ -93,7 +93,7 @@ public static final class Builder {
* @return The Builder object, for chaining method calls.
*/
@AsOf("0.0.1")
public @NotNull Builder temperature(float temperature) {
public @NotNull Builder temperature(@Range(from = 0, to = 25) float temperature) {
this.temperature = temperature;
return this;
}
Expand All @@ -106,7 +106,7 @@ public static final class Builder {
* @return The Builder object, for chaining method calls.
*/
@AsOf("0.0.1")
public @NotNull Builder downfall(float downfall) {
public @NotNull Builder downfall(@Range(from = 0, to = 25) float downfall) {
this.downfall = downfall;
return this;
}
Expand Down
13 changes: 0 additions & 13 deletions src/main/java/me/outspending/biomesapi/BiomeUpdater.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,6 @@ public static void updateChunk(@NotNull Chunk chunk) {
updateChunks(List.of(chunk));
}

/**
* Updates the biome of a chunk within a certain distance.
* This method is a convenience method that calls the updateChunks method with a list containing the chunk and the specified distance.
*
* @param chunk The chunk to update.
* @param distance The distance.
* @version 0.0.1
*/
@AsOf("0.0.1")
public static void updateChunk(@NotNull Chunk chunk, int distance) {
updateChunks(List.of(chunk));
}

/**
* Updates the biomes of the chunks between two locations.
* This method is a convenience method that calls the updateChunks method with the chunks between the 'from' and 'to' locations.
Expand Down

0 comments on commit 7a6da81

Please sign in to comment.