shape

package
v1.16.2-0...-18405f0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package shape stores information about the shapes of blocks in Minecraft.

Index

Constants

This section is empty.

Variables

View Source
var ByBlockID = map[block.ID][]ID{}/* 763 elements not displayed */

ByBlockID is an index of shapes for each minecraft block variant.

View Source
var Dimensions = map[ID]Shape{}/* 271 elements not displayed */

Dimensions describes the bounding boxes of a shape ID.

Functions

This section is empty.

Types

type BoundingBox

type BoundingBox struct {
	Min, Max BoundingTriplet
}

func CollisionBoxes

func CollisionBoxes(bStateID world.BlockStatus) ([]BoundingBox, error)

CollisionBoxes returns the set of bounding boxes for that block state ID.

type BoundingTriplet

type BoundingTriplet struct {
	X, Y, Z float64
}

type ID

type ID uint32

ID describes a numeric shape ID.

type Shape

type Shape struct {
	ID    ID
	Boxes []BoundingBox
}

Shape describes how collisions should be tested for an object.

Jump to

Keyboard shortcuts

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