介绍
QuestsTweaker
A mod to integrate FTBQuests with CraftTweaker.
Features
- Add/set progress for an existing quest from crafttweaker.
- New ‘Function’ task type that runs a crafttweaker function to check progress.
- New ‘Function’ reward type that runs a crafttweaker funtion on completion.
CraftTweaker API
mods.questtweaker.QuestManager
Add/set progress for any existing and available task from crafttweaker:
When the task is unavailable (for example has dependencies uncompleted), this function does nothing.
QuestManager.addTaskProgress(IPlayer player, string/int id, long progress);
QuestManager.setTaskProgress(IPlayer player, string/int id, long progress);
import mods.questtweaker.QuestManager;
// Add progress
// IPlayer player, string/int id, long progress
QuestManager.addTaskProgress(event.player,"4c4bd563",1 as long);
// Or use hex int
QuestManager.addTaskProgress(event.player,0x4c4bd563,1 as long);
// Set progress
// IPlayer player, string/int id, long progress
QuestManager.setTaskProgress(event.player,"4c4bd563",1 as long);
Example when player pickups an item, set the task progress to stack size:
import mods.questtweaker.QuestManager;
events.onPlayerPickupItem(function(event as crafttweaker.event.PlayerPickupItemEvent){
QuestManager.setTaskProgress(event.player,"52725826",event.item.item.amount as long);
});
mods.questtweaker.FunctionManager
Add a new function to use with this mod’s ‘Function’ tasks and rewards:
FunctionManager.addFunction(string functionID, function(IPlayer) -> long);
The function must return an long.
Example 1: Player’s current altitude
import mods.queststweaker.FunctionManager;
import crafttweaker.player.IPlayer;
// string functionID, function(IPlayer) -> long
FunctionManager.addFunction("height",function(player as IPlayer){
return player.y as long;
});
Example 2: On a Rail on_a_rail.zs
FTBQuests Integration
Function Task
Executes a function peridocally, and uses its return value as the progress.
Parameters:
- Function ID: the function ID registered in scripts.
- Value: The value needed to complete the task.
- Interval: The interval to run the function. Set to 0 for manual submission.
Function Reward
Executes a function when collected.
Parameters:
- Function ID: the function ID registered in scripts.
Dummy Task
Does nothing on its own. Intended to use with the QuestManager above.
Parameters:
- Value: The value needed to complete the task.
常见问题
Quests Tweaker 支持哪些 Minecraft 版本?
Quests Tweaker 支持 Minecraft Java 版 1.12.2,可用的加载器:Forge。下载时注意选择和你游戏版本一致的文件。
Quests Tweaker 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端和服务端都要装。
Blue-Beaker 的其他作品
查看全部 →No Block Particles
移除1.8~1.18版本中的大部分方块粒子效果。
Backpack Display
A mod to show what's in your backpacks, drawers, or any similar containers
Better Trading Menu
Enhance the villager GUI for legacy versions of Minecraft.
MTE Patches
Fix bugs and add useful patches for various mods.
评论
登录后评论和评分