介绍
Zenworks is my collection of ZenScript utility methods for CraftTweaker. I add a method when one of my own scripts needs it, so the methods are a mixed set and do not follow one theme. Other script authors may find them useful too. The current methods work with potion effects and nearby players.
Zenworks adds no items, blocks, or recipes, and changes nothing until a script calls one of its methods.
AI usage disclaimer: This mod was developed with AI-agent assistance using this agent workflow. The project owner reviewed the work during development.
Methods
- addPotionEffectById: gives a living entity a potion effect named by a string, such as
"minecraft:haste", so a script can pick the potion while the game runs. Returns whether the effect changed. - getPotionAmplifierById: reads the level of an entity’s potion effect by its id, or
-1when the entity does not have it. - getPlayersInRadius: finds the living players within a distance of any entity.
- asPlayer: turns an entity into a player for player methods, or gives
nullwhen it is not a player.
A wrong argument, such as an unknown potion id, writes one clear error to crafttweaker.log that names the method, the value, and the script line.
Documentation
The method catalog lists every method with its exact signature and a working example, and shows the CraftTweaker way for needs CraftTweaker already meets.
Installation
Install Zenworks and CraftTweaker on both the client and the server.
Source: github.com/mahghuuuls/zenworks
常见问题
Zenworks 支持哪些 Minecraft 版本?
Zenworks 支持 Minecraft Java 版 1.12.2,可用的加载器:Forge。下载时注意选择和你游戏版本一致的文件。
Zenworks 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。
Mahghuuuls 的其他作品
查看全部 →Inventory Tweaks Remove Settings Button Config
Fork of the mod Inventory Tweaks that adds a single config option to remove the "..." buttons from GUIs
TreeChopper Durability Config
Fork of MrDuchy's TreeChopper mod, it adds a single config option to reduce (or increase) the durability loss of the axe when a tree is chopped whole.
Just Another Wizardry Mana System
Replaces Electroblob’s Wizardry wand mana with a deeply configurable player mana system
CTSetBonus
CraftTweaker integration with Set Bonus mod.
评论
登录后评论和评分