Sanityfy 图标

Sanityfy

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.0.1
本资源为搬运资源,原资源地址: https://modrinth.com/mod/sanityfy
资源信息

Minecraft 版本: 1.21.1 1.21.2 1.21.3 1.21.4 1.21.5 1.21.6 1.21.7 1.21.8 1.21.9 1.21.10 1.21.11

平台: neoforge

标签: game-mechanics library

资源介绍

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.

下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
Simple Player Statue

价格:0 墨喵币
下载量:0

查看详情
HLStyle - Armors & GUIs

价格:0 墨喵币
下载量:0

查看详情
Skeleton AI Fix

价格:0 墨喵币
下载量:0

查看详情
Coordy

价格:0 墨喵币
下载量:0

查看详情