mirror of
https://github.com/GTNewHorizons/NotEnoughCharacters.git
synced 2026-11-14 01:04:09 +00:00
增加对新元素的拼音支持
This commit is contained in:
1 parent
3bbb461141
commit
eb1084bb7e
2 files changed
+25
-2
No files matched your search
+1
-1
@@ -4,7 +4,7 @@ org.gradle.daemon=false
|
||||
|
||||
# General Specifications
|
||||
mc_version=1.7.10
|
||||
mod_version=1.4.2
|
||||
mod_version=1.4.3
|
||||
forge_version=10.13.4.1614
|
||||
mod_group=com.github.vfyjxf.nechar
|
||||
mod_id=nechar
|
||||
|
||||
@@ -2,6 +2,7 @@ package net.moecraft.nechar;
|
||||
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import me.towdium.pinin.DictLoader;
|
||||
import me.towdium.pinin.PinIn;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.vfyjxf.nechar.NechConfig;
|
||||
@@ -9,6 +10,7 @@ import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.function.BiConsumer;
|
||||
|
||||
|
||||
@Mod(modid = NotEnoughCharacters.ID, useMetadata = true)
|
||||
@@ -17,8 +19,28 @@ public class NotEnoughCharacters {
|
||||
public static final String VERSION = NotEnoughCharacters.class.getPackage().getImplementationVersion();
|
||||
public static final Logger logger = LogManager.getLogger("NotEnoughCharacters");
|
||||
|
||||
public static final PinIn context = new PinIn();
|
||||
public static final PinIn context = new PinIn(new CustomDictLoader());
|
||||
|
||||
private static class CustomDictLoader extends DictLoader.Default {
|
||||
@Override
|
||||
public void load(BiConsumer<Character, String[]> feed) {
|
||||
super.load(feed);
|
||||
feed.accept('\ue900', new String[]{"lu2", "jinlu"}); // 钅卢
|
||||
feed.accept('\ue901', new String[]{"du4", "jindu"}); //钅杜
|
||||
feed.accept('\ue902', new String[]{"xi3", "jinxi"}); //钅喜
|
||||
feed.accept('\ue903', new String[]{"bo1", "jinbo"}); //钅波
|
||||
feed.accept('\ue904', new String[]{"hei1", "jinhei"}); //钅黑
|
||||
feed.accept('\u9fcf', new String[]{"mai4", "jinmai"});//钅麦
|
||||
feed.accept('\ue906', new String[]{"da2", "jinda"});//钅达
|
||||
feed.accept('\ue907', new String[]{"lun2", "jinlun"});//钅仑
|
||||
feed.accept('\u9fd4', new String[]{"ge1", "jinge"});//钅哥
|
||||
feed.accept('\u9fed', new String[]{"ni3", "jiner"});//钅尔
|
||||
feed.accept('\ue90a', new String[]{"fu1", "jinfu"});//钅夫
|
||||
feed.accept('\ue90c', new String[]{"li4", "jinli"});//钅立
|
||||
feed.accept('\u9fec', new String[]{"tian2", "shitian"});// 石田
|
||||
feed.accept('\u9feb', new String[]{"ao4", "qiao", "aoqi"});//气奥
|
||||
}
|
||||
}
|
||||
|
||||
private static void onConfigChange() {
|
||||
context.config()
|
||||
@@ -31,6 +53,7 @@ public class NotEnoughCharacters {
|
||||
.fU2V(NechConfig.EnableFU2V).commit();
|
||||
}
|
||||
|
||||
|
||||
@Mod.EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
logger.info("Not Enough Characters - v" + VERSION);
|
||||
|
||||
Reference in new issue
Block a user