Giter VIP home page Giter VIP logo

justenoughcharacters's Introduction

JustEnoughCharacters

作用

使用这个模组,你可以在市面上绝大部分模组中使用拼音搜索。这包括了各类模组的手册,物流模组的容器,还有各种稀奇古怪的场景。简体和繁体都可以使用。你可以使用原文,全拼,声母的各种组合进行搜索,你可以使用声调或者忽略声调,任何你能想到的组合都可以使用。模组默认使用全拼拼法,也可以通过修改配置切换到注音或者双拼。当然,双拼场景下字形辅助码是不能用的,但是你可以像其他拼法一样使用声调来过滤。任何不支持的模组搜索都欢迎到 issue 区提给我。

尽管有一些个人实现的代码库已经在当前版本支持 config GUI 了,Forge 在当前版本仍然没有官方支持,因此本模组目前也不开放图形化配置。你可以修改配置文件或者使用 /jech 命令来配置。

一个意外的好处是,和 JEI 一同使用时,JEI 的内存占用可能会缩减 100M 左右。

原理

由于核心匹配逻辑已经分离到 PinIn 这个项目了,本模组当前版本的工作原理极为简单。我们只需要将各模组文本匹配相关的代码找到,然后替换成兼容拼音的实现即可。我们将相关的调用位置填写在 generate.py 里,然后基于 Forge 现版本的 coremod 机制,使用脚本直接生成所需的 coremod,编译时打入模组包中即可。当然,有一些模组需要特别的兼容处理,这一部分内容你可以在 这里 找到。

至于 Fabric,我实在没有时间研究如何进行开发了,但是基于 PinIn 的基础上进行开发的话,根据经验来看仍然会是一个小于 1k 行的小项目,这方面欢迎其他人接坑。本项目和 PinIn 的核心匹配逻辑,在肉眼可见的将来我还是会保持维护的,这方面不必担心。

开发

尽管直到目前该项目的贡献者屈指可数,给该项目贡献代码仍然是十分简单的。如果你发现有某个模组不支持拼音搜索,你只需要执行 /jech profile 命令获得一份全量搜索报告,排查该模组相关的调用栈(需要亿点点技巧),然后提交上来即可。当然,如果能力有限,直接把模组名甩给我也是欢迎的。

致谢

  • 本模组更新到 1.16 的绝大部分工作是由 yzl210 完成的。
  • 本模组更新到 1.18 的绝大部分工作是由 yzl210vfyjxf 完成的。
  • 本模组对于 1.16 的一吨 mod 的支持是由 Death-123 完成的。
  • 本模组的核心库 PinIn 中使用的拼音数据来自于 地球拼音pinyin-data

justenoughcharacters's People

Contributors

death-123 avatar kuropeach avatar towdium avatar vfyjxf avatar yzl210 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.