Class ModelDataManager
java.lang.Object
net.neoforged.neoforge.client.model.data.ModelDataManager
- Direct Known Subclasses:
ModelDataManager.Active,ModelDataManager.Snapshot
public abstract sealed class ModelDataManager
extends Object
permits ModelDataManager.Active, ModelDataManager.Snapshot
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe active manager owned by the client's level and operated on the main client thread.static final classA 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. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract @Nullable ModelDataReturns theModelDatastored for the given position ornullif none is present.abstract ModelDatagetAtOrEmpty(BlockPos pos) Returns theModelDatastored for the given position orModelData.EMPTYif none is present.static voidonChunkUnload(ChunkEvent.Unload event) abstract ModelDataManager.SnapshotsnapshotSectionRegion(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.
-
Constructor Details
-
ModelDataManager
ModelDataManager()
-
-
Method Details
-
getAt
Returns theModelDatastored for the given position ornullif none is present.- Parameters:
pos- The position to query- Returns:
- the
ModelDatastored for the given position ornullif none is present
-
getAtOrEmpty
Returns theModelDatastored for the given position orModelData.EMPTYif none is present.- Parameters:
pos- The position to query- Returns:
- the
ModelDatastored for the given position orModelData.EMPTYif none is present
-
snapshotSectionRegion
@Internal public abstract ModelDataManager.Snapshot 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.- Throws:
IllegalArgumentException- if this is a snapshot and the given region doesn't match the snapshot's region
-
onChunkUnload
-