Package net.minecraftforge.client.model
Class DynamicFluidContainerModel
java.lang.Object
net.minecraftforge.client.model.DynamicFluidContainerModel
- All Implemented Interfaces:
- IUnbakedGeometry<DynamicFluidContainerModel>
public class DynamicFluidContainerModel
extends Object
implements IUnbakedGeometry<DynamicFluidContainerModel>
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.
 Fluid tinting requires registering a separate ItemColor. An implementation is provided in DynamicFluidContainerModel.Colors.
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classprivate static final classstatic final class
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final booleanprivate static final Transformationprivate final booleanprivate final booleanprivate final Fluidprivate static final Transformation
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprivateDynamicFluidContainerModel(Fluid fluid, boolean flipGas, boolean coverIsMask, boolean applyFluidLuminosity) 
- 
Method SummaryModifier and TypeMethodDescriptionbake(IGeometryBakingContext context, ModelBaker baker, Function<Material, TextureAtlasSprite> spriteGetter, ModelState modelState, ItemOverrides overrides, ResourceLocation modelLocation) static RenderTypeGroupgetLayerRenderTypes(boolean unlit) Returns a new ModelDynBucket representing the given fluid, but with the same other properties (flipGas, tint, coverIsMask).Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraftforge.client.model.geometry.IUnbakedGeometrygetConfigurableComponentNames, resolveParents
- 
Field Details- 
FLUID_TRANSFORM
- 
COVER_TRANSFORM
- 
fluid
- 
flipGasprivate final boolean flipGas
- 
coverIsMaskprivate final boolean coverIsMask
- 
applyFluidLuminosityprivate final boolean applyFluidLuminosity
 
- 
- 
Constructor Details- 
DynamicFluidContainerModelprivate DynamicFluidContainerModel(Fluid fluid, boolean flipGas, boolean coverIsMask, boolean applyFluidLuminosity) 
 
- 
- 
Method Details- 
getLayerRenderTypes
- 
withFluidReturns a new ModelDynBucket representing the given fluid, but with the same other properties (flipGas, tint, coverIsMask).
- 
bakepublic BakedModel bake(IGeometryBakingContext context, ModelBaker baker, Function<Material, TextureAtlasSprite> spriteGetter, ModelState modelState, ItemOverrides overrides, ResourceLocation modelLocation) - Specified by:
- bakein interface- IUnbakedGeometry<DynamicFluidContainerModel>
 
 
-