Package net.minecraft.nbt
Class NbtAccounter
java.lang.Object
net.minecraft.nbt.NbtAccounter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate static final intprivate final intprivate final longprivate long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccountBytes(long pBytes) Adds the bytes to the current number of read bytes.voidaccountBytes(long pBytesPerItem, long pItems) static NbtAccountercreate(long pQuota) intgetDepth()longgetUsage()voidpopDepth()voidstatic NbtAccounter
-
Field Details
-
MAX_STACK_DEPTH
private static final int MAX_STACK_DEPTH- See Also:
-
quota
private final long quota -
usage
private long usage -
maxDepth
private final int maxDepth -
depth
private int depth
-
-
Constructor Details
-
NbtAccounter
public NbtAccounter(long pQuota, int pMaxDepth)
-
-
Method Details
-
create
-
unlimitedHeap
-
accountBytes
public void accountBytes(long pBytesPerItem, long pItems) -
accountBytes
public void accountBytes(long pBytes) Adds the bytes to the current number of read bytes. If the number of bytes is greater than the stored quota, an exception will occur.- Throws:
RuntimeException- if the number ofusagebytes exceed the number ofquotabytes
-
pushDepth
public void pushDepth() -
popDepth
public void popDepth() -
readUTF
-
getUsage
public long getUsage() -
getDepth
public int getDepth()
-