mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-30 21:17:53 +01:00
Rename registry resource enum
This commit is contained in:
parent
ec6bcf2d01
commit
8dff4227eb
@ -97,13 +97,11 @@ final class EntityTypeLoader {
|
||||
|
||||
static {
|
||||
// Load data from file
|
||||
JsonObject entities = Registry.load(Registry.Resource.ENTITY);
|
||||
JsonObject entities = Registry.load(Registry.Resource.ENTITIES);
|
||||
entities.entrySet().forEach(entry -> {
|
||||
final String namespace = entry.getKey();
|
||||
final JsonObject entityObject = entry.getValue().getAsJsonObject();
|
||||
|
||||
final var metaSupplier = ENTITY_META_SUPPLIER.get(namespace);
|
||||
|
||||
final var entityType = new EntityTypeImpl(Registry.entity(namespace, entityObject, null));
|
||||
ENTITY_ID_MAP.put(entityType.id(), entityType);
|
||||
NAMESPACE_MAP.put(namespace, entityType);
|
||||
|
@ -53,7 +53,7 @@ final class BlockLoader {
|
||||
|
||||
static {
|
||||
// Load data from file
|
||||
JsonObject blocks = Registry.load(Registry.Resource.BLOCK);
|
||||
JsonObject blocks = Registry.load(Registry.Resource.BLOCKS);
|
||||
blocks.entrySet().forEach(entry -> {
|
||||
final String blockNamespace = entry.getKey();
|
||||
final JsonObject blockObject = entry.getValue().getAsJsonObject();
|
||||
|
@ -45,7 +45,7 @@ final class MaterialLoader {
|
||||
|
||||
static {
|
||||
// Load data from file
|
||||
JsonObject materials = Registry.load(Registry.Resource.ITEM);
|
||||
JsonObject materials = Registry.load(Registry.Resource.ITEMS);
|
||||
materials.entrySet().forEach(entry -> {
|
||||
final String namespace = entry.getKey();
|
||||
final JsonObject materialObject = entry.getValue().getAsJsonObject();
|
||||
|
@ -40,9 +40,9 @@ public class Registry {
|
||||
}
|
||||
|
||||
public enum Resource {
|
||||
BLOCK("blocks"),
|
||||
ITEM("items"),
|
||||
ENTITY("entities");
|
||||
BLOCKS("blocks"),
|
||||
ITEMS("items"),
|
||||
ENTITIES("entities");
|
||||
|
||||
private final String name;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user