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 pRenderState, ItemStack pStack, ItemModelResolver pItemModelResolver, ItemDisplayContext pDisplayContext, ClientLevel pLevel, LivingEntity pEntity, int pSeed)
-
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 pRenderState, ItemStack pStack, ItemModelResolver pItemModelResolver, ItemDisplayContext pDisplayContext, @Nullable ClientLevel pLevel, @Nullable LivingEntity pEntity, int pSeed)
-