127 lines
4.4 KiB
Markdown
127 lines
4.4 KiB
Markdown
---
|
|
title: Builder Tools
|
|
type: docs
|
|
weight: 3
|
|
---
|
|
|
|
The Builder Tools system provides world editing capabilities for creative mode, including selection operations, scripted brushes, and prefab editing.
|
|
|
|
**Package:** `com.hypixel.hytale.builtin.buildertools`
|
|
|
|
## Architecture
|
|
|
|
```
|
|
BuilderToolsPlugin
|
|
├── Commands (37+)
|
|
│ ├── Selection: /pos1, /pos2, /deselect, /expand, /contract, /shift
|
|
│ ├── Clipboard: /copy, /cut, /paste, /rotate, /flip
|
|
│ ├── Modification: /set, /fill, /replace, /walls, /hollow
|
|
│ ├── History: /undo, /redo, /clearhistory
|
|
│ └── Utilities: /stack, /move, /tint, /submerge
|
|
├── Scripted Brushes
|
|
│ ├── ScriptedBrushAsset - Brush definitions
|
|
│ ├── BrushOperation - Operation base classes
|
|
│ └── BrushConfigCommand - Brush configuration
|
|
├── Prefab Editor
|
|
│ ├── PrefabEditSession - Editing session
|
|
│ ├── PrefabAnchor - Anchor points
|
|
│ └── PrefabCommand - Prefab commands
|
|
├── Snapshots
|
|
│ ├── SelectionSnapshot - Selection history
|
|
│ ├── ClipboardContentsSnapshot - Clipboard data
|
|
│ └── EntityTransformSnapshot - Entity changes
|
|
├── Tool Operations
|
|
│ ├── PaintOperation - Paint blocks
|
|
│ └── ToolOperation - Base operations
|
|
└── Systems
|
|
├── BuilderToolsSystems - Main processing
|
|
└── BuilderToolsUserDataSystem - Per-user data
|
|
```
|
|
|
|
## Commands Overview
|
|
|
|
### Selection Commands
|
|
|
|
| Command | Description |
|
|
|---------|-------------|
|
|
| `/pos1` | Set selection point 1 |
|
|
| `/pos2` | Set selection point 2 |
|
|
| `/deselect` | Clear selection |
|
|
| `/expand <amount> [direction]` | Expand selection |
|
|
| `/contract <amount> [direction]` | Contract selection |
|
|
| `/shift <amount> [direction]` | Move selection |
|
|
| `/selectchunk` | Select entire chunk |
|
|
| `/selectchunksection` | Select chunk section |
|
|
|
|
### Clipboard Commands
|
|
|
|
| Command | Description |
|
|
|---------|-------------|
|
|
| `/copy` | Copy selection to clipboard |
|
|
| `/cut` | Cut selection to clipboard |
|
|
| `/paste` | Paste clipboard |
|
|
| `/rotate <angle>` | Rotate clipboard |
|
|
| `/flip <axis>` | Flip clipboard |
|
|
|
|
### Modification Commands
|
|
|
|
| Command | Description |
|
|
|---------|-------------|
|
|
| `/set <pattern>` | Fill selection with blocks |
|
|
| `/fill <pattern>` | Fill selection |
|
|
| `/replace <from> <to>` | Replace blocks |
|
|
| `/walls <pattern>` | Create walls around selection |
|
|
| `/hollow` | Hollow out selection |
|
|
| `/stack <count> [direction]` | Stack selection |
|
|
| `/move <direction> <amount>` | Move blocks |
|
|
|
|
### History Commands
|
|
|
|
| Command | Description |
|
|
|---------|-------------|
|
|
| `/undo [count]` | Undo operations |
|
|
| `/redo [count]` | Redo operations |
|
|
| `/clearedithistory` | Clear edit history |
|
|
| `/settoolhistorysize <size>` | Set history limit |
|
|
|
|
### Utility Commands
|
|
|
|
| Command | Description |
|
|
|---------|-------------|
|
|
| `/tint <color>` | Tint blocks |
|
|
| `/submerge <depth>` | Submerge selection |
|
|
| `/clearblocks` | Clear blocks |
|
|
| `/clearentities` | Clear entities |
|
|
| `/environment` | Set environment |
|
|
| `/globalmask` | Set global mask |
|
|
|
|
## Quick Start
|
|
|
|
```java
|
|
// Builder tools are enabled in creative mode
|
|
// Players can use selection and editing commands
|
|
|
|
// Programmatic access to builder tools data via ECS components
|
|
import com.hypixel.hytale.builtin.buildertools.BuilderToolsPlugin;
|
|
import com.hypixel.hytale.builtin.buildertools.BuilderToolsUserData;
|
|
import com.hypixel.hytale.component.CommandBuffer;
|
|
import com.hypixel.hytale.component.Ref;
|
|
|
|
// Get the component type
|
|
BuilderToolsPlugin builderTools = BuilderToolsPlugin.get();
|
|
ComponentType<EntityStore, BuilderToolsUserData> userDataType = builderTools.getUserDataComponentType();
|
|
|
|
// Access user data via command buffer
|
|
BuilderToolsUserData userData = commandBuffer.getComponent(playerRef, userDataType);
|
|
```
|
|
|
|
## Section Contents
|
|
|
|
{{< cards >}}
|
|
{{< card link="scripted-brushes" title="Scripted Brushes" subtitle="Programmable brush operations" icon="code" >}}
|
|
{{< card link="builder-commands" title="Builder Commands" subtitle="All building commands reference" icon="terminal" >}}
|
|
{{< card link="prefab-editor" title="Prefab Editor" subtitle="Create and edit prefabs" icon="cube" >}}
|
|
{{< card link="tool-operations" title="Tool Operations" subtitle="Block painting and editing" icon="pencil" >}}
|
|
{{< card link="snapshots" title="Snapshots" subtitle="Undo/redo and history" icon="clock" >}}
|
|
{{< /cards >}}
|