Skip to content

WorldEdit CUI (Addon)

DannyRuss edited this page Apr 22, 2025 · 3 revisions

The WorldEdit CUI is a graphical user interface for WorldEditCSharp that visualizes the selections. While this addon was taken in inspiration from the original WorldEditCUI, it's main functionality stays the same; designed to assist in using WorldEdit, as well as preventing accidental errors.

Please note, this is an addon, and requires WorldEditCSharp to already be installed in your project.


Installation

  1. You need to first already have WorldEditCSharp installed into your project.
  2. Download the addons Source Code.
    • Make sure to choose either the XNA or Unity version depending on your environment.
  3. Download DnSpy.
  4. Launch DnSpy and open the games executable. (File > Open)
    • Games Default Location:_ C:\Program Files (x86)\Steam\steamapps\common\CastleMiner Z
  5. Navigate to CastleMinerZ > DNA.CastleMinerZ > GameScreen > gameScreen_AfterDraw
  6. Right click the code and click Edit Method.
  7. Paste in the following two snippets within the code.
  • Namespaces:
// These namespaces are required for the 'WorldEditCUI' class.
using static XNA_WorldEditCUI;
using static WorldEdit;
  • Main Function:
    • Refer to the commented text to understand the lines to paste within;
    • Between: this.spriteBatch.Begin();
    • And: for (int i = 0; i < this._game.CurrentNetworkSession.AllGamers.Count; i++)
// this.spriteBatch.Begin();
//
/// <summary>
/// This function is for 'WorldEditCUI' and it's purpose is to draw the visual selection outline box between two points within the 'WorldEdit' class.
/// </summary>
OutlineSelectionWithGrid(e.Device, view, projection, _pointToLocation1, _pointToLocation2);
//
// for (int i = 0; i < this._game.CurrentNetworkSession.AllGamers.Count; i++)
  1. Click the green C# (Add Source Code) button from the bottom and upload XNA-or-Unity_WorldEditCUI.cs.
  2. Finally click the save all icon from the top (or File > Save All) and click 'ok'.

Gallery

Clone this wiki locally