Blingedit Documentation
Total Page:16
File Type:pdf, Size:1020Kb
BlingEdit Documentation SethBling Feb 29, 2020 Contents 1 Getting started 3 1.1 Installation................................................3 1.2 The BlingEdit sword...........................................3 2 Selecting and cursor 5 2.1 Selecting a Region............................................5 2.2 Changing the Cursor...........................................6 3 Operations 7 3.1 Delete...................................................7 3.2 Fill....................................................7 3.3 Replace..................................................7 3.4 Clone...................................................8 3.5 Randomize................................................8 3.6 Plugins..................................................9 4 Writing your own plugin 11 5 Changelog 13 i ii BlingEdit Documentation Contents 1 BlingEdit Documentation 2 Contents CHAPTER 1 Getting started 1.1 Installation • Download v1.0.2 of the datapack here. • Within your Minecraft world file, place blingedit.zip into the datapacks subfolder. • Launch the world, or if it’s already running, use the /reload command. – The world must not be in peaceful mode. 1.2 The BlingEdit sword To use any of the datapack’s features, you must create the BlingEdit Sword. Simply put a diamond sword into an anvil, and rename it to BlingEdit. Note that correct spacing and capitalization is required. Everything in the datapack requires you to be holding the BlingEdit Sword. 3 BlingEdit Documentation 4 Chapter 1. Getting started CHAPTER 2 Selecting and cursor 2.1 Selecting a Region In order to do anything with BlingEdit you must select a region. When holding the BlingEdit Sword, a cursor will show up. By default the cursor appears floating 5m in front of you. Left click to select one corner of the region. Move the cursor and left click again to select the opposite corner of the rectangular region. 2.1.1 Modifying the Selected Region When you select a region, there are a couple ways to modify the region until you get what you want. Up/Down/Left/Right/Forward/Backward When you select a region, 6 buttons will appear in chat that will move the entire region by 1 block in any direction. Left/Right/Forward/Backward will change depending on the direction you’re facing. Selecting a Region Anchor By left clicking on any of the red cubes that form the region’s bounding box, you can move one or more faces of the region. Clicking on a corner will move three faces at once, clicking on an edge will move two faces at once, and clicking in the middle of a side will move just that side. To click on an anchor, you actually attack it with the sword, so if it’s occluded by blocks it won’t work. Once you’ve moved the anchor to the desired position, left click again to release it. Resetting the Region To select a new region from scratch, simply deselect and reselect your BlingEdit Sword. 5 BlingEdit Documentation 2.2 Changing the Cursor With the BlingEdit Sword selected, press the “drop item” key. This will toggle your cursor between Floating Cursor and Raycast Cursor. As well as display some configuration options. 2.2.1 Floating Cursor The floating cursor always appears a fixed number of blocks directly in front of you. This can be used to select a location that’s floating in midair. 2.2.2 Raycast Cursor The raycast cursor will follow the direction that you’re pointing until it reaches a solid block. Depending on how it’s configured, it’ll either end inside the block you’re pointing at, or just before that block. This mode makes it easier to tell exactly where the cursor is, and select locations more quickly, but it can’t be used to select mid-air locations. 6 Chapter 2. Selecting and cursor CHAPTER 3 Operations Once you’ve selected a region, there are several editing operations you can perform. These operations will be listed in chat, simply click on the operation you wish to perform. 3.1 Delete This simply clears all blocks in the region. 3.2 Fill This fills the region entirely with a single block. Select the [Fill] operation, then use /setblock~~~<block> to select the block to use. 3.3 Replace This finds all blocks of a certain type and replaces them with another type of block. Select the [Replace] operation. Then use /setblock~~~<block> to select the block to replace, use: /setblock~~~<block> again to select the block to replace with. 7 BlingEdit Documentation 3.4 Clone This will clone all blocks in the selected region to another destination. There are several methods and options that can be used when doing this. When you select the [Clone] operation, the option to enable/disable the cloning of air blocks will appear in chat as well. A green destination region will appear, and it will be the same size as the red source region. 3.4.1 Moving the destination region When the green destination region appears, you’ll be moving it by default. Click to set its location. Note that you can change your cursor type as described earlier in this manual. To move it with the cursor again, left click to attack any of the green anchor points. You can also use the Up/Down/Left/Right/Forward/Backward buttons to move the destination region by a single block in any of those directions. It’s not possible to resize the destination region, since its must match the source region. 3.4.2 Confirm Clone This will clone all blocks from the source region to the destination region, and then select the destination region for further editing. 3.4.3 Clone & Repeat This will clone all blocks from the source region to the destination, and then move both the source and destination region so that the clone operation can be repeated. By clicking this several times, you can stack many copies of the same structure next to each other at any offset you’d like. 3.4.4 Clone Brush In Clone Brush mode, simply left clicking will paste the region at the cursor. Remember that you can change cursor modes as described earlier in this manual by pressing the “drop item” key. This can be used to quickly place many copies of the source structure in a point-and-click fashion. 3.4.5 Cancel Use this to exit all clone operations. 3.5 Randomize This set of operations is used to place blocks drawn from a random pool of blocks. Before randomizing any blocks, a Random Block Pool must be selected. 3.5.1 Store Selected Region as Random Block Pool This will store the region you have selected. All blocks in this region, including air, form the Random Block Pool. When further randomization operations are performed, a random set of coordinates from within this region will be selected, and the block at those coordinates will be used. Note that you can change blocks in this region after selecting 8 Chapter 3. Operations BlingEdit Documentation the region as the Random Block Pool, and that the region needs to be loaded when perform other randomization operations. 3.5.2 Fill Selected Region from Random Block Pool Every block in the selected region will obtain a random block from the Random Block Pool. 3.5.3 Replace in Selected Region from Random Block Pool When you select this operation, you’ll be asked which type of block you want to replace. Use /setblock~~~<block> to select the block. Each instance of that kind of block within the selected region will be replaced by a block from the Random Block Pool. 3.6 Plugins Selecting this operation will display a list of installed plugins. To install a plugin, download the datapack and put it in the datapacks folder in your save directory. 3.6.1 My Plugins Vegetate - Any empty blocks in the selected region which are on top of a grass block may receive random vegetation. 3.6. Plugins 9 BlingEdit Documentation 10 Chapter 3. Operations CHAPTER 4 Writing your own plugin A plugin is a datapack responsible for performing an edit operation in the selected region. To write a plugin, you must include the following: • Every tick, check if any players have their disp_plugins score set to 1. If they do, send them a light_purple tellraw message with a clickable element that will run a function that implements the plugin’s operation. I suggest calling the function run. – For example: execute as @e[type=minecraft:player] run execute if score @s disp_plugins ,!matches 1.. run tellraw @s ["",{"text":"[Vegetate]","clickEvent":{"action": ,!"run_command","value":"/function blingedit_vegetate:run"},"color":"light_ ,!purple"}] • At the beginning of your plugin’s run function, use: function blingedit:plugin_can_run Then check if player Global has a plugin_can_run score of 1. If it does, you’re free to perform the operation. If not, it could mean the player hasn’t selected a region, or that they aren’t in the right state to run a plugin. • plugin_can_run also sets several scores for player Global. The objectives box_xmin, box_ymin, box_zmin, box_xmax, box_ymax and box_zmax define the minimum and maximum bounds of the region’s bounding box. Use those coordinates however you like. • At the end of your run function, use gamerule sendCommandFeedback false • to disable the text would be displayed by clicking the tellraw link. BlingEdit will automatically re-enable the gamerule if it was previously enabled. 11 BlingEdit Documentation 12 Chapter 4. Writing your own plugin CHAPTER 5 Changelog BlingEdit is a datapack for Minecraft 1.13 which gives you a bunch of world editing tools, inspired by MCEdit and WorldEdit. 13.