mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-19 02:36:59 +00:00
14 lines
344 B
Java
14 lines
344 B
Java
package net.querz.io;
|
|
|
|
public interface MaxDepthIO {
|
|
|
|
default 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;
|
|
}
|
|
}
|