-
Notifications
You must be signed in to change notification settings - Fork 0
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.
- You need to first already have WorldEditCSharp installed into your project.
- Download the addons Source Code.
- Make sure to choose either the
XNAorUnityversion depending on your environment.
- Make sure to choose either the
- Download DnSpy.
- Launch DnSpy and open the games executable. (
File > Open)- Games Default Location:_
C:\Program Files (x86)\Steam\steamapps\common\CastleMiner Z
- Games Default Location:_
- Navigate to
CastleMinerZ > DNA.CastleMinerZ > GameScreen > gameScreen_AfterDraw - Right click the code and click Edit Method.
- 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++)- Click the green
C#(Add Source Code) button from the bottom and uploadXNA-or-Unity_WorldEditCUI.cs. - Finally click the save all icon from the top (or
File > Save All) and click 'ok'.
