public override void Initialize(ICoreAPI api)
        {
            base.Initialize(api);

            if (contentsLeft != null)
            {
                contentsLeft.ResolveBlockOrItem(api.World);
            }
            if (contentsRight != null)
            {
                contentsRight.ResolveBlockOrItem(api.World);
            }

            block = api.World.BlockAccessor.GetBlock(pos);

            if (api is ICoreClientAPI)
            {
                ICoreClientAPI capi = (ICoreClientAPI)api;
                capi.Event.RegisterRenderer(ingotRenderer = new IngotMoldRenderer(pos, capi), EnumRenderStage.Opaque);

                UpdateIngotRenderer();

                if (meshesByQuantity == null)
                {
                    GenMeshes();
                }
            }


            RegisterGameTickListener(OnGameTick, 50);
        }
        public override void OnBlockRemoved()
        {
            base.OnBlockRemoved();

            if (ingotRenderer != null)
            {
                ingotRenderer.Unregister();
                ingotRenderer = null;
            }
        }
        public override void OnBlockRemoved()
        {
            base.OnBlockRemoved();

            if (ingotRenderer != null)
            {
                ingotRenderer.Dispose();
                ingotRenderer = null;
            }
        }