Table of Contents

Interface IRotatable

Namespace
Vintagestory.API.Common
Assembly
VintagestoryAPI.dll

Implement this interface if schematics containing this block entity needs to modify it's tree attribute data. Beware, this method is called without the block entity existing in the world (yet). The modified tree will then be used to actually create the block

public interface IRotatable

Methods

OnTransformed(IWorldAccessor, ITreeAttribute, int, Dictionary<int, AssetLocation>, Dictionary<int, AssetLocation>, EnumAxis?)

If flipAxis is null it means it was not flipped, only horizontally rotated. Apply flip first, and then rotation.

void OnTransformed(IWorldAccessor worldAccessor, ITreeAttribute tree, int degreeRotation, Dictionary<int, AssetLocation> oldBlockIdMapping, Dictionary<int, AssetLocation> oldItemIdMapping, EnumAxis? flipAxis)

Parameters

worldAccessor IWorldAccessor
tree ITreeAttribute
degreeRotation int
oldBlockIdMapping Dictionary<int, AssetLocation>

Used for rotation of schematics, so microblocks can update their materials

oldItemIdMapping Dictionary<int, AssetLocation>
flipAxis EnumAxis?