Cores
本模组内置了 Core 库。
一款专为 Minecraft 模组开发而设计的库模组。它封装了大量常用且重复的代码块,并提供若干实用功能。
玩家功能
- 属性修复:修改属性的默认、最大和最小值。可通过配置文件进行调整。
- 经验值修复:修改经验值扣除逻辑。在扣除经验等级时,它将精确扣除从 0 级升至目标等级所需的经验点数,而非使用原版计算方式(当前等级 - 目标等级)点数。 上述两项功能均可通过配置文件禁用。
开发者功能
开发者功能
- 配色方案:当使用本模组的
Screen或某些渲染相关代码时,你可以通过更改配色方案来自定义调色板(如下图所示)。 按下 Home 键打开配置界面:
选择一种配色方案:
保存并查看结果:

- 网络监听:监听端口
4444,并在被访问时返回注册内容。
package dev.anye.mc.cores.am.listen;
// For detailed code, please check the dev.anye.mc.cores.am.listen package
// Here is an ImageListen instance
public class ImageListen extends Listen {
protected ImageListen() {
super("assets/cores/html/image/",// Resource path (optional). If provided, files under this path will be automatically loaded upon access.
"image",// Registration path, used to access this instance (e.g., 127.0.0.1:4444/image/index.html)
300// Shutdown timeout (seconds). Closes this listener after a period of inactivity.
);
}
// This method has a default implementation that dispatches POST and GET requests to their respective handlers; you can also override it to implement your own logic.
public void handle(HttpExchange exchange){}
}
// How to register
public class ListenRegister {
// Get registry
public static final Register<Listen> LISTEN_REGISTER = new Register<>(Cores.MOD_ID, "listen", builder -> builder.sync(false));
// Register instances
public static final DeferredHolder<Listen,ImageListen> IMAGE_LISTEN = LISTEN_REGISTER.register("image", ImageListen::new);
//public static final DeferredHolder<Listen,ExampleListen> EXAMPLE_LISTEN = LISTEN_REGISTER.register("example", ExampleListen::new);
// Call this method during mod initialization
public static void register(IEventBus eventBus){
LISTEN_REGISTER.register(eventBus);
}
// Assuming this is your Mod initialization function (constructor)
public Cores(IEventBus modEventBus, ModContainer modContainer) {
ListenRegister.register(modEventBus);
}
}
各版本支持状态
B : 仅修复 Bug
X : 不再更新
U : 更新中
L :低频更新
Trend : U -> L -> B -> X
| Version | Forge | Neoforge | Fabric |
|---|---|---|---|
| 1.20.1 | B | B | X |
| 1.20.2 - 1.21.0 | X | X | X |
| 1.21.1 | B | B | X |
| 1.21.2-26.0 | X | X | X |
| 26.1 | L | L | X |
| 26.2 | U | U | X |
如有任何问题,可在 GitHub 上提问或通过以下方式联系:
Cores
This mod has a built-in Core library.
A library mod developed for Minecraft mod development. It packages numerous frequently used, repetitive code blocks and offers several practical features.
Player Features
- Attribute Fix : Modifies the default, maximum, and minimum values of attributes. This can be adjusted via the configuration file.
- Experience Fix : Modifies experience deduction. When deducting experience levels, it deducts the exact amount of experience points required to level up from level 0 to the target level, instead of using the vanilla calculation of (current level - target level) points. Both of the above features can be disabled via the configuration file.
Developer Features
Developer Features
- Color Schemes : When using this mod's
Screenor certain rendering-related code, you can customize the color palette by changing the color scheme (as shown in the images below). Press the Home key to open the configuration interface:
Select a color scheme:
Save and view the results:

- Network Listening : Listens on port
4444and returns the registered content when accessed by players.
package dev.anye.mc.cores.am.listen;
// For detailed code, please check the dev.anye.mc.cores.am.listen package
// Here is an ImageListen instance
public class ImageListen extends Listen {
protected ImageListen() {
super("assets/cores/html/image/",// Resource path (optional). If provided, files under this path will be automatically loaded upon access.
"image",// Registration path, used to access this instance (e.g., 127.0.0.1:4444/image/index.html)
300// Shutdown timeout (seconds). Closes this listener after a period of inactivity.
);
}
// This method has a default implementation that dispatches POST and GET requests to their respective handlers; you can also override it to implement your own logic.
public void handle(HttpExchange exchange){}
}
// How to register
public class ListenRegister {
// Get registry
public static final Register<Listen> LISTEN_REGISTER = new Register<>(Cores.MOD_ID, "listen", builder -> builder.sync(false));
// Register instances
public static final DeferredHolder<Listen,ImageListen> IMAGE_LISTEN = LISTEN_REGISTER.register("image", ImageListen::new);
//public static final DeferredHolder<Listen,ExampleListen> EXAMPLE_LISTEN = LISTEN_REGISTER.register("example", ExampleListen::new);
// Call this method during mod initialization
public static void register(IEventBus eventBus){
LISTEN_REGISTER.register(eventBus);
}
// Assuming this is your Mod initialization function (constructor)
public Cores(IEventBus modEventBus, ModContainer modContainer) {
ListenRegister.register(modEventBus);
}
}
Support status by version
B : Bug fixes only
X : No further updates
U : Updates
L :Low-frequency updates
Trend : U -> L -> B -> X
| Version | Forge | Neoforge | Fabric |
|---|---|---|---|
| 1.20.1 | B | B | X |
| 1.20.2 - 1.21.0 | X | X | X |
| 1.21.1 | B | B | X |
| 1.21.2-26.0 | X | X | X |
| 26.1 | L | L | X |
| 26.2 | U | U | X |
Any questions can be asked in github or contacted as below:
下载 Cores
下载 Cores
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Cores
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Cores
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Cores
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Cores
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Cores
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Cores
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Cores
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Cores
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
暂无更新日志
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
适用于 MC 1.18+ 的 Effekseer 加载器
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧