Cuberite
A lightweight, fast and extensible game server for Minecraft
Public Attributes | List of all members
cPrefab::sDef Struct Reference

#include <Prefab.h>

Public Attributes

int m_AddWeightIfSame
 The weight to add to this piece's base per-depth chance if the previous piece is the same. More...
 
int m_AllowedRotations
 Bitmask specifying the allowed rotations. More...
 
const char * m_CharMap
 The mapping between characters in m_Image and the blocktype / blockmeta. More...
 
const char * m_Connectors
 List of connectors. More...
 
int m_DefaultWeight
 Chance of this piece being used, if no other modifier is active. More...
 
const char * m_DepthWeight
 Chances of this piece being used, per depth of the generated piece tree. More...
 
eExtendFloorStrategy m_ExtendFloorStrategy
 How the prefab should handle not being on top of the ground. More...
 
int m_HitboxMaxX
 
int m_HitboxMaxY
 
int m_HitboxMaxZ
 
int m_HitboxMinX
 The hitbox used for collision-checking between prefabs. More...
 
int m_HitboxMinY
 
int m_HitboxMinZ
 
const char * m_Image
 The actual image to be used for the prefab. More...
 
cBlockArea::eMergeStrategy m_MergeStrategy
 The merge strategy to use while drawing the prefab. More...
 
bool m_MoveToGround
 If true, the piece will be moved Y-wise so that its first connector is sitting on the terrain. More...
 
int m_SizeX
 
int m_SizeY
 
int m_SizeZ
 

Detailed Description

Definition at line 43 of file Prefab.h.

Member Data Documentation

◆ m_AddWeightIfSame

int cPrefab::sDef::m_AddWeightIfSame

The weight to add to this piece's base per-depth chance if the previous piece is the same.

Can be positive or negative. This is used e. g. to make nether bridges prefer spanning multiple segments or to penalize turrets next to each other.

Definition at line 91 of file Prefab.h.

◆ m_AllowedRotations

int cPrefab::sDef::m_AllowedRotations

Bitmask specifying the allowed rotations.

N rotations CCW are allowed if bit N is set.

Definition at line 68 of file Prefab.h.

◆ m_CharMap

const char* cPrefab::sDef::m_CharMap

The mapping between characters in m_Image and the blocktype / blockmeta.

Format: "Char: BlockType: BlockMeta \n Char: BlockType : BlockMeta \n ..."

Definition at line 55 of file Prefab.h.

◆ m_Connectors

const char* cPrefab::sDef::m_Connectors

List of connectors.

Format: "Type: X, Y, Z : Direction \n Type : X, Y, Z : Direction \n ...". Type is an arbitrary number, Direction is the BlockFace constant value (0 .. 5).

Definition at line 64 of file Prefab.h.

◆ m_DefaultWeight

int cPrefab::sDef::m_DefaultWeight

Chance of this piece being used, if no other modifier is active.

Definition at line 78 of file Prefab.h.

◆ m_DepthWeight

const char* cPrefab::sDef::m_DepthWeight

Chances of this piece being used, per depth of the generated piece tree.

The starting piece has a depth of 0, the pieces connected to it are depth 1, etc. The specified depth stands for the depth of the new piece (not the existing already-placed piece), so valid depths start at 1. Format: "Depth : Weight | Depth : Weight | Depth : Weight ..." Depths that are not specified will use the m_DefaultWeight value.

Definition at line 86 of file Prefab.h.

◆ m_ExtendFloorStrategy

eExtendFloorStrategy cPrefab::sDef::m_ExtendFloorStrategy

How the prefab should handle not being on top of the ground.

This is used for houses to be "on the ground", as well as nether fortresses not to float.

Definition at line 75 of file Prefab.h.

◆ m_HitboxMaxX

int cPrefab::sDef::m_HitboxMaxX

Definition at line 51 of file Prefab.h.

◆ m_HitboxMaxY

int cPrefab::sDef::m_HitboxMaxY

Definition at line 51 of file Prefab.h.

◆ m_HitboxMaxZ

int cPrefab::sDef::m_HitboxMaxZ

Definition at line 51 of file Prefab.h.

◆ m_HitboxMinX

int cPrefab::sDef::m_HitboxMinX

The hitbox used for collision-checking between prefabs.

Relative to the bounds.

Definition at line 50 of file Prefab.h.

◆ m_HitboxMinY

int cPrefab::sDef::m_HitboxMinY

Definition at line 50 of file Prefab.h.

◆ m_HitboxMinZ

int cPrefab::sDef::m_HitboxMinZ

Definition at line 50 of file Prefab.h.

◆ m_Image

const char* cPrefab::sDef::m_Image

The actual image to be used for the prefab.

Organized YZX (Y changes the least often). Each character represents a single block, the type is mapped through m_CharMap.

Definition at line 59 of file Prefab.h.

◆ m_MergeStrategy

cBlockArea::eMergeStrategy cPrefab::sDef::m_MergeStrategy

The merge strategy to use while drawing the prefab.

Definition at line 71 of file Prefab.h.

◆ m_MoveToGround

bool cPrefab::sDef::m_MoveToGround

If true, the piece will be moved Y-wise so that its first connector is sitting on the terrain.

This is used e. g. for village houses.

Definition at line 95 of file Prefab.h.

◆ m_SizeX

int cPrefab::sDef::m_SizeX

Definition at line 45 of file Prefab.h.

◆ m_SizeY

int cPrefab::sDef::m_SizeY

Definition at line 46 of file Prefab.h.

◆ m_SizeZ

int cPrefab::sDef::m_SizeZ

Definition at line 47 of file Prefab.h.


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