private MeshData getContentMesh(ItemStack contentStack, ITesselatorAPI tesselator) { CurrentModel = EnumKilnModel.Normal; if (contentStack == null) { return(null); } if (contentStack.Collectible is IInKilnMeshSupplier) { EnumKilnModel model = EnumKilnModel.Normal; MeshData mesh = (contentStack.Collectible as IInKilnMeshSupplier).GetMeshWhenInKiln(contentStack, Api.World, Pos, ref model); this.CurrentModel = model; if (mesh != null) { return(mesh); } } if (contentStack.Collectible is IInKilnRendererSupplier) { EnumKilnModel model = (contentStack.Collectible as IInKilnRendererSupplier).GetDesiredKilnModel(contentStack, this, contentStack == outputStack); this.CurrentModel = model; return(null); } InKilnProps renderProps = GetRenderProps(contentStack); if (renderProps != null) { this.CurrentModel = renderProps.UseKilnModel; if (contentStack.Class != EnumItemClass.Item) { MeshData ObjMesh; tesselator.TesselateBlock(contentStack.Block, out ObjMesh); ObjMesh.ModelTransform(renderProps.Transform); return(ObjMesh); } return(null); } return(null); }