Entity config
This commit is contained in:
parent
66c2506fa3
commit
e741edd739
1 changed files with 10 additions and 6 deletions
|
@ -1,19 +1,23 @@
|
||||||
package ru.betterend.config;
|
package ru.betterend.config;
|
||||||
|
|
||||||
public class Configs {
|
public class Configs {
|
||||||
public static final IdConfig ITEM_CONFIG = new IdConfig("items", (item, category) -> {
|
public static final IdConfig ITEM_CONFIG = new IdConfig("items", (itemId, category) -> {
|
||||||
return new ConfigKey(item.getNamespace(), category, item.getPath());
|
return new ConfigKey(itemId.getNamespace(), category, itemId.getPath());
|
||||||
});
|
});
|
||||||
public static final IdConfig BLOCK_CONFIG = new IdConfig("blocks", (block, category) -> {
|
public static final IdConfig BLOCK_CONFIG = new IdConfig("blocks", (blockId, category) -> {
|
||||||
return new ConfigKey(block.getNamespace(), category, block.getPath());
|
return new ConfigKey(blockId.getNamespace(), category, blockId.getPath());
|
||||||
});
|
});
|
||||||
public static final IdConfig BIOME_CONFIG = new IdConfig("biomes", (biome, entry) -> {
|
public static final IdConfig BIOME_CONFIG = new IdConfig("biomes", (biomeId, entry) -> {
|
||||||
return new ConfigKey(biome.getNamespace(), biome.getPath(), entry);
|
return new ConfigKey(biomeId.getNamespace(), biomeId.getPath(), entry);
|
||||||
|
});
|
||||||
|
public static final IdConfig ENTITY_CONFIG = new IdConfig("entities", (entityId, category) -> {
|
||||||
|
return new ConfigKey(entityId.getNamespace(), category, entityId.getPath());
|
||||||
});
|
});
|
||||||
|
|
||||||
public static void saveConfigs() {
|
public static void saveConfigs() {
|
||||||
ITEM_CONFIG.saveChanges();
|
ITEM_CONFIG.saveChanges();
|
||||||
BLOCK_CONFIG.saveChanges();
|
BLOCK_CONFIG.saveChanges();
|
||||||
BIOME_CONFIG.saveChanges();
|
BIOME_CONFIG.saveChanges();
|
||||||
|
ENTITY_CONFIG.saveChanges();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue