public void accumulateWeight(IntegerResult<WeightNode> weight) {
        ensureState(State.ACCUMULATING);
        if (this.weight.isNull() || weight.intResult() > this.weight.intResult()) {
            this.weight = weight;
        }
    }
"Completes" the accumulator, preventing any further changes.

Also performs some final processing on the accumulators state, before
data is read.
common/src/main/java/me/lucko/luckperms/common/cacheddata/type/MetaAccumulator.java