介绍
CXD’s Utilities
Instalation
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
filter {
includeGroup "maven.modrinth"
}
}
}
dependencies {
implementation "maven.modrinth:t9HzrmQg:<version_id>"
}
Replace with an actual Version ID. (Ex. For 1.0-26.2, the Version ID is “2k1jbG7k”)
Q: Where do I find the Version ID?
A: Go to the version you want install and then click on “Developer information”. You should find the Version ID there.

Mob Effects
CXD’s Utils adds 3 classes related to Mob Effects:
CustomEffectDurationCustomEffectTooltipStatusEffectBackground
CustomEffectDuration
CustomEffectDuration lets you set a custom duration text for Mob Effects.
public class YourMobEffect extends MobEffect implements CustomEffectDuration {
<...>
@Override
public Component getDurationText(MobEffectInstance instance) {
return Component.literal("Hi!!! This is an Example!")
.withStyle(style -> style.withColor(0xFFFFFF));
}
}
Instead of showing how long the effect lasts, it will display:
Hi!!! This is an Example!
CustomEffectTooltip
CustomEffectTooltip lets you add a custom tooltip to Mob Effects.
public class YourMobEffect extends MobEffect implements CustomEffectTooltip {
<...>
@Override
public List<Component> getTooltipLines(MobEffectInstance instance) {
return List.of(
Component.literal("This Text will appear when you hover over the Effect!")
.withStyle(ChatFormatting.WHITE),
Component.literal("It also supports multiple lines!")
.withStyle(ChatFormatting.WHITE)
);
}
}
When hovering over the Mob Effect, the custom tooltip text will appear.
StatusEffectBackground
CustomEffectTooltip lets you add a custom texture to your MobEffect’s background.
public class YourMobEffect extends MobEffect implements StatusEffectBackground {
<...>
@Override
public Identifier inventorySprite() {
return Identifier.fromNamespaceAndPath(YourMod.MOD_ID, "container/inventory/
effect_background");
}
@Override
public Identifier ambientInventorySprite() {
return Identifier.fromNamespaceAndPath(YourMod.MOD_ID, "container/inventory/
effect_background_ambient");
}
}
Check https://mcasset.cloud/26.1.2/assets/minecraft/textures/gui/sprites/container/inventory to see how Minecraft does the effect backgrounds. This uses the same logic.
常见问题
Calyren’s Utils 支持哪些 Minecraft 版本?
Calyren’s Utils 支持 Minecraft Java 版 26.2–26.3,共 2 个版本,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。
Calyren’s Utils 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端和服务端都要装。
Calyren 的其他作品
查看全部 →
Strongheld
将世界中的要塞数量上限限制为三个。需要安装 Yung's Better Strongholds 才能运行。
Dominium
为 Minecraft 加入灵魂魔法和灵魂所有权的模组,灵感来自 Charter & Mason's Decor。
Ratchel – Caverns & Chasms
Caverns & Chasms 的附属模组,添加了可轻松存放老鼠的老鼠背包。
Arsenal Fixes
这个模组修复了 Arsenal 的一些问题。
评论
登录后评论和评分