нет биома? значит будет PLAINS
This commit is contained in:
@@ -2,6 +2,7 @@ package mc.core.world;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@@ -71,7 +72,7 @@ public enum Biome {
|
||||
MUTATED_MESA_CLEAR_ROCK(167);
|
||||
|
||||
public static Biome getById(final int id) {
|
||||
return Arrays.stream(Biome.values()).filter(biome -> biome.id == id).findFirst().orElseThrow(IllegalArgumentException::new);
|
||||
return Arrays.stream(Biome.values()).filter(biome -> biome.id == id).findFirst().orElse(Biome.PLAINS);
|
||||
}
|
||||
|
||||
@Getter
|
||||
|
||||
Reference in New Issue
Block a user