mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-19 07:11:14 +00:00
use TypeToken for registries
This commit is contained in:
+5
-2
@@ -8,6 +8,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.world.generator.Palette;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
@@ -17,6 +18,8 @@ public class PaletteConfigType implements ConfigType<PaletteTemplate, Palette> {
|
||||
private final ConfigPack pack;
|
||||
private final TerraPlugin main;
|
||||
|
||||
public static final TypeToken<Palette> PALETTE_TYPE_TOKEN = new TypeToken<>(){};
|
||||
|
||||
public PaletteConfigType(ConfigPack pack, TerraPlugin main) {
|
||||
this.pack = pack;
|
||||
this.main = main;
|
||||
@@ -33,8 +36,8 @@ public class PaletteConfigType implements ConfigType<PaletteTemplate, Palette> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<Palette> getTypeClass() {
|
||||
return Palette.class;
|
||||
public TypeToken<Palette> getTypeClass() {
|
||||
return PALETTE_TYPE_TOKEN;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user