Class ExtrudedModelGenerator

java.lang.Object
com.petrolpark.client.rendering.model.extruded.ExtrudedModelGenerator

public class ExtrudedModelGenerator extends Object
Largely copied from ItemModelGenerator.
See Also:
  • Field Details

  • Constructor Details

    • ExtrudedModelGenerator

      public ExtrudedModelGenerator()
  • Method Details

    • generateExtrudedModel

      public net.minecraft.client.renderer.block.model.BlockModel generateExtrudedModel(Mask mask, float minZ, float maxZ, net.minecraft.client.renderer.block.model.BlockFaceUV topUV, Function<net.minecraft.client.resources.model.Material,net.minecraft.client.renderer.texture.TextureAtlasSprite> spriteGetter, net.minecraft.client.renderer.block.model.BlockModel baseModel)
      Generate an ExtrudedModel. The extrusion takes place in the z direction.
      Parameters:
      mask - The Mask to use
      minZ -
      maxZ - Should be > minZ
      topUV - The UV coordinates for the top texture, were the mask to just cover the whole Block (i.e. (0, 0) to (16, 16)). This will be used to decide how to map the top and bottom textures to the resulting south and north faces.
      spriteGetter -
      baseModel - A BlockModel containing no elements, but the specifying the textures top, side and bottom. The side texture should be 16x16 and will be tiled, but the top and bottom textures will not be, so they need to be large enough for the topUV, when fit to the mask, to still fit. Can optionally specify textures top_1, top_2, etc. that will be layered on top with the corresponding tint index (bottom, side and top will have tint index 0).