跳到正文

Sanityfy

作者:TygrysGames

Adds Sanity to Minecraft for you to use

收藏

介绍

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

Sanityfy

Sanityfy is a tool for mod developers that adds a simple Sanity attribute.

On its own Sanityfy just adds an Attribute with a value from -1000 to 1000 and default 100 that is added to every entity.

How to use it

To use Sanityfy you need some basic Java knowledge.

The mod adds xyz.tygrysgames.sanityfy.procedures.SanityControlerProcedure that you can use to run 6 functions:

  • addSanity(Entity entity, double value) – adds value to current sanity of entity
  • removeSanity(Entity entity, double value) – removes value from current sanity of entity
  • devideSanity(Entity entity, double value) – devides current sanity of entity by value
  • multiplySanity(Entity entity, double value) – multiplies current sanity of entity by value
  • setSanity(Entity entity, double value) – sets current sanity of entity to value
  • getSanity(Entity entity) – returns current sanity of entity, if something goes wrong it will return -1001 or cause error

If you want to use this mod in your project remember about adding dependency to your .mods.toml and build.gradle

It is recommended to use 100 as the maximum sanity, since if there will be any mod installed which uses different number, your mods can fight about which one should be the default/maximum sanity.

常见问题

Sanityfy 支持哪些 Minecraft 版本?

Sanityfy 支持 Minecraft Java 版 1.21.1–1.21.11,共 11 个版本,可用的加载器:NeoForge。下载时注意选择和你游戏版本一致的文件。

Sanityfy 怎么安装?

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

评论

登录后评论和评分

TygrysGames 的其他作品

查看全部 →