blob: 82d844bcbe52b9d2ddcba8fe6c8485059094b992 [file] [log] [blame] [raw]
package net.querz.io;
public abstract class MaxDepthIO {
public int decrementMaxDepth(int maxDepth) {
if (maxDepth < 0) {
throw new IllegalArgumentException("negative maximum depth is not allowed");
} else if (maxDepth == 0) {
throw new MaxDepthReachedException("reached maximum depth of NBT structure");
}
return --maxDepth;
}
}