model

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cake

type Cake struct {
	Bites int
}

Cake is a model used by cake blocks.

func (Cake) AABB

func (c Cake) AABB(pos world.BlockPos, w *world.World) []physics.AABB

AABB ...

func (Cake) FaceSolid

func (c Cake) FaceSolid(pos world.BlockPos, face world.Face, w *world.World) bool

FaceSolid ...

type Carpet

type Carpet struct{}

Carpet is a model for carpet-like extremely thin blocks.

func (Carpet) AABB

AABB ...

func (Carpet) FaceSolid

func (Carpet) FaceSolid(world.BlockPos, world.Face, *world.World) bool

FaceSolid ...

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.

func (Chest) AABB

func (Chest) AABB(pos world.BlockPos, w *world.World) []physics.AABB

AABB ...

func (Chest) FaceSolid

func (Chest) FaceSolid(pos world.BlockPos, face world.Face, w *world.World) bool

FaceSolid ...

type CocoaBean

type CocoaBean struct {
	Facing world.Direction
	Age    int
}

CocoaBean is a model used by cocoa bean blocks.

func (CocoaBean) AABB

func (c CocoaBean) AABB(pos world.BlockPos, w *world.World) []physics.AABB

AABB ...

func (CocoaBean) FaceSolid

func (c CocoaBean) FaceSolid(pos world.BlockPos, face world.Face, w *world.World) bool

FaceSolid ...

type Door

type Door struct {
	Facing world.Direction
	Open   bool
	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.

func (Door) AABB

func (d Door) AABB(pos world.BlockPos, w *world.World) []physics.AABB

AABB ...

func (Door) FaceSolid

func (d Door) FaceSolid(pos world.BlockPos, face world.Face, w *world.World) bool

FaceSolid ...

type Empty

type Empty struct{}

Empty is a model that is completely empty. It has no collision boxes or solid faces.

func (Empty) AABB

AABB ...

func (Empty) FaceSolid

func (Empty) FaceSolid(world.BlockPos, world.Face, *world.World) bool

FaceSolid ...

type Fence

type Fence struct {
	Wooden bool
}

Fence is a model used by wooden & nether brick fence.

func (Fence) AABB

func (f Fence) AABB(pos world.BlockPos, w *world.World) []physics.AABB

AABB ...

func (Fence) FaceSolid

func (f Fence) FaceSolid(_ world.BlockPos, face world.Face, _ *world.World) bool

FaceSolid ...

type FenceGate

type FenceGate struct {
	Facing world.Direction
	Open   bool
}

FenceGate is a model used by fence gates.

func (FenceGate) AABB

func (f FenceGate) AABB(pos world.BlockPos, w *world.World) []physics.AABB

AABB ...

func (FenceGate) FaceSolid

func (f FenceGate) FaceSolid(pos world.BlockPos, face world.Face, w *world.World) bool

FaceSolid ...

type Lantern

type Lantern struct {
	Hanging bool
}

Lantern is a model for the lantern block.

func (Lantern) AABB

func (l Lantern) AABB(pos world.BlockPos, w *world.World) []physics.AABB

AABB ...

func (Lantern) FaceSolid

func (l Lantern) FaceSolid(pos world.BlockPos, face world.Face, w *world.World) bool

FaceSolid ...

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.

func (Leaves) AABB

AABB ...

func (Leaves) FaceSolid

func (Leaves) FaceSolid(world.BlockPos, world.Face, *world.World) bool

FaceSolid ...

type Slab

type Slab struct {
	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.

func (Slab) AABB

func (s Slab) AABB(world.BlockPos, *world.World) []physics.AABB

AABB ...

func (Slab) FaceSolid

func (s Slab) FaceSolid(_ world.BlockPos, face world.Face, _ *world.World) bool

FaceSolid ...

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.

func (Solid) AABB

AABB ...

func (Solid) FaceSolid

func (Solid) FaceSolid(world.BlockPos, world.Face, *world.World) bool

FaceSolid ...

type Stair

type Stair struct {
	Facing     world.Direction
	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.

func (Stair) AABB

func (s Stair) AABB(pos world.BlockPos, w *world.World) []physics.AABB

AABB ...

func (Stair) FaceSolid

func (s Stair) FaceSolid(pos world.BlockPos, face world.Face, w *world.World) bool

FaceSolid ...

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.

func (Thin) AABB

func (t Thin) AABB(pos world.BlockPos, w *world.World) []physics.AABB

AABB ...

func (Thin) FaceSolid

func (t Thin) FaceSolid(_ world.BlockPos, face world.Face, _ *world.World) bool

FaceSolid ...

type TilledGrass

type TilledGrass struct {
}

TilledGrass is a model used for grass that has been tilled in some way, such as grass paths and farmland.

func (TilledGrass) AABB

func (TilledGrass) AABB(pos world.BlockPos, w *world.World) []physics.AABB

AABB ...

func (TilledGrass) FaceSolid

func (TilledGrass) FaceSolid(pos world.BlockPos, face world.Face, w *world.World) bool

FaceSolid ...

type Trapdoor

type Trapdoor struct {
	Facing    world.Direction
	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.

func (Trapdoor) AABB

AABB ...

func (Trapdoor) FaceSolid

func (t Trapdoor) FaceSolid(world.BlockPos, world.Face, *world.World) bool

FaceSolid ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL