LensColour

基本信息

generators.gregtech5.lenses.LensColour —— GT5 透镜颜色枚举。

⚠️ 可见性:声明为 enum LensColour(包私有,无 public 修饰符), 因此只在本包 com.github.dcysteine.neicustomdiagram.generators.gregtech5.lenses 内可用, 不是对外 API。不要把它当作公共扩展点。

17 个常量

前 16 个取 Blocks.wool 的 meta 0–15,第 17 个 UNIQUE 特殊:

# 枚举 代表物品 # 枚举 代表物品
1 WHITE Blocks.wool 0 10 CYAN Blocks.wool 9
2 ORANGE Blocks.wool 1 11 PURPLE Blocks.wool 10
3 MAGENTA Blocks.wool 2 12 BLUE Blocks.wool 11
4 LIGHT_BLUE Blocks.wool 3 13 BROWN Blocks.wool 12
5 YELLOW Blocks.wool 4 14 GREEN Blocks.wool 13
6 LIME Blocks.wool 5 15 RED Blocks.wool 14
7 PINK Blocks.wool 6 16 BLACK Blocks.wool 15
8 GRAY Blocks.wool 7 17 UNIQUE Items.nether_star 0
9 LIGHT_GRAY Blocks.wool 8

名称翻译

translateColour()(第 45 行)取 Lang.GREGTECH_5_LENSES.trans("colour." + name().toLowerCase().replace("_", "")) —— 即枚举名小写并去掉下划线: LIGHT_BLUE → colour.lightblue,UNIQUE → colour.unique。

颜色按钮

第 52 行的 colourlenseslabel 用 CustomInteractable 生成可点击的颜色槽位, 点击切到该颜色的配方页 —— 见 CustomInteractable。

相关条目

源码

  • src/main/java/com/github/dcysteine/neicustomdiagram/generators/gregtech5/lenses/LensColour.java