Documentation ¶
Index ¶
Constants ¶
View Source
const ( ParamTypeLight = iota ParamTypeNone )
View Source
const ( ParamType2FlowingLiquid = iota ParamType2WallMounted ParamType2FaceDir ParamType2Leveled ParamType2DegRotate ParamType2MeshOptions ParamType2Color ParamType2ColorFaceDir ParamType2ColorWallMounted ParamType2GlassLikeLiquidLevel ParamType2ColorDegRotate ParamType2None ParamType2Waving )
Variables ¶
View Source
var DrawTypeNames = map[string]DrawType{ "normal": DrawTypeNormal, "airlike": DrawTypeAirlike, "liquid": DrawTypeLiquid, "flowingliquid": DrawTypeFlowingLiquid, "glasslike": DrawTypeGlasslike, "glasslike_framed": DrawTypeGlasslikeFramed, "glasslike_framed_optional": DrawTypeGlasslikeFramed, "allfaces": DrawTypeAllFaces, "allfaces_optional": DrawTypeAllFaces, "torchlike": DrawTypeTorchlike, "signlike": DrawTypeSignlike, "plantlike": DrawTypePlantlike, "firelike": DrawTypeFirelike, "fencelike": DrawTypeFencelike, "raillike": DrawTypeRaillike, "nodebox": DrawTypeNodeBox, "mesh": DrawTypeMesh, "plantlike_rooted": DrawTypePlantlikeRooted, }
View Source
var ParamType2Names = map[string]ParamType2{ "flowingliquid": ParamType2FlowingLiquid, "wallmounted": ParamType2WallMounted, "facedir": ParamType2FaceDir, "leveled": ParamType2Leveled, "degrotate": ParamType2DegRotate, "meshoptions": ParamType2MeshOptions, "color": ParamType2Color, "colorfacedir": ParamType2ColorFaceDir, "colorwallmounted": ParamType2ColorWallMounted, "glasslikeliquidlevel": ParamType2GlassLikeLiquidLevel, "colordegrotate": ParamType2ColorDegRotate, "waving": ParamType2Waving, "none": ParamType2None, }
View Source
var ParamTypeNames = map[string]ParamType{ "none": ParamTypeNone, "light": ParamTypeLight, }
Functions ¶
This section is empty.
Types ¶
type DrawType ¶
type DrawType int
const ( DrawTypeNormal DrawType = iota DrawTypeAirlike DrawTypeLiquid DrawTypeFlowingLiquid DrawTypeGlasslike DrawTypeGlasslikeFramed DrawTypeAllFaces DrawTypeTorchlike DrawTypeSignlike DrawTypePlantlike DrawTypeFirelike DrawTypeFencelike DrawTypeRaillike DrawTypeNodeBox DrawTypeMesh DrawTypePlantlikeRooted )
func (*DrawType) UnmarshalJSON ¶
type Game ¶
type Game struct { Aliases map[string]string Nodes map[string]NodeDefinition // contains filtered or unexported fields }
func (*Game) NodeDef ¶
func (g *Game) NodeDef(node string) NodeDefinition
type MediaCache ¶
type MediaCache struct {
// contains filtered or unexported fields
}
func NewMediaCache ¶
func NewMediaCache() *MediaCache
type NodeBox ¶
func (*NodeBox) UnmarshalJSON ¶
type NodeDefinition ¶
type NodeDefinition struct { DrawType DrawType ParamType ParamType ParamType2 ParamType2 Textures []*image.NRGBA Model *mesh.Model }
func ResolveNode ¶
func ResolveNode(descriptor NodeDescriptor, mediaCache *MediaCache) NodeDefinition
type NodeDescriptor ¶
type NodeDescriptor struct { DrawType DrawType `json:"drawtype"` ParamType ParamType `json:"paramtype"` ParamType2 ParamType2 `json:"paramtype2"` Tiles []string `json:"tiles"` NodeBox *NodeBox `json:"node_box"` Mesh *string `json:"mesh"` }
func (*NodeDescriptor) UnmarshalJSON ¶
func (n *NodeDescriptor) UnmarshalJSON(data []byte) error
type ParamType2 ¶
type ParamType2 int
func (*ParamType2) UnmarshalJSON ¶
func (t *ParamType2) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.