Class RegionBitmap
java.lang.Object
net.minecraft.world.level.chunk.storage.RegionBitmap
Keeps track of which parts of a region file are used and which parts are free.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
allocate
(int pSectorCount) Gets a valid offset inside the region file with enough space to store the given amount of sectors and marks that space as used.void
force
(int pSectorOffset, int pSectorCount) Marks a range of 4 KiB sectors relative to the region file as used.void
free
(int pSectorOffset, int pSectorCount) Marks a range of 4 KiB sectors relative to the region file as not used.it.unimi.dsi.fastutil.ints.IntSet
getUsed()
-
Field Details
-
used
-
-
Constructor Details
-
RegionBitmap
public RegionBitmap()
-
-
Method Details
-
force
public void force(int pSectorOffset, int pSectorCount) Marks a range of 4 KiB sectors relative to the region file as used.- Parameters:
pSectorOffset
- The first sector in the range.pSectorCount
- The amount of sectors in the range.
-
free
public void free(int pSectorOffset, int pSectorCount) Marks a range of 4 KiB sectors relative to the region file as not used.- Parameters:
pSectorOffset
- The first sector in the range.pSectorCount
- The amount of sectors in the range.
-
allocate
public int allocate(int pSectorCount) Gets a valid offset inside the region file with enough space to store the given amount of sectors and marks that space as used. -
getUsed
public it.unimi.dsi.fastutil.ints.IntSet getUsed()
-