public abstract class LanguageProvider extends java.lang.Object implements IDataProvider
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,java.lang.String> |
data |
private DataGenerator |
gen |
private static com.google.gson.Gson |
GSON |
private java.lang.String |
locale |
private java.lang.String |
modid |
HASH_FUNCTION
Constructor and Description |
---|
LanguageProvider(DataGenerator gen,
java.lang.String modid,
java.lang.String locale) |
Modifier and Type | Method and Description |
---|---|
void |
act(DirectoryCache cache) |
void |
add(Biome key,
java.lang.String name) |
void |
add(Block key,
java.lang.String name) |
void |
add(Effect key,
java.lang.String name) |
void |
add(Enchantment key,
java.lang.String name) |
void |
add(EntityType<?> key,
java.lang.String name) |
void |
add(ItemStack key,
java.lang.String name) |
void |
add(Item key,
java.lang.String name) |
void |
add(java.lang.String key,
java.lang.String value) |
void |
addBiome(java.util.function.Supplier<? extends Biome> key,
java.lang.String name) |
void |
addBlock(java.util.function.Supplier<? extends Block> key,
java.lang.String name) |
void |
addEffect(java.util.function.Supplier<? extends Effect> key,
java.lang.String name) |
void |
addEnchantment(java.util.function.Supplier<? extends Enchantment> key,
java.lang.String name) |
void |
addEntityType(java.util.function.Supplier<? extends EntityType<?>> key,
java.lang.String name) |
void |
addItem(java.util.function.Supplier<? extends Item> key,
java.lang.String name) |
void |
addItemStack(java.util.function.Supplier<ItemStack> key,
java.lang.String name) |
protected abstract void |
addTranslations() |
java.lang.String |
getName() |
private void |
save(DirectoryCache cache,
java.lang.Object object,
java.nio.file.Path target) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
save
private static final com.google.gson.Gson GSON
private final java.util.Map<java.lang.String,java.lang.String> data
private final DataGenerator gen
private final java.lang.String modid
private final java.lang.String locale
public LanguageProvider(DataGenerator gen, java.lang.String modid, java.lang.String locale)
protected abstract void addTranslations()
public void act(DirectoryCache cache) throws java.io.IOException
act
in interface IDataProvider
java.io.IOException
public java.lang.String getName()
getName
in interface IDataProvider
private void save(DirectoryCache cache, java.lang.Object object, java.nio.file.Path target) throws java.io.IOException
java.io.IOException
public void addBlock(java.util.function.Supplier<? extends Block> key, java.lang.String name)
public void add(Block key, java.lang.String name)
public void addItem(java.util.function.Supplier<? extends Item> key, java.lang.String name)
public void add(Item key, java.lang.String name)
public void addItemStack(java.util.function.Supplier<ItemStack> key, java.lang.String name)
public void add(ItemStack key, java.lang.String name)
public void addEnchantment(java.util.function.Supplier<? extends Enchantment> key, java.lang.String name)
public void add(Enchantment key, java.lang.String name)
public void addBiome(java.util.function.Supplier<? extends Biome> key, java.lang.String name)
public void add(Biome key, java.lang.String name)
public void addEffect(java.util.function.Supplier<? extends Effect> key, java.lang.String name)
public void add(Effect key, java.lang.String name)
public void addEntityType(java.util.function.Supplier<? extends EntityType<?>> key, java.lang.String name)
public void add(EntityType<?> key, java.lang.String name)
public void add(java.lang.String key, java.lang.String value)