MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / isActive

Method isActive

launcher/minecraft/Library.cpp:241–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239}
240
241bool Library::isActive(const RuntimeContext & runtimeContext) const
242{
243 bool result = true;
244 if (m_rules.empty())
245 {
246 result = true;
247 }
248 else
249 {
250 RuleAction ruleResult = Disallow;
251 for (auto rule : m_rules)
252 {
253 RuleAction temp = rule->apply(this, runtimeContext);
254 if (temp != Defer)
255 ruleResult = temp;
256 }
257 result = result && (ruleResult == Allow);
258 }
259 if (isNative())
260 {
261 result = result && !getCompatibleNative(runtimeContext).isNull();
262 }
263 return result;
264}
265
266bool Library::isLocal() const
267{

Callers 7

eventFilterMethod · 0.45
updateButtonStatesMethod · 0.45
createMethod · 0.45
applyLibraryMethod · 0.45
applyMavenFileMethod · 0.45
applyAgentMethod · 0.45

Calls 2

emptyMethod · 0.45
applyMethod · 0.45

Tested by

no test coverage detected