fCraft  0.636
Custom Minecraft Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Events
Public Member Functions | Properties | List of all members
fCraft.Drawing.IBrushInstance Interface Reference

Class that describes an individual instance of a configured brush. Each brush instance will only be used for one DrawOperation, so it can store state. Stateless brush types may combine IBrush and IBrushInstance into one class. More...

Inheritance diagram for fCraft.Drawing.IBrushInstance:
Inheritance graph
[legend]

Public Member Functions

bool Begin ([NotNull] Player player,[NotNull] DrawOperation op)
 Called when the DrawOperation starts. Should be used to verify that the brush is ready for use. Resources used by the brush should be obtained here.
 
Block NextBlock ([NotNull] DrawOperation op)
 Provides the next Block type for the given DrawOperation.
 
void End ()
 Called when the DrawOperation is done or cancelled. Resources used by the brush should be freed/disposed here.
 

Properties

IBrush Brush [get]
 Configured brush that created this instance.
 
string InstanceDescription [get]
 A compact readable summary of brush type, configuration, and state.
 
int AlternateBlocks [get]
 Whether the brush is capable of providing alternate blocks (e.g. for filling hollow DrawOps).
 

Detailed Description

Class that describes an individual instance of a configured brush. Each brush instance will only be used for one DrawOperation, so it can store state. Stateless brush types may combine IBrush and IBrushInstance into one class.

Member Function Documentation

bool fCraft.Drawing.IBrushInstance.Begin ( [NotNull] Player  player,
[NotNull] DrawOperation  op 
)

Called when the DrawOperation starts. Should be used to verify that the brush is ready for use. Resources used by the brush should be obtained here.

Parameters
playerPlayer who started the DrawOperation.
opDrawOperation that will be using this brush.
Returns
Whether this brush instance has successfully began or not.
void fCraft.Drawing.IBrushInstance.End ( )

Called when the DrawOperation is done or cancelled. Resources used by the brush should be freed/disposed here.

Block fCraft.Drawing.IBrushInstance.NextBlock ( [NotNull] DrawOperation  op)

Provides the next Block type for the given DrawOperation.

Returns
Block type to place, or Block.Undefined to skip.

Property Documentation

int fCraft.Drawing.IBrushInstance.AlternateBlocks
get

Whether the brush is capable of providing alternate blocks (e.g. for filling hollow DrawOps).

IBrush fCraft.Drawing.IBrushInstance.Brush
get

Configured brush that created this instance.

string fCraft.Drawing.IBrushInstance.InstanceDescription
get

A compact readable summary of brush type, configuration, and state.


The documentation for this interface was generated from the following file: