mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-18 23:01:03 +00:00
use TypeToken for registries
This commit is contained in:
+5
-2
@@ -7,6 +7,7 @@ import com.dfsek.terra.api.config.ConfigFactory;
|
||||
import com.dfsek.terra.api.config.ConfigPack;
|
||||
import com.dfsek.terra.api.config.ConfigType;
|
||||
import com.dfsek.terra.api.registry.OpenRegistry;
|
||||
import com.dfsek.terra.api.util.TypeToken;
|
||||
import com.dfsek.terra.api.util.seeded.SeededTerraBiome;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
@@ -15,6 +16,8 @@ public class BiomeConfigType implements ConfigType<BiomeTemplate, SeededTerraBio
|
||||
private final ConfigPack pack;
|
||||
private final BiomeFactory factory;
|
||||
|
||||
public static final TypeToken<SeededTerraBiome> BIOME_TYPE_TOKEN = new TypeToken<>() {};
|
||||
|
||||
public BiomeConfigType(ConfigPack pack) {
|
||||
this.pack = pack;
|
||||
this.factory = new BiomeFactory(pack);
|
||||
@@ -31,8 +34,8 @@ public class BiomeConfigType implements ConfigType<BiomeTemplate, SeededTerraBio
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<SeededTerraBiome> getTypeClass() {
|
||||
return SeededTerraBiome.class;
|
||||
public TypeToken<SeededTerraBiome> getTypeClass() {
|
||||
return BIOME_TYPE_TOKEN;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user