Class ModelData.Builder
java.lang.Object
net.neoforged.neoforge.client.model.data.ModelData.Builder
- Enclosing class:
ModelData
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final int
Hash maps are slower than array maps for *extremely* small maps (empty maps or singletons are the most extreme examples).private Map
<ModelProperty<?>, Object> -
Constructor Summary
-
Method Summary
-
Field Details
-
HASH_THRESHOLD
private static final int HASH_THRESHOLDHash maps are slower than array maps for *extremely* small maps (empty maps or singletons are the most extreme examples). Many block entities/models only use a single model data property, which means the overhead of hashing is quite wasteful. However, we do want to support any number of properties with reasonable performance. Therefore, we use an array map until the number of properties reaches this threshold, at which point we convert it to a hash map.- See Also:
-
properties
-
-
Constructor Details
-
Builder
-
-
Method Details
-
with
-
build
-