Class ExtrudedModelGenerator
java.lang.Object
com.petrolpark.client.rendering.model.extruded.ExtrudedModelGenerator
Largely copied from
ItemModelGenerator.- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.client.renderer.block.model.BlockModelgenerateExtrudedModel(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 anExtrudedModel.
-
Field Details
-
TOP_TEXTURE_KEY
- See Also:
-
SIDE_TEXTURE_KEY
- See Also:
-
BOTTOM_TEXTURE_KEY
- See Also:
-
REQUIRED_TEXTURE_KEYS
-
-
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 anExtrudedModel. The extrusion takes place in the z direction.- Parameters:
mask- TheMaskto useminZ-maxZ- Should be >minZtopUV- The UV coordinates for the top texture, were themaskto just cover the whole Block (i.e.(0, 0)to(16, 16)). This will be used to decide how to map thetopandbottomtextures to the resulting south and north faces.spriteGetter-baseModel- ABlockModelcontaining noelements, but thespecifying the texturestop,sideandbottom. Thesidetexture should be 16x16 and will be tiled, but the top and bottom textures will not be, so they need to be large enough for thetopUV, when fit to themask, to still fit. Can optionally specify texturestop_1,top_2, etc. that will be layered on top with the corresponding tint index (bottom,sideandtopwill have tint index0).
-