Class ModelDataManager.Active
java.lang.Object
net.neoforged.neoforge.client.model.data.ModelDataManager
net.neoforged.neoforge.client.model.data.ModelDataManager.Active
- Enclosing class:
- ModelDataManager
The active manager owned by the client's level and operated on the main client thread.
Users should not be instantiating this themselves unless they know what they're doing.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.client.model.data.ModelDataManager
ModelDataManager.Active, ModelDataManager.Snapshot -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable ModelDataReturns theModelDatastored for the given position ornullif none is present.getAtOrEmpty(BlockPos pos) Returns theModelDatastored for the given position orModelData.EMPTYif none is present.private booleanprivate voidrefreshAt(long section) voidrequestRefresh(BlockEntity blockEntity) Request a refresh of the stored data for the givenBlockEntity.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
-
owningThread
-
level
-
needModelDataRefresh
-
modelDataCache
private final it.unimi.dsi.fastutil.longs.Long2ObjectMap<it.unimi.dsi.fastutil.longs.Long2ObjectMap<ModelData>> modelDataCache
-
-
Constructor Details
-
Active
-
-
Method Details
-
requestRefresh
Request a refresh of the stored data for the givenBlockEntity. The givenBlockEntitymust be in the level owning this manager -
getAt
Description copied from class:ModelDataManagerReturns theModelDatastored for the given position ornullif none is present.- Specified by:
getAtin classModelDataManager- Parameters:
pos- The position to query- Returns:
- the
ModelDatastored for the given position ornullif none is present
-
getAtOrEmpty
Description copied from class:ModelDataManagerReturns theModelDatastored for the given position orModelData.EMPTYif none is present.- Specified by:
getAtOrEmptyin classModelDataManager- Parameters:
pos- The position to query- Returns:
- the
ModelDatastored for the given position orModelData.EMPTYif none is present
-
snapshotSectionRegion
public ModelDataManager.Snapshot snapshotSectionRegion(int sectionMinX, int sectionMinY, int sectionMinZ, int sectionMaxX, int sectionMaxY, int sectionMaxZ) Description copied from class:ModelDataManagerSnapshot the state of this manager for all sections in the volume specified by the given section coordinates.- Specified by:
snapshotSectionRegionin classModelDataManager
-
refreshAt
private void refreshAt(long section) -
isOtherThread
private boolean isOtherThread()
-