Skip to content

Commit

Permalink
Fix failed tests caused by new biome property
Browse files Browse the repository at this point in the history
  • Loading branch information
benwoo1110 committed Jan 5, 2025
1 parent 71e47d2 commit ddedf2c
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import com.dumptruckman.minecraft.util.Logging;
import com.google.common.collect.Lists;
import jakarta.inject.Inject;
import org.bukkit.NamespacedKey;
import org.bukkit.Registry;
import org.bukkit.World;
import org.bukkit.WorldType;
Expand Down Expand Up @@ -68,7 +69,7 @@ class CreateCommand extends CoreCommand {
.filter(biome -> biome !=Biome.CUSTOM)
.map(biome -> biome.getKey().getKey())
.toList())
.context(Biome::valueOf)
.context(biomeStr -> Registry.BIOME.get(NamespacedKey.minecraft(biomeStr)))
.build());

@Inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.dumptruckman.minecraft.util.Logging;
import com.google.common.collect.Lists;
import jakarta.inject.Inject;
import org.bukkit.NamespacedKey;
import org.bukkit.Registry;
import org.bukkit.World;
import org.bukkit.block.Biome;
Expand Down Expand Up @@ -52,7 +53,7 @@ class ImportCommand extends CoreCommand {
.filter(biome -> biome !=Biome.CUSTOM)
.map(biome -> biome.getKey().getKey())
.toList())
.context(Biome::valueOf)
.context(biomeStr -> Registry.BIOME.get(NamespacedKey.minecraft(biomeStr)))
.build());

@Inject
Expand Down
2 changes: 2 additions & 0 deletions src/test/resources/default_worlds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ world:
currency: '@vault-economy'
environment: NORMAL
gamemode: SURVIVAL
biome: '@vanilla'
generator: ''
hidden: false
hunger: true
Expand Down Expand Up @@ -51,6 +52,7 @@ world_nether:
currency: '@vault-economy'
environment: NETHER
gamemode: SURVIVAL
biome: '@vanilla'
generator: ''
hidden: false
hunger: true
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/delete_worlds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ world_nether:
currency: '@vault-economy'
environment: NETHER
gamemode: SURVIVAL
biome: '@vanilla'
generator: ''
hidden: false
hunger: true
Expand Down
2 changes: 2 additions & 0 deletions src/test/resources/migrated_worlds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ world_the_end:
currency: '@vault-economy'
environment: THE_END
gamemode: SURVIVAL
biome: '@vanilla'
generator: ''
hidden: false
hunger: true
Expand Down Expand Up @@ -56,6 +57,7 @@ world:
currency: '@vault-economy'
environment: NORMAL
gamemode: SURVIVAL
biome: '@vanilla'
generator: ''
hidden: false
hunger: true
Expand Down
3 changes: 3 additions & 0 deletions src/test/resources/newworld_worlds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ world:
currency: '@vault-economy'
environment: NORMAL
gamemode: SURVIVAL
biome: '@vanilla'
generator: ''
hidden: false
hunger: true
Expand Down Expand Up @@ -51,6 +52,7 @@ world_nether:
currency: '@vault-economy'
environment: NETHER
gamemode: SURVIVAL
biome: '@vanilla'
generator: ''
hidden: false
hunger: true
Expand Down Expand Up @@ -82,6 +84,7 @@ newworld:
auto-heal: true
auto-load: true
bed-respawn: true
biome: '@vanilla'
difficulty: NORMAL
entry-fee:
enabled: false
Expand Down
2 changes: 2 additions & 0 deletions src/test/resources/properties_worlds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ world:
currency: @vault-economy
environment: NORMAL
gamemode: SURVIVAL
biome: '@vanilla'
generator: ''
hidden: false
hunger: true
Expand Down Expand Up @@ -56,6 +57,7 @@ world_nether:
currency: @vault-economy
environment: NETHER
gamemode: SURVIVAL
biome: '@vanilla'
generator: ''
hidden: false
hunger: true
Expand Down

0 comments on commit ddedf2c

Please sign in to comment.