mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 08:17:35 +00:00
Fix broken build.
This commit is contained in:
1 parent
0a0f3232ea
commit
d3d3bdc769
1 file changed
+7
-4
@@ -22,6 +22,7 @@ package net.minecraftforge.common;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
@@ -35,6 +36,7 @@ public class BiomeManager
|
||||
{
|
||||
private static TrackedList<BiomeEntry>[] biomes = setupBiomes();
|
||||
private static final List<RegistryKey<Biome>> additionalOverworldBiomes = new ArrayList<>();
|
||||
private static final List<RegistryKey<Biome>> additionalOverworldBiomesView = Collections.unmodifiableList(additionalOverworldBiomes);
|
||||
|
||||
private static TrackedList<BiomeEntry>[] setupBiomes()
|
||||
{
|
||||
@@ -101,8 +103,9 @@ public class BiomeManager
|
||||
/**
|
||||
* Add biomes that you add to the overworld without using {@link BiomeManager#addBiome(BiomeType, BiomeEntry)}
|
||||
*/
|
||||
public static void addAdditionalOverworldBiomes(RegistryKey<Biome> biome){
|
||||
if (!"minecraft".equals(biome.func_240901_a_().getNamespace()) && additionalOverworldBiomes.stream().noneMatch(entry -> entry.func_240901_a_().equals(biome.func_240901_a_())))
|
||||
public static void addAdditionalOverworldBiomes(RegistryKey<Biome> biome)
|
||||
{
|
||||
if (!"minecraft".equals(biome.getLocation().getNamespace()) && additionalOverworldBiomes.stream().noneMatch(entry -> entry.getLocation().equals(biome.getLocation())))
|
||||
{
|
||||
additionalOverworldBiomes.add(biome);
|
||||
}
|
||||
@@ -112,7 +115,7 @@ public class BiomeManager
|
||||
{
|
||||
int idx = type.ordinal();
|
||||
List<BiomeEntry> list = idx > biomes.length ? null : biomes[idx];
|
||||
if(list != null)
|
||||
if (list != null)
|
||||
{
|
||||
additionalOverworldBiomes.add(entry.key);
|
||||
return list.add(entry);
|
||||
@@ -132,7 +135,7 @@ public class BiomeManager
|
||||
*/
|
||||
public static List<RegistryKey<Biome>> getAdditionalOverworldBiomes()
|
||||
{
|
||||
return additionalOverworldBiomes;
|
||||
return additionalOverworldBiomesView;
|
||||
}
|
||||
|
||||
public static ImmutableList<BiomeEntry> getBiomes(BiomeType type)
|
||||
|
||||
Reference in new issue
Block a user