Documentation
¶
Index ¶
- Constants
- Variables
- type Block
- type Chunk
- func (c *Chunk) Biomes() []byte
- func (c *Chunk) BlockAt(x int, y int, z int) Block
- func (c *Chunk) Debug()
- func (c *Chunk) HeightMap() []int32
- func (c *Chunk) Level() nbt.CompoundTag
- func (c *Chunk) MaxSection() (max int)
- func (c *Chunk) Root() nbt.CompoundTag
- func (c *Chunk) Section(y int) (result nbt.CompoundTag, err error)
- func (c *Chunk) X() int
- func (c *Chunk) Z() int
- type Region
Constants ¶
View Source
const ( Air = iota Stone Grass Dirt Cobblestone Planks Sapling Bedrock Flowing_water Water Flowing_lava Lava Sand Gravel Gold_ore Iron_ore Coal_ore Log Leaves Sponge Glass Lapis_ore Lapis_block Dispenser Sandstone Noteblock Bed Golden_rail Detector_rail Sticky_piston Web Tallgrass Deadbush Piston Piston_head Wool Piston_extension Yellow_flower Red_flower Brown_mushroom Red_mushroom Gold_block Iron_block Double_stone_slab Stone_slab Brick_block Tnt Bookshelf Mossy_cobblestone Obsidian Torch Fire Mob_spawner Oak_stairs Chest Redstone_wire Diamond_ore Diamond_block Crafting_table Wheat Farmland Furnace Lit_furnace Standing_sign Wooden_door Ladder Rail Stone_stairs Wall_sign Lever Stone_pressure_plate Iron_door Wooden_pressure_plate Redstone_ore Lit_redstone_ore Unlit_redstone_torch Redstone_torch Snow_layer Ice Snow Cactus Clay Reeds Jukebox Fence Pumpkin Netherrack Soul_sand Glowstone Portal Lit_pumpkin Cake Unpowered_repeater Powered_repeater Stained_glass Trapdoor Monster_egg Stonebrick Brown_mushroom_block Red_mushroom_block Iron_bars Glass_pane Melon_block Pumpkin_stem Melon_stem Vine Fence_gate Brick_stairs Stone_brick_stairs Mycelium Waterlily Nether_brick Nether_brick_fence Nether_brick_stairs Nether_wart Enchanting_table Brewing_stand Cauldron End_portal End_portal_frame End_stone Dragon_egg Redstone_lamp Lit_redstone_lamp Double_wooden_slab Wooden_slab Cocoa Sandstone_stairs Emerald_ore Ender_chest Tripwire_hook Tripwire Emerald_block Spruce_stairs Birch_stairs Jungle_stairs Command_block Beacon Cobblestone_wall Flower_pot Carrots Potatoes Skull Anvil Trapped_chest Light_weighted_pressure_plate Heavy_weighted_pressure_plate Unpowered_comparator Powered_comparator Daylight_detector Redstone_block Quartz_ore Hopper Quartz_block Quartz_stairs Activator_rail Dropper Stained_hardened_clay Stained_glass_pane Leaves2 Log2 Acacia_stairs Dark_oak_stairs Slime Barrier Iron_trapdoor Prismarine Sea_lantern Hay_block Carpet Hardened_clay Coal_block Packed_ice Double_plant Daylight_detector_inverted Red_sandstone Red_sandstone_stairs Double_stone_slab2 Stone_slab2 Spruce_fence_gate Birch_fence_gate Jungle_fence_gate Dark_oak_fence_gate Acacia_fence_gate Spruce_fence Birch_fence Jungle_fence Dark_oak_fence Acacia_fence Spruce_door Birch_door Jungle_door Acacia_door Dark_oak_door End_rod Chorus_plant Chorus_flower Purpur_block Purpur_pillar Purpur_stairs Purpur_double_slab Purpur_slab End_bricks Beetroots Grass_path End_gateway Repeating_command_block Chain_command_block Frosted_ice Magma Nether_wart_block Red_nether_brick Bone_block Structure_void Observer White_shulker_box Orange_shulker_box Magenta_shulker_box Light_blue_shulker_box Yellow_shulker_box Lime_shulker_box Pink_shulker_box Gray_shulker_box Light_gray_shulker_box Cyan_shulker_box Purple_shulker_box Blue_shulker_box Brown_shulker_box Green_shulker_box Red_shulker_box Black_shulker_box Structure_block )
Variables ¶
View Source
var EmptySectionError = errors.New("section is empty")
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct {
Id int16 // composed of "byte" and "add" from a chunk Section
Data int8 // actually only 4 bits (0-15)
}
func NewBlock ¶
this is independat of the zany way the chunk format stores stuff just take the id and the data fields as parameters
func (Block) Description ¶
type Chunk ¶
type Chunk struct {
// contains filtered or unexported fields
}
func (*Chunk) Level ¶
func (c *Chunk) Level() nbt.CompoundTag
func (*Chunk) MaxSection ¶
return the index of the highest section in this chunk - above this is only air
func (*Chunk) Root ¶
func (c *Chunk) Root() nbt.CompoundTag
Click to show internal directories.
Click to hide internal directories.