File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
src/main/java/io/github/thebusybiscuit/slimefun4/utils/biomes Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 5
5
import java .io .InputStreamReader ;
6
6
import java .nio .charset .StandardCharsets ;
7
7
import java .util .EnumMap ;
8
+ import java .util .HashMap ;
8
9
import java .util .Map ;
9
10
import java .util .stream .Collectors ;
10
11
@@ -45,7 +46,7 @@ public class BiomeMap<T> implements Keyed {
45
46
/**
46
47
* Our internal {@link EnumMap} holding all the data.
47
48
*/
48
- private final Map <Biome , T > dataMap = new EnumMap <>(Biome . class );
49
+ private final Map <Biome , T > dataMap = new HashMap <>();
49
50
50
51
/**
51
52
* The {@link NamespacedKey} to identify this {@link BiomeMap}.
Original file line number Diff line number Diff line change 1
1
package io .github .thebusybiscuit .slimefun4 .utils .biomes ;
2
2
3
- import java .util .EnumMap ;
4
- import java .util .EnumSet ;
3
+ import java .util .HashMap ;
4
+ import java .util .HashSet ;
5
5
import java .util .Locale ;
6
6
import java .util .Map ;
7
7
import java .util .Set ;
@@ -40,7 +40,7 @@ public class BiomeMapParser<T> {
40
40
41
41
private final NamespacedKey key ;
42
42
private final BiomeDataConverter <T > valueConverter ;
43
- private final Map <Biome , T > map = new EnumMap <>(Biome . class );
43
+ private final Map <Biome , T > map = new HashMap <>();
44
44
45
45
/**
46
46
* This flag specifies whether the parsing is "lenient" or not.
@@ -159,7 +159,7 @@ private void readEntry(@Nonnull JsonObject entry) throws BiomeMapException {
159
159
160
160
private @ Nonnull Set <Biome > readBiomes (@ Nonnull JsonArray array ) throws BiomeMapException {
161
161
Validate .notNull (array , "The JSON array should not be null!" );
162
- Set <Biome > biomes = EnumSet . noneOf ( Biome . class );
162
+ Set <Biome > biomes = new HashSet <>( );
163
163
164
164
for (JsonElement element : array ) {
165
165
if (element .isJsonPrimitive () && element .getAsJsonPrimitive ().isString ()) {
You can’t perform that action at this time.
0 commit comments