Class ModelDataManager.Snapshot
java.lang.Object
net.neoforged.neoforge.client.model.data.ModelDataManager
net.neoforged.neoforge.client.model.data.ModelDataManager.Snapshot
- Enclosing class:
- ModelDataManager
A snapshot of the active manager's state in the specified sections at the point in time when a chunk section was
prepared for re-rendering. Holds an immutable copy of the applicable subset of the active manager's state.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.client.model.data.ModelDataManager
ModelDataManager.Active, ModelDataManager.Snapshot
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ModelDataManager.Snapshot
private final it.unimi.dsi.fastutil.longs.Long2ObjectMap<ModelData>
private final long
private final long
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Snapshot()
(package private)
Snapshot
(ModelDataManager.Active srcManager, int sectionMinX, int sectionMinY, int sectionMinZ, int sectionMaxX, int sectionMaxY, int sectionMaxZ) -
Method Summary
Modifier and TypeMethodDescription@Nullable ModelData
Returns theModelData
stored for the given position ornull
if none is present.getAtOrEmpty
(BlockPos pos) Returns theModelData
stored for the given position orModelData.EMPTY
if none is present.snapshotSectionRegion
(int sectionMinX, int sectionMinY, int sectionMinZ, int sectionMaxX, int sectionMaxY, int sectionMaxZ) Snapshot the state of this manager for all sections in the volume specified by the given section coordinates.Methods inherited from class net.neoforged.neoforge.client.model.data.ModelDataManager
onChunkUnload
-
Field Details
-
EMPTY
-
modelDataCache
-
sectionMin
private final long sectionMin -
sectionMax
private final long sectionMax
-
-
Constructor Details
-
Snapshot
Snapshot(ModelDataManager.Active srcManager, int sectionMinX, int sectionMinY, int sectionMinZ, int sectionMaxX, int sectionMaxY, int sectionMaxZ) -
Snapshot
private Snapshot()
-
-
Method Details
-
getAt
Description copied from class:ModelDataManager
Returns theModelData
stored for the given position ornull
if none is present.- Specified by:
getAt
in classModelDataManager
- Parameters:
pos
- The position to query- Returns:
- the
ModelData
stored for the given position ornull
if none is present
-
getAtOrEmpty
Description copied from class:ModelDataManager
Returns theModelData
stored for the given position orModelData.EMPTY
if none is present.- Specified by:
getAtOrEmpty
in classModelDataManager
- Parameters:
pos
- The position to query- Returns:
- the
ModelData
stored for the given position orModelData.EMPTY
if none is present
-
snapshotSectionRegion
public ModelDataManager.Snapshot snapshotSectionRegion(int sectionMinX, int sectionMinY, int sectionMinZ, int sectionMaxX, int sectionMaxY, int sectionMaxZ) Description copied from class:ModelDataManager
Snapshot the state of this manager for all sections in the volume specified by the given section coordinates.- Specified by:
snapshotSectionRegion
in classModelDataManager
-