Skip to content

Commit

Permalink
Fix tests due to biome string change
Browse files Browse the repository at this point in the history
  • Loading branch information
benwoo1110 committed Jan 28, 2025
1 parent 40cafbd commit e83f909
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ public void registerBiomeProviderParser(@NotNull String key, @NotNull BiomeProvi
}

public BiomeProvider parseBiomeProvider(@NotNull String worldName, @NotNull String biomeProviderString) {
if (biomeProviderString.isEmpty()) {
return null;
}
if (biomeProviderString.startsWith("@")) {
String[] split = biomeProviderString.split(":", 2);
BiomeProviderParser biomeProviderParser = biomeProviderParsers.get(split[0]);
Expand Down
8 changes: 4 additions & 4 deletions src/test/resources/default_worlds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ world:
currency: '@vault-economy'
environment: normal
gamemode: survival
biome: '@vanilla'
biome: ''
generator: ''
hidden: false
hunger: true
Expand Down Expand Up @@ -42,7 +42,7 @@ world:
tick-rate: -1
exceptions: []
world-blacklist: []
version: 1.0
version: 1.1
world_nether:
adjust-spawn: false
alias: ''
Expand All @@ -59,7 +59,7 @@ world_nether:
currency: '@vault-economy'
environment: nether
gamemode: survival
biome: '@vanilla'
biome: ''
generator: ''
hidden: false
hunger: true
Expand Down Expand Up @@ -87,4 +87,4 @@ world_nether:
tick-rate: -1
exceptions: []
world-blacklist: []
version: 1.0
version: 1.1
4 changes: 2 additions & 2 deletions src/test/resources/delete_worlds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ world_nether:
currency: '@vault-economy'
environment: nether
gamemode: survival
biome: '@vanilla'
biome: ''
generator: ''
hidden: false
hunger: true
Expand Down Expand Up @@ -42,4 +42,4 @@ world_nether:
tick-rate: -1
exceptions: []
world-blacklist: []
version: 1.0
version: 1.1
8 changes: 4 additions & 4 deletions src/test/resources/edgecase_worlds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ world:
currency: dirt # should be parsed to @minecraft:dirt
environment: normal
gamemode: sUrvivAl # random casing shouldn't affect parsing
biome: '@vanilla'
biome: ''
generator: ''
hidden: false
hunger: true
Expand Down Expand Up @@ -45,7 +45,7 @@ world:
- a
- 1
- 2
version: 1.0
version: 1.1
world_nether:
adjust-spawn: false
alias: ''
Expand All @@ -61,7 +61,7 @@ world_nether:
currency: '@vault-economy'
environment: nether
gamemode: survival
biome: '@vanilla'
biome: ''
generator: ''
hidden: false
hunger: true
Expand Down Expand Up @@ -89,4 +89,4 @@ world_nether:
tick-rate: -1
exceptions: []
world-blacklist: []
version: 1.0
version: 1.1
8 changes: 4 additions & 4 deletions src/test/resources/migrated_worlds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ world_the_end:
currency: '@vault-economy'
environment: the_end
gamemode: survival
biome: '@vanilla'
biome: ''
generator: ''
hidden: false
hunger: true
Expand Down Expand Up @@ -42,7 +42,7 @@ world_the_end:
tick-rate: -1
exceptions: []
world-blacklist: []
version: 1.0
version: 1.1
world:
adjust-spawn: true
alias: ''
Expand All @@ -59,7 +59,7 @@ world:
currency: DIRT
environment: normal
gamemode: survival
biome: '@vanilla'
biome: ''
generator: ''
hidden: false
hunger: true
Expand Down Expand Up @@ -88,4 +88,4 @@ world:
exceptions: []
world-blacklist:
- test
version: 1.0
version: 1.1
12 changes: 6 additions & 6 deletions src/test/resources/newworld_worlds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ world:
currency: '@vault-economy'
environment: normal
gamemode: survival
biome: '@vanilla'
biome: ''
generator: ''
hidden: false
hunger: true
Expand Down Expand Up @@ -42,7 +42,7 @@ world:
tick-rate: -1
exceptions: []
world-blacklist: []
version: 1.0
version: 1.1
world_nether:
adjust-spawn: false
alias: ''
Expand All @@ -59,7 +59,7 @@ world_nether:
currency: '@vault-economy'
environment: nether
gamemode: survival
biome: '@vanilla'
biome: ''
generator: ''
hidden: false
hunger: true
Expand Down Expand Up @@ -87,7 +87,7 @@ world_nether:
tick-rate: -1
exceptions: []
world-blacklist: []
version: 1.0
version: 1.1
newworld:
adjust-spawn: false
alias: ''
Expand All @@ -97,7 +97,7 @@ newworld:
auto-heal: true
auto-load: true
bed-respawn: true
biome: '@vanilla'
biome: '@error'
difficulty: normal
entry-fee:
enabled: false
Expand Down Expand Up @@ -127,4 +127,4 @@ newworld:
tick-rate: -1
exceptions: []
world-blacklist: []
version: 1.0
version: 1.1
8 changes: 4 additions & 4 deletions src/test/resources/properties_worlds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ world:
currency: @vault-economy
environment: NORMAL
gamemode: SURVIVAL
biome: '@vanilla'
biome: ''
generator: ''
hidden: false
hunger: true
Expand Down Expand Up @@ -42,7 +42,7 @@ world:
tick-rate: -1
exceptions: []
world-blacklist: []
version: 1.0
version: 1.1
world_nether:
adjust-spawn: false
alias: ''
Expand All @@ -59,7 +59,7 @@ world_nether:
currency: @vault-economy
environment: NETHER
gamemode: SURVIVAL
biome: '@vanilla'
biome: ''
generator: ''
hidden: false
hunger: true
Expand All @@ -82,4 +82,4 @@ world_nether:
tick-rate: -1
exceptions: []
world-blacklist: []
version: 1.0
version: 1.1
8 changes: 4 additions & 4 deletions src/test/resources/updated_worlds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ world:
currency: '@vault-economy'
environment: normal
gamemode: survival
biome: '@vanilla'
biome: ''
generator: ''
hidden: false
hunger: true
Expand Down Expand Up @@ -42,7 +42,7 @@ world:
tick-rate: -1
exceptions: []
world-blacklist: []
version: 1.0
version: 1.1
world_nether:
adjust-spawn: false
alias: ''
Expand All @@ -59,7 +59,7 @@ world_nether:
currency: '@vault-economy'
environment: nether
gamemode: survival
biome: '@vanilla'
biome: ''
generator: ''
hidden: false
hunger: true
Expand Down Expand Up @@ -87,4 +87,4 @@ world_nether:
tick-rate: -1
exceptions: []
world-blacklist: []
version: 1.0
version: 1.1

0 comments on commit e83f909

Please sign in to comment.