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 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.private boolean
private void
refreshAt
(long section) void
requestRefresh
(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 givenBlockEntity
must be in the level owning this manager -
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
-
refreshAt
private void refreshAt(long section) -
isOtherThread
private boolean isOtherThread()
-