public override void OnBlockRemoved()
        {
            workitemRenderer?.Dispose();
            workitemRenderer = null;

            dlg?.TryClose();
            dlg?.Dispose();
        }
Esempio n. 2
0
 public override void OnBlockRemoved()
 {
     if (workitemRenderer != null)
     {
         workitemRenderer.Unregister();
         workitemRenderer = null;
     }
 }
        public override void OnBlockRemoved()
        {
            if (workitemRenderer != null)
            {
                workitemRenderer.Unregister();
                workitemRenderer = null;
            }

            dlg?.TryClose();
            dlg?.Dispose();
        }
Esempio n. 4
0
        public override void Initialize(ICoreAPI api)
        {
            base.Initialize(api);

            if (api is ICoreClientAPI)
            {
                ICoreClientAPI capi = (ICoreClientAPI)api;
                workitemRenderer = new KnappingRenderer(pos, capi);

                RegenMeshAndSelectionBoxes();
            }

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