C# Class OpenMinecraft.ProceduralTree

Set up the methods for a larger more complicated tree. This tree type has roots, a trunk, and branches all of varying width, and many foliage clusters. MUST BE SUBCLASSED. Specifically, foliage_shape must be set. Subclass 'prepare' and 'shapefunc' to make different shaped trees.
Inheritance: Tree
Mostrar archivo Open project: N3X15/MineEdit

Public Methods

Method Description
MakeFoliage ( IMapHandler &map ) : void
MakeTrunk ( IMapHandler &map ) : void
ProceduralTree ( long _x, long _y, long _z, int h ) : System
crossection ( IMapHandler &map, Vector3i vCenter, double radius, int diraxis, byte mat ) : void

Create a round section of type matidx in blocklist.

foliagecluster ( IMapHandler &map, Vector3i center ) : void

generate a round cluster of foliage at the location center. The shape of the cluster is defined by the list foliage_shape. This list must be set in a subclass of ProceduralTree.

makebranches ( IMapHandler &map ) : void

Generate branches.

makeroots ( IMapHandler &map, List rootbases ) : void
shapefunc ( int y ) : double

Take y and return a radius for the location of the foliage cluster. If no foliage cluster is to be created, return -1. Designed for subclassing. Only makes clusters close to the trunk.

taperedlimb ( IMapHandler &map, Vector3i vStart, Vector3i vEnd, int startsize, int endsize ) : void

Create a tapered cylinder in blocklist. start and end are the beginning and ending coordinates of form [x,y,z]. startsize and endsize are the beginning and ending radius. The material of the cylinder is 17, which indicates wood in Minecraft.

Method Details

MakeFoliage() public method

public MakeFoliage ( IMapHandler &map ) : void
map IMapHandler
return void

MakeTrunk() public method

public MakeTrunk ( IMapHandler &map ) : void
map IMapHandler
return void

ProceduralTree() public method

public ProceduralTree ( long _x, long _y, long _z, int h ) : System
_x long
_y long
_z long
h int
return System

crossection() public method

Create a round section of type matidx in blocklist.
public crossection ( IMapHandler &map, Vector3i vCenter, double radius, int diraxis, byte mat ) : void
map IMapHandler
vCenter Vector3i the coordinates of the center block
radius double the radius of the section.
diraxis int The list index for the axis to make the section perpendicular to. 0 indicates the x axis, 1 the y, 2 the z. The section will extend along the other two axies.
mat byte What to make the section out of
return void

foliagecluster() public method

generate a round cluster of foliage at the location center. The shape of the cluster is defined by the list foliage_shape. This list must be set in a subclass of ProceduralTree.
public foliagecluster ( IMapHandler &map, Vector3i center ) : void
map IMapHandler
center Vector3i
return void

makebranches() public method

Generate branches.
public makebranches ( IMapHandler &map ) : void
map IMapHandler
return void

makeroots() public method

public makeroots ( IMapHandler &map, List rootbases ) : void
map IMapHandler
rootbases List
return void

shapefunc() public method

Take y and return a radius for the location of the foliage cluster. If no foliage cluster is to be created, return -1. Designed for subclassing. Only makes clusters close to the trunk.
public shapefunc ( int y ) : double
y int
return double

taperedlimb() public method

Create a tapered cylinder in blocklist. start and end are the beginning and ending coordinates of form [x,y,z]. startsize and endsize are the beginning and ending radius. The material of the cylinder is 17, which indicates wood in Minecraft.
public taperedlimb ( IMapHandler &map, Vector3i vStart, Vector3i vEnd, int startsize, int endsize ) : void
map IMapHandler
vStart Vector3i
vEnd Vector3i
startsize int
endsize int
return void