跳到正文

Lamp’s Utils

作者:lampyt

A library mod primarily for my mods.

收藏

截图

介绍

中文介绍正在准备中,下面暂时显示原文。

Lamp’s Utils

A lightweight utility and library mod for Fabric (Minecraft 1.21.11).

Features

  • Error Block — A decorative/utility block registered under lamps-utils:error_block
  • HTTP Command — /http get <url> fetches data from a URL and displays it in chat, with configurable safety warnings and text length limits
  • Config System — In-game configuration via ModMenu powered by OWO-Lib

Configuration

| Option | Default | Description |
|——–|———|————-|
| showHttpWarning | true | Show a security warning when using the HTTP command |
| maxTextLimit | 300 | Max characters displayed from HTTP responses (100–5000) |

Using as a Library

Lamp’s Utils is available via JitPack.

Add the following to your build.gradle:

repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
    modImplementation 'com.github.lamps-dev:lamps-utils:v1.5.0'
}

Available APIs

Block Registration (ModBlocks)

// Register blocks with automatic item registration
ModBlocks.register("my_block", Block::new, properties, true);

// Access built-in blocks
ModBlocks.ERROR_BLOCK

Configuration (ConfigManager)

// Access config values
ConfigManager.CONFIG.showHttpWarning();
ConfigManager.CONFIG.maxTextLimit();

Command Registration (ModCommands)

// Commands are registered via Fabric's command event
ModCommands.register(dispatcher);

Dependencies

| Dependency | Purpose |
|————|———|
| Fabric API | Required — Core Fabric hooks |
| OWO-Lib | Required — Configuration system |
| ModMenu | Optional — In-game config GUI |

Building from Source

git clone https://github.com/lamps-dev/lamps-utils.git
cd lamps-utils
./gradlew build

The built jar will be in build/libs/.

License

CC0-1.0 — Public Domain

Credits:

Fix icons created by Freepik – Flaticon

Claude AI – Created this README.md and helped me code the mod (its not fully vibecoded don’t worry).

常见问题

Lamp’s Utils 支持哪些 Minecraft 版本?

Lamp’s Utils 支持 Minecraft Java 版 1.21.9–1.21.11,共 3 个版本,可用的加载器:Fabric。下载时注意选择和你游戏版本一致的文件。

Lamp’s Utils 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端和服务端都要装。

评论

登录后评论和评分

lampyt 的其他作品

查看全部 →