Advancements - roidrole/Roids-Tweaker GitHub Wiki

Allows manipulation of advancements (vanilla and modded).

This file contains :

AdvancementHelper

This is needed to get advancements by ID.

Import:

import mods.ctintegration.advancement.AdvancementHelper;
Method Description
static IAdvancement getAdvancementById(IServer server, String id) Get an IAdvancement with the given id, may return null.
static List<IAdvancement> getAdvancements(IServer server) Get a list of all advancements

IAdvancement

import mods.ctintegration.advancement.IAdvancement;
Method return type description
getId string resource location of the advancement
getDisplayText ITextComponent
getTitle ITextComponent
getDescription ITextComponent
getRequirements string[][]
getRequirementCount int
getChildren List<IAdvancement>
getCriterion List<String>
getParent IAdvancement
Method Description
void applyRewards(IPlayer player) Give the advancement rewards to a player

IAdvancementProgress

Indicates the progress of an advancement.

You can get it from an IPlayer

Import:

import mods.ctintegration.advancement.IAdvancementProgress;
Method Parameters Return Type
isDone [None] bool
hasProgress [None] bool
grantCriterion criterion as string bool
revokeCriterion criterion as string bool
getCompletedCriteria [None] List<String>
getRemainingCriteria [None] List<String>
getPercent [None] float
getProgressText [None] string
isCriterionObtained criterion as string bool
getCriterionObtainedDate criterion as string IDate
getFirstProgressDate criterion as string IDate
obtainCriterion criterion as string void
resetCriterion criterion as string void
setCompleted [None] bool
resetAll [None] void
⚠️ **GitHub.com Fallback** ⚠️