Documentation ¶
Overview ¶
Package model has world.BlockModel implementations for each world.Block implementation in the block package. These models may be reused by blocks that share the same model. Some block models require additional fields and knowledge about the surrounding blocks to calculate the correct model.
Index ¶
- type Anvil
- type Cactus
- type Cake
- type Carpet
- type Chain
- type Chest
- type CocoaBean
- type Composter
- type DecoratedPot
- type Door
- type Empty
- type EnchantingTable
- type Fence
- type FenceGate
- type Grindstone
- type Ladder
- type Lantern
- type Leaves
- type Lectern
- type Skull
- type Slab
- type Solid
- type Stair
- type Stonecutter
- type Thin
- type TilledGrass
- type Trapdoor
- type Wall
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cactus ¶
type Cactus struct{}
Cactus is the model for a Cactus. It is just barely not a full block, having a slightly reduced width and depth.
type Cake ¶
type Cake struct { // Bites is the amount of bites that were taken from the cake. A cake can have up to 7 bites taken from it, before // being consumed entirely. Bites int }
Cake is a model used by cake blocks.
type Carpet ¶
type Carpet struct{}
Carpet is a model for carpet-like extremely thin blocks.
type Chest ¶
type Chest struct{}
Chest is the model of a chest. It is just barely not a full block, having a slightly reduced with on all axes.
type CocoaBean ¶
type CocoaBean struct { // Facing is the face that the cocoa bean faces. It is the opposite of the face that the CocoaBean is attached to. Facing cube.Direction // Age is the age of the CocoaBean. The age influences the size of the CocoaBean. The maximum age value of a cocoa // bean is 3. Age int }
CocoaBean is a model used by cocoa bean blocks.
type Composter ¶
type Composter struct { // Level is the level of compost inside the composter. Level int }
Composter is a model used by composter blocks. It is solid on all sides apart from the top, and the height of the inside area depends on the level of compost inside the composter.
type DecoratedPot ¶
type DecoratedPot struct{}
DecoratedPot is the model for a DecoratedPot. It is just barely not a full block, having a slightly reduced width and depth.
type Door ¶
type Door struct { // Facing is the direction that the door is facing when closed. Facing cube.Direction // Open specifies if the Door is open. The direction it opens towards depends on the Right field. Open bool // Right specifies the attachment side of the door and, with that, the direction it opens in. Right bool }
Door is a model used for doors. It has no solid faces and a bounding box that changes depending on the direction of the door, whether it is open, and the side of its hinge.
type Empty ¶
type Empty struct{}
Empty is a model that is completely empty. It has no collision boxes or solid faces.
type EnchantingTable ¶
type EnchantingTable struct{}
EnchantingTable is a model used by enchanting tables.
type Fence ¶
type Fence struct { // Wood specifies if the Fence is made from wood. This field is used to check if two fences are able to attach to // each other. Wood bool }
Fence is a model used by fences of any type. It can attach to blocks with solid faces and other fences of the same type and has a model height just slightly over 1.
type FenceGate ¶
type FenceGate struct { // Facing is the facing direction of the FenceGate. A fence gate can only be opened in this direction or the // direction opposite to it. Facing cube.Direction // Open specifies if the FenceGate is open. In this case, BBox returns an empty slice. Open bool }
FenceGate is a model used by fence gates. The model is completely zero-ed when the FenceGate is opened.
type Grindstone ¶
Grindstone is a model used by grindstones.
type Ladder ¶
type Ladder struct { // Facing is the side opposite to the block the Ladder is currently attached to. Facing cube.Direction }
Ladder is the model for a ladder block.
type Lantern ¶
type Lantern struct { // Hanging specifies if the lantern is hanging from a block or if it's placed on the ground. Hanging bool }
Lantern is a model for the lantern block. It can be placed on the ground or hanging from the ceiling.
type Leaves ¶
type Leaves struct{}
Leaves is a model for leaves-like blocks. These blocks have a full collision box, but none of their faces are solid.
type Skull ¶
type Skull struct { // Direction is the direction the skull is facing. Direction cube.Face // Hanging specifies if the Skull is hanging on a wall. Hanging bool }
Skull is a model used by skull blocks.
type Slab ¶
type Slab struct {
// Double and Top specify if the Slab is a double slab and if it's in the top slot respectively. If Double is true,
// the BBox returned is always a full block.
Double, Top bool
}
Slab is the model of a slab-like block, which is either a half block or a full block, depending on if the slab is double.
type Solid ¶
type Solid struct{}
Solid is the model of a fully solid block. Blocks with this model, such as stone or wooden planks, have a 1x1x1 collision box.
type Stair ¶
type Stair struct { // Facing specifies the direction that the full side of the Stair faces. Facing cube.Direction // UpsideDown turns the Stair upside-down, meaning the full side of the Stair is turned to the top side of the // block. UpsideDown bool }
Stair is a model for stair-like blocks. These have different solid sides depending on the direction the stairs are facing, the surrounding blocks and whether it is upside down or not.
type Thin ¶
type Thin struct{}
Thin is a model for thin, partial blocks such as a glass pane or an iron bar. It changes its bounding box depending on solid faces next to it.
type TilledGrass ¶
type TilledGrass struct{}
TilledGrass is a model used for grass that has been tilled in some way, such as dirt paths and farmland.
type Trapdoor ¶
type Trapdoor struct { // Facing is the facing direction of the Trapdoor. In addition to the texture, it influences the direction in which // the Trapdoor is opened. Facing cube.Direction // Open and Top specify if the Trapdoor is opened and if it's in the top or bottom part of a block respectively. Open, Top bool }
Trapdoor is a model used for trapdoors. It has no solid faces and a bounding box that changes depending on the direction of the trapdoor.
type Wall ¶
type Wall struct { // NorthConnection is the height of the connection for the north direction. NorthConnection float64 // EastConnection is the height of the connection for the east direction. EastConnection float64 // SouthConnection is the height of the connection for the south direction. SouthConnection float64 // WestConnection is the height of the connection for the west direction. WestConnection float64 // Post is if the wall is the full height of a block or not. Post bool }
Wall is a model used by all wall types.
Source Files ¶
- anvil.go
- cactus.go
- cake.go
- carpet.go
- chain.go
- chest.go
- cocoa_bean.go
- composter.go
- decorated_pot.go
- doc.go
- door.go
- empty.go
- enchanting_table.go
- fence.go
- fence_gate.go
- grindstone.go
- ladder.go
- lantern.go
- leaves.go
- lectern.go
- skull.go
- slab.go
- solid.go
- stair.go
- stonecutter.go
- thin.go
- tilled_grass.go
- trapdoor.go
- wall.go