Class DynamicFluidContainerModel
java.lang.Object
net.neoforged.neoforge.client.model.item.DynamicFluidContainerModel
- All Implemented Interfaces:
ItemModel
A dynamic fluid container model, capable of re-texturing itself at runtime to match the contained fluid.
Composed of a base layer, a fluid layer (applied with a mask) and a cover layer (optionally applied with a mask). The entire model may optionally be flipped if the fluid is gaseous, and the fluid layer may glow if light-emitting.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordNested classes/interfaces inherited from interface ItemModel
ItemModel.BakingContext -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ItemModel.BakingContextprivate static final Transformationprivate static final ModelDebugNameprivate static final Transformationprivate final ItemTransformsprivate static final RenderTypeprivate static final RenderTypeprivate static final RenderTypeprivate static final RenderTypeprivate final DynamicFluidContainerModel.Unbaked -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateDynamicFluidContainerModel(DynamicFluidContainerModel.Unbaked unbakedModel, ItemModel.BakingContext bakingContext) -
Method Summary
Modifier and TypeMethodDescriptionprivate ItemModelbakeModelForFluid(Fluid fluid) private static BakedQuadsetMaxEmissivity(BakedQuad quad, ModelBaker.Interner interner) voidupdate(ItemStackRenderState renderState, ItemStack stack, ItemModelResolver modelResolver, ItemDisplayContext displayContext, @Nullable ClientLevel level, @Nullable ItemOwner owner, int seed)
-
Field Details
-
FLUID_TRANSFORM
-
COVER_TRANSFORM
-
DEBUG_NAME
-
RENDER_TYPE_CUTOUT_UNLIT_BLOCK
-
RENDER_TYPE_CUTOUT_UNLIT_ITEM
-
RENDER_TYPE_TRANSLUCENT_UNLIT_BLOCK
-
RENDER_TYPE_TRANSLUCENT_UNLIT_ITEM
-
unbakedModel
-
bakingContext
-
itemTransforms
-
cache
-
-
Constructor Details
-
DynamicFluidContainerModel
private DynamicFluidContainerModel(DynamicFluidContainerModel.Unbaked unbakedModel, ItemModel.BakingContext bakingContext)
-
-
Method Details
-
bakeModelForFluid
-
setMaxEmissivity
-
update
public void update(ItemStackRenderState renderState, ItemStack stack, ItemModelResolver modelResolver, ItemDisplayContext displayContext, @Nullable ClientLevel level, @Nullable ItemOwner owner, int seed)
-