Class FluidModel.CachingBakedFluid

java.lang.Object
net.minecraftforge.client.model.FluidModel.BakedFluid
net.minecraftforge.client.model.FluidModel.CachingBakedFluid
All Implemented Interfaces:
BakedModel, IForgeBakedModel
Enclosing class:
FluidModel

private static final class FluidModel.CachingBakedFluid extends FluidModel.BakedFluid
  • Field Details

  • Constructor Details

  • Method Details

    • getCorners

      private static int[] getCorners(Optional<IModelData> stateOption)
      Gets the quantized fluid levels for each corner. Each value is packed into 10 bits of the model key, so max range is [0,1024). The value is currently stored/interpreted as the closest multiple of 1/864. The divisor is chosen here to allows likely flow values to be exactly representable while also providing good use of the available value range. (For fluids with default quanta, this evenly divides the per-block intervals of 1/9 by 96)
    • getFlow

      private static int getFlow(Optional<IModelData> stateOption)
      Gets the quantized flow direction of the fluid. This value comprises 11 bits of the model key, and is signed, so the max range is [-1024,1024). The value is currently stored as the angle rounded to the nearest degree. A value of -1000 is used to signify no flow.
    • getOverlay

      private static boolean[] getOverlay(Optional<IModelData> stateOption)
      Gets the overlay texture flag for each side. This value determines if the fluid "overlay" texture should be used for that side, instead of the normal "flowing" texture (if applicable for that fluid). The sides are stored here by their regular horizontal index.
    • getQuads

      public List<BakedQuad> getQuads(@Nullable BlockState state, @Nullable Direction side, Random rand, IModelData modelData)