flat

package
v0.0.0-...-50e9496 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2013 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package flat is designed to replicate vanilla's superflat worlds. Currently only basic worlds are supported.

Index

Constants

This section is empty.

Variables

View Source
var (
	ClassicFlat    = ParseString("2;7,2x3,2;1;village")
	TunnelersBream = ParseString("2;7,230x1,5x3,2;3;stronghold,biome_1,decoration,dungeon,mineshaft")
	WaterWorld     = ParseString("2;7,5x1,5x3,5x12,90x9;1;biome_1,village")
	Overworld      = ParseString("2;7,59x1,3x3,2;1;stronghold,biome_1,village,decoration,dungeon,lake,mineshaft,lava_lake")
	SnowyKingdom   = ParseString("2;7,59x1,3x3,2,78;12;biome_1,village")
	BottomlessPit  = ParseString("2;2x4,3x3,2;1;biome_1,village")
	Desert         = ParseString("2;7,3x1,52x24,8x12;2;stronghold,biome_1,village,decoration,dungeon,mineshaft")
	RedstoneReady  = ParseString("2;7,3x1,52x24;2;")
)

Vanilla presets

Functions

This section is empty.

Types

type SuperFlat

type SuperFlat struct {
	// contains filtered or unexported fields
}

A vanilla superflat world generator

func ParseString

func ParseString(code string) *SuperFlat

ParseString reads in a vanilla superflat world code and returns a superflat world generator.

For example the code

2;7,2x3,2;1;village,stronghold

works like this

2;                   //Version, only 2 is supported
7,2x3,2;             //A comma seperated list of blocks
    7,               //One layer of bedrock
    2x3,             //Two layers of dirt
    2                //One layer of grass
1;                   //Plains biome
village,stronghold   //A comma seperated list of features for the world (Not supported)

func (*SuperFlat) Generate

func (sf *SuperFlat) Generate(chunk *world.Chunk)

Generates the chunk.

func (*SuperFlat) GenerationCode

func (sf *SuperFlat) GenerationCode() string

The vinilla superflat world code used to generate this world

func (*SuperFlat) Load

func (sf *SuperFlat) Load(w *world.World)

Saves the generator's settings to the world's storage

func (*SuperFlat) Name

func (sf *SuperFlat) Name() string

The name of the generator

func (*SuperFlat) Save

func (sf *SuperFlat) Save(w *world.World)

Saves the generator's settings to the world's storage

Jump to

Keyboard shortcuts

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