Skip to content

Commit

Permalink
Fixed Weird BiomeSetter Methods 🍟
Browse files Browse the repository at this point in the history
  • Loading branch information
Outspending committed Dec 29, 2023
1 parent a363404 commit 5fdb1d4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ allprojects {
groupId = "com.github.Outspending"
artifactId = project.name


if (usesReobfuscatedJar()) artifact(reobfBuildFile)
from(components["java"])
}
Expand Down
26 changes: 24 additions & 2 deletions src/main/java/me/outspending/biomesapi/BiomeSetter.java
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public static void setBoundingBoxBiome(@NotNull World world, @NotNull BoundingBo
@AsOf("0.0.1")
public static void setRegionBiome(@NotNull Location from, @NotNull Location to, @NotNull CustomBiome customBiome) {
if (from.getWorld().equals(to.getWorld())) {
setRegionBiome(from.getWorld(), from.toVector(), to.toVector(), customBiome);
setRegionBiome(from.getWorld(), from, to, customBiome, true);
return;
}

Expand Down Expand Up @@ -221,7 +221,29 @@ public static void setRegionBiome(@NotNull Location from, @NotNull Location to,
*/
@AsOf("0.0.1")
public static void setRegionBiome(@NotNull World world, @NotNull Vector from, @NotNull Vector to, @NotNull CustomBiome customBiome) {
setRegionBiome(world, from.toLocation(world), to.toLocation(world), customBiome, false);
setRegionBiome(world, from, to, customBiome, false);
}

/**
* Sets the biome of a region to a custom biome.
* This method is a convenience method that calls the setRegionBiome method with the 'updateBiome' flag set to false.
*
* @param world the world
* @param from the starting vector
* @param to the ending vector
* @param customBiome the custom biome
* @param updateBiome a flag indicating whether to update the biome of the region immediately
* @version 0.0.1
*/
@AsOf("0.0.2")
public static void setRegionBiome(
@NotNull World world,
@NotNull Vector from,
@NotNull Vector to,
@NotNull CustomBiome customBiome,
boolean updateBiome
) {
setRegionBiome(world, from.toLocation(world), to.toLocation(world), customBiome, updateBiome);
}

/**
Expand Down

0 comments on commit 5fdb1d4

Please sign in to comment.