Class RangeSelectItemModel
java.lang.Object
net.minecraft.client.renderer.item.RangeSelectItemModel
- All Implemented Interfaces:
ItemModel
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordNested classes/interfaces inherited from interface net.minecraft.client.renderer.item.ItemModel
ItemModel.BakingContext -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ItemModelprivate static final intprivate final ItemModel[]private final RangeSelectItemModelPropertyprivate final floatprivate final float[] -
Constructor Summary
ConstructorsConstructorDescriptionRangeSelectItemModel(RangeSelectItemModelProperty pProperty, float pScale, float[] pThresholds, ItemModel[] pModels, ItemModel pFallback) -
Method Summary
Modifier and TypeMethodDescriptionprivate static intlastIndexLessOrEqual(float[] pThresholds, float pValue) voidupdate(ItemStackRenderState p_387732_, ItemStack p_386891_, ItemModelResolver p_388786_, ItemDisplayContext p_387570_, ClientLevel p_388512_, LivingEntity p_388280_, int p_388577_)
-
Field Details
-
LINEAR_SEARCH_THRESHOLD
private static final int LINEAR_SEARCH_THRESHOLD- See Also:
-
property
-
scale
private final float scale -
thresholds
private final float[] thresholds -
models
-
fallback
-
-
Constructor Details
-
RangeSelectItemModel
RangeSelectItemModel(RangeSelectItemModelProperty pProperty, float pScale, float[] pThresholds, ItemModel[] pModels, ItemModel pFallback)
-
-
Method Details
-
lastIndexLessOrEqual
private static int lastIndexLessOrEqual(float[] pThresholds, float pValue) -
update
public void update(ItemStackRenderState p_387732_, ItemStack p_386891_, ItemModelResolver p_388786_, ItemDisplayContext p_387570_, @Nullable ClientLevel p_388512_, @Nullable LivingEntity p_388280_, int p_388577_)
-