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
Afficher le fichier Open project: N3X15/MineEdit

Méthodes publiques

Méthode 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 méthode

public MakeFoliage ( IMapHandler &map ) : void
map IMapHandler
Résultat void

MakeTrunk() public méthode

public MakeTrunk ( IMapHandler &map ) : void
map IMapHandler
Résultat void

ProceduralTree() public méthode

public ProceduralTree ( long _x, long _y, long _z, int h ) : System
_x long
_y long
_z long
h int
Résultat System

crossection() public méthode

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
Résultat void

foliagecluster() public méthode

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
Résultat void

makebranches() public méthode

Generate branches.
public makebranches ( IMapHandler &map ) : void
map IMapHandler
Résultat void

makeroots() public méthode

public makeroots ( IMapHandler &map, List rootbases ) : void
map IMapHandler
rootbases List
Résultat void

shapefunc() public méthode

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
Résultat double

taperedlimb() public méthode

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
Résultat void