Skip to content

Commit

Permalink
Update BiomeSetter.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Outspending committed Dec 29, 2023
1 parent 967a471 commit b15e2a1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/java/me/outspending/biomesapi/BiomeSetter.java
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,10 @@ public static void setRegionBiome(
@NotNull CustomBiome customBiome,
boolean updateBiome
) {
NamespacedKey key = customBiome.toNamespacedKey();
PointRange3D range = PointRange3D.of(from, to);

Optional<NMS> nms = NMSHandler.getNMS();
nms.ifPresent(n -> n.updateBiome(range.getMinLocation(world), range.getMaxLocation(world), key.getNamespace(), key.getKey()));

nms.ifPresent(n -> n.updateBiome(range.getMinLocation(world), range.getMaxLocation(world), customBiome.toNamespacedKey()));

if (updateBiome) {
BiomeUpdater.updateChunks(from, to);
Expand Down

0 comments on commit b15e2a1

Please sign in to comment.