Class CompositeShape
- Namespace
- Vintagestory.API.Common
- Assembly
- VintagestoryAPI.dll
public class CompositeShape
- Inheritance
-
CompositeShape
- Inherited Members
Fields
Alternates
The block shape may consists of any amount of alternatives, one of which will be randomly chosen when the block is placed in the world.
public CompositeShape[] Alternates
Field Value
BakedAlternates
Includes the base shape
public CompositeShape[] BakedAlternates
Field Value
Base
public AssetLocation Base
Field Value
Format
public EnumShapeFormat Format
Field Value
InsertBakedTextures
Whether or not to insert baked in textures for mesh formats such as gltf into the texture atlas.
public bool InsertBakedTextures
Field Value
Overlays
public CompositeShape[] Overlays
Field Value
QuantityElements
If non zero will only tesselate the first n elements of the shape
public int? QuantityElements
Field Value
- int?
Scale
public float Scale
Field Value
SelectiveElements
If set will only tesselate elements with given name
public string[] SelectiveElements
Field Value
- string[]
VoxelizeTexture
If true, the shape is created from a voxelized version of the first defined texture
public bool VoxelizeTexture
Field Value
offsetX
public float offsetX
Field Value
offsetY
public float offsetY
Field Value
offsetZ
public float offsetZ
Field Value
rotateX
public float rotateX
Field Value
rotateY
public float rotateY
Field Value
rotateZ
public float rotateZ
Field Value
Properties
OffsetXYZCopy
public Vec3f OffsetXYZCopy { get; }
Property Value
RotateXYZCopy
public Vec3f RotateXYZCopy { get; }
Property Value
Methods
Clone()
Creates a deep copy of the composite shape
public CompositeShape Clone()
Returns
CloneWithoutAlternates()
Creates a deep copy of the shape, but omitting its alternates (used to populate the alternates)
public CompositeShape CloneWithoutAlternates()
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
LoadAlternates(IAssetManager, ILogger)
Expands the Composite Shape and populates the Baked field
public void LoadAlternates(IAssetManager assetManager, ILogger logger)
Parameters
assetManager
IAssetManagerlogger
ILogger