跳到正文

RedZone Lib

作者:Xenofate

RedZone Lib is a lightweight library mod that features amazing stuff useful for your development purposes.

收藏

介绍

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

RedZone Lib

RedZone Lib is currently in its early versions. Some features may be glitched, but i’ve tested everything and it seems to work just fine.

 

Current Features

MathUtils: Provides fundamental math functions for game development, including:

    • lerp(): For smooth animations, transitions, and value changes.

    • clamp(): To ensure a number stays within a minimum and maximum value.

ColorUtils: Contains a hexToInt() method to seamlessly convert standard web color codes (like #FF5733) into the integer format Minecraft uses for rendering text and other elements.

 

TextureUtils: A powerful utility for runtime texture manipulation, featuring:

    • createImage(): To generate a new, blank NativeImage.

    • registerDynamicTexture(): To take a NativeImage created in code and register it with Minecraft’s texture manager, making it usable in GUIs.

AbstractWidget System: The foundation of the GUI library. It’s a base class that handles visibility, position, hover detection, and click events, allowing developers to easily create their own custom components.

CustomButton Widget: A ready-to-use implementation of AbstractWidget. It’s a button that can be rendered using custom textures for its normal and hovered states.

WidgetFactory: A simple factory class that streamlines the creation of widgets, starting with createTexturedButton().

 

Access the documentation here

常见问题

RedZone Lib 支持哪些 Minecraft 版本?

RedZone Lib 支持 Minecraft Java 版 1.21.1,可用的加载器:Forge。下载时注意选择和你游戏版本一致的文件。

RedZone Lib 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。

评论

登录后评论和评分