EngineHub/WorldEditCUI

WorldEdit tool integration

Opened this issue · 1 comments

Thinking a little bit about ways to gradually expand the functionality of the mod as time + interest allows...

WorldEdit's tools are often a bit tricky to use since there's no visual feedback about a) a certain item being a tool and b) what sort of action that tool might be able to do. WECUI could provide some help with that.

Initial steps

  1. Show the target block of the currently held tool, with an indication of whether the tool supports primary action, secondary action, or both
  2. Indicate that certain items are bound as WorldEdit tools (add to the items in inventory/hotbar)

The protocol this uses should allow WECUI to connect tools with both any item of a certain type (how WE currently handles tools), as well as specific ItemStacks (with something in the item's NBT data?).

A tool definition would carry one type Identifier (or perhaps multiple, to use in some sort of tags system) which describes the tool type, type-determined parameters (such as size, unique id (for eventually sending block volumes), tool name, or block pattern).

Longer-term

  1. Display an outline of the target area of a tool -- would have to know specific tool types. Could eventually go up to showing a ghost-image of what the brush's action area could look like
  2. Make the functionality easily extensible so other plugins that provide tool types can take advantage of the functionality
  3. Provide custom item textures for the tool types

Just wanted to drop EngineHub/WorldEdit#448 here, showing basically this done on the server side, though it was a pretty hacky quick draft of an idea at the time.
https://gfycat.com/CautiousFrailAmericancrocodile