mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-17 06:11:24 +00:00
use TypeToken for registries
This commit is contained in:
+4
-2
@@ -6,12 +6,14 @@ 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 java.util.function.Supplier;
|
||||
|
||||
public class OreConfigType implements ConfigType<OreTemplate, Ore> {
|
||||
private final OreFactory factory = new OreFactory();
|
||||
private final ConfigPack pack;
|
||||
public static final TypeToken<Ore> ORE_TYPE_TOKEN = new TypeToken<>(){};
|
||||
|
||||
public OreConfigType(ConfigPack pack) {
|
||||
this.pack = pack;
|
||||
@@ -28,8 +30,8 @@ public class OreConfigType implements ConfigType<OreTemplate, Ore> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<Ore> getTypeClass() {
|
||||
return Ore.class;
|
||||
public TypeToken<Ore> getTypeClass() {
|
||||
return ORE_TYPE_TOKEN;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user