use of com.warmthdawn.mod.gugu_utils.modularmachenary.requirements.RequirementStarlight in project gugu-utils by ParaParty.
the class RequirementTypeStarlight method gererateRequirementPerTick.
@Override
public ComponentRequirementAdapter.PerTick<Integer> gererateRequirementPerTick(IOType type, JsonObject obj) {
JsonPrimitive constellationStr = tryGet(obj, "constellation", false);
IConstellation constellation = null;
if (constellationStr != null && constellationStr.isString()) {
constellation = ConstellationRegistry.getConstellationByName(constellationStr.getAsString());
if (constellation == null) {
GuGuUtils.logger.warn("Couldn't find constellation " + constellationStr.getAsString());
}
}
return new RequirementStarlight(tryGet(obj, "starlight", true).getAsInt(), constellation, type);
}
Aggregations