Class DensityBufferPool
java.lang.Object
net.minecraft.world.level.levelgen.densityfunction.DensityBufferPool
- All Implemented Interfaces:
DensityBufferArena
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate final List<ScopedDensityBuffer> private static final intprivate final intFields inherited from interface DensityBufferArena
GLOBAL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionacquire(int size) voidclear()voidbooleanisEmpty()voidrelease(ScopedDensityBuffer buffer) (package private) intsize()private @Nullable ScopedDensityBuffertryTakeBest(int minCapacity, int maxCapacity)
-
Field Details
-
BUFFER_SIZE_INCREMENT
private static final int BUFFER_SIZE_INCREMENT- See Also:
-
MAX_REUSE_SIZE_FACTOR
private static final int MAX_REUSE_SIZE_FACTOR- See Also:
-
maxAge
private final int maxAge -
buffers
-
-
Constructor Details
-
DensityBufferPool
public DensityBufferPool(int maxAge)
-
-
Method Details
-
acquire
- Specified by:
acquirein interfaceDensityBufferArena
-
tryTakeBest
-
release
- Specified by:
releasein interfaceDensityBufferArena
-
garbageCollect
public void garbageCollect() -
clear
public void clear() -
size
int size() -
isEmpty
public boolean isEmpty()
-