Documentation ¶
Index ¶
- Variables
- func AddPack(path string)
- func ItemStackToProtocol(i *ItemStack) protocol.ItemStack
- func Main(username, uuid, accessToken string)
- func PlaySound(name string)
- func PlaySoundAt(name string, vol, pitch float64, v mgl32.Vec3)
- func PlaySoundCallback(name string, cb func())
- func RemovePack(path string)
- func StopAllMusic()
- type Block
- type BlockBreakComponent
- type BlockComponent
- type BlockEntity
- type BlockNBTComponent
- type BlockSet
- type ChatUI
- type ClientState
- type ConfigData
- type ConfigServer
- type DebugComponent
- type DisplayTag
- type Entity
- type Inventory
- type InventoryType
- type ItemDamagable
- type ItemStack
- type ItemType
- type Key
- type NetworkComponent
- type PlayerComponent
- type PlayerModelComponent
- type Position
- type PositionComponent
- type RotationComponent
- type SignComponent
- type SizeComponent
- type TargetPositionComponent
- type TargetRotationComponent
Constants ¶
This section is empty.
Variables ¶
View Source
var Blocks = struct { Air *BlockSet `cullAgainst:"false" collidable:"false" renderable:"false"` Stone *BlockSet `type:"stone"` Grass *BlockSet `type:"grass"` Dirt *BlockSet Cobblestone *BlockSet Planks *BlockSet `type:"planks"` Sapling *BlockSet `type:"sapling"` Bedrock *BlockSet `hardness:"Inf"` FlowingWater *BlockSet `type:"liquid"` Water *BlockSet `type:"liquid"` FlowingLava *BlockSet `type:"liquid" lava:"true"` Lava *BlockSet `type:"liquid" lava:"true"` Sand *BlockSet `hardness:"0.5"` Gravel *BlockSet GoldOre *BlockSet IronOre *BlockSet CoalOre *BlockSet Log *BlockSet `type:"log"` Leaves *BlockSet `type:"leaves"` Sponge *BlockSet `type:"sponge"` Glass *BlockSet `cullAgainst:"false"` LapisOre *BlockSet LapisBlock *BlockSet Dispenser *BlockSet `type:"dispenser"` Sandstone *BlockSet NoteBlock *BlockSet `mc:"noteblock"` Bed *BlockSet `type:"bed"` GoldenRail *BlockSet `type:"poweredRail"` DetectorRail *BlockSet `type:"poweredRail"` StickyPiston *BlockSet `type:"piston"` Web *BlockSet `cullAgainst:"false" collidable:"false"` TallGrass *BlockSet `type:"tallGrass" mc:"tallgrass"` DeadBush *BlockSet `type:"deadBush" mc:"deadbush"` Piston *BlockSet `type:"piston"` PistonHead *BlockSet `type:"pistonHead"` Wool *BlockSet `type:"wool"` PistonExtension *BlockSet `renderable:"false"` YellowFlower *BlockSet `type:"yellowFlower"` RedFlower *BlockSet `type:"redFlower"` BrownMushroom *BlockSet `cullAgainst:"false" collidable:"false"` RedMushroom *BlockSet `cullAgainst:"false" collidable:"false"` GoldBlock *BlockSet IronBlock *BlockSet DoubleStoneSlab *BlockSet `type:"slabDoubleSeamless" variant:"stone"` StoneSlab *BlockSet `type:"slab" variant:"stone"` BrickBlock *BlockSet TNT *BlockSet `mc:"tnt"` BookShelf *BlockSet `mc:"bookshelf"` MossyCobblestone *BlockSet Obsidian *BlockSet Torch *BlockSet `type:"torch" model:"torch"` Fire *BlockSet `type:"fire"` MobSpawner *BlockSet OakStairs *BlockSet `type:"stairs"` Chest *BlockSet RedstoneWire *BlockSet `type:"redstone"` DiamondOre *BlockSet DiamondBlock *BlockSet CraftingTable *BlockSet Wheat *BlockSet `type:"crop"` Farmland *BlockSet `type:"farmland"` Furnace *BlockSet FurnaceLit *BlockSet StandingSign *BlockSet `type:"floorSign"` WoodenDoor *BlockSet `type:"door"` Ladder *BlockSet Rail *BlockSet `type:"rail"` StoneStairs *BlockSet `type:"stairs"` WallSign *BlockSet `type:"wallSign"` Lever *BlockSet StonePressurePlate *BlockSet IronDoor *BlockSet `type:"door"` WoodenPressurePlate *BlockSet RedstoneOre *BlockSet RedstoneOreLit *BlockSet RedstoneTorchUnlit *BlockSet `type:"torch" model:"unlit_redstone_torch"` RedstoneTorch *BlockSet `type:"torch" model:"redstone_torch"` StoneButton *BlockSet SnowLayer *BlockSet `type:"snowLayer"` Ice *BlockSet `translucent:"true" cullAgainst:"false"` Snow *BlockSet Cactus *BlockSet `type:"cactus"` Clay *BlockSet Reeds *BlockSet `cullAgainst:"false" collidable:"false"` Jukebox *BlockSet Fence *BlockSet `type:"fence"` Pumpkin *BlockSet Netherrack *BlockSet SoulSand *BlockSet Glowstone *BlockSet Portal *BlockSet `type:"portal"` PumpkinLit *BlockSet Cake *BlockSet RepeaterUnpowered *BlockSet RepeaterPowered *BlockSet StainedGlass *BlockSet `type:"stainedGlass"` TrapDoor *BlockSet MonsterEgg *BlockSet StoneBrick *BlockSet `mc:"stonebrick" type:"stonebrick"` BrownMushroomBlock *BlockSet RedMushroomBlock *BlockSet IronBars *BlockSet `type:"connectable"` GlassPane *BlockSet `type:"connectable"` MelonBlock *BlockSet PumpkinStem *BlockSet MelonStem *BlockSet Vine *BlockSet `type:"vines"` FenceGate *BlockSet `type:"fenceGate"` BrickStairs *BlockSet `type:"stairs"` StoneBrickStairs *BlockSet `type:"stairs"` Mycelium *BlockSet Waterlily *BlockSet `type:"lilypad"` NetherBrick *BlockSet NetherBrickFence *BlockSet `type:"fence" wood:"false"` NetherBrickStairs *BlockSet `type:"stairs"` NetherWart *BlockSet EnchantingTable *BlockSet BrewingStand *BlockSet Cauldron *BlockSet EndPortal *BlockSet `collidable:"false"` EndPortalFrame *BlockSet EndStone *BlockSet DragonEgg *BlockSet RedstoneLamp *BlockSet RedstoneLampLit *BlockSet DoubleWoodenSlab *BlockSet `type:"slabDouble" variant:"wood"` WoodenSlab *BlockSet `type:"slab" variant:"wood"` Cocoa *BlockSet SandstoneStairs *BlockSet `type:"stairs"` EmeraldOre *BlockSet EnderChest *BlockSet TripwireHook *BlockSet Tripwire *BlockSet EmeraldBlock *BlockSet SpruceStairs *BlockSet `type:"stairs"` BirchStairs *BlockSet `type:"stairs"` JungleStairs *BlockSet `type:"stairs"` CommandBlock *BlockSet Beacon *BlockSet `cullAgainst:"false"` CobblestoneWall *BlockSet `type:"wall"` FlowerPot *BlockSet Carrots *BlockSet `type:"crop"` Potatoes *BlockSet `type:"crop"` WoodenButton *BlockSet Skull *BlockSet `type:"skull"` Anvil *BlockSet TrappedChest *BlockSet LightWeightedPressurePlate *BlockSet HeavyWeightedPressurePlate *BlockSet ComparatorUnpowered *BlockSet ComparatorPowered *BlockSet DaylightDetector *BlockSet RedstoneBlock *BlockSet QuartzOre *BlockSet Hopper *BlockSet QuartzBlock *BlockSet `type:"quartzBlock"` QuartzStairs *BlockSet `type:"stairs"` ActivatorRail *BlockSet `type:"poweredRail"` Dropper *BlockSet `type:"dispenser"` StainedHardenedClay *BlockSet `type:"stainedClay"` StainedGlassPane *BlockSet `type:"stainedGlassPane"` Leaves2 *BlockSet `type:"leaves" second:"true"` Log2 *BlockSet `type:"log" second:"true"` AcaciaStairs *BlockSet `type:"stairs"` DarkOakStairs *BlockSet `type:"stairs"` Slime *BlockSet Barrier *BlockSet `cullAgainst:"false" renderable:"false"` IronTrapDoor *BlockSet Prismarine *BlockSet SeaLantern *BlockSet HayBlock *BlockSet Carpet *BlockSet `type:"carpet"` HardenedClay *BlockSet CoalBlock *BlockSet PackedIce *BlockSet DoublePlant *BlockSet `type:"doublePlant"` StandingBanner *BlockSet WallBanner *BlockSet DaylightDetectorInverted *BlockSet RedSandstone *BlockSet RedSandstoneStairs *BlockSet `type:"stairs"` DoubleStoneSlab2 *BlockSet `type:"slabDoubleSeamless" variant:"stone2"` StoneSlab2 *BlockSet `type:"slab" variant:"stone2"` SpruceFenceGate *BlockSet `type:"fenceGate"` BirchFenceGate *BlockSet `type:"fenceGate"` JungleFenceGate *BlockSet `type:"fenceGate"` DarkOakFenceGate *BlockSet `type:"fenceGate"` AcaciaFenceGate *BlockSet `type:"fenceGate"` SpruceFence *BlockSet `type:"fence"` BirchFence *BlockSet `type:"fence"` JungleFence *BlockSet `type:"fence"` DarkOakFence *BlockSet `type:"fence"` AcaciaFence *BlockSet `type:"fence"` SpruceDoor *BlockSet `type:"door"` BirchDoor *BlockSet `type:"door"` JungleDoor *BlockSet `type:"door"` AcaciaDoor *BlockSet `type:"door"` DarkOakDoor *BlockSet `type:"door"` EndRod *BlockSet ChorusPlant *BlockSet ChorusFlower *BlockSet PurpurBlock *BlockSet PurpurPillar *BlockSet PurpurStairs *BlockSet `type:"stairs"` PurpurDoubleSlab *BlockSet `type:"slabDoubleSeamless" variant:"purpur"` PurpurSlab *BlockSet `type:"slab" variant:"purpur"` EndBricks *BlockSet Beetroots *BlockSet GrassPath *BlockSet `cullAgainst:"false"` EndGateway *BlockSet StructureBlock *BlockSet MissingBlock *BlockSet `mc:"steven:missing_block"` }{}
Valid blocks.
View Source
var (
InvPlayer = playerInventory{}
)
Functions ¶
func ItemStackToProtocol ¶
func PlaySoundCallback ¶
func PlaySoundCallback(name string, cb func())
note: callback only valid for streams
func RemovePack ¶
func RemovePack(path string)
func StopAllMusic ¶
func StopAllMusic()
Types ¶
type Block ¶
type Block interface { // Is returns whether this block is a member of the passed Set Is(s *BlockSet) bool BlockSet() *BlockSet Plugin() string Name() string SID() uint16 Set(key string, val interface{}) Block UpdateState(x, y, z int) Block Collidable() bool CollisionBounds() []vmath.AABB Hardness() float64 Renderable() bool ModelName() string ModelVariant() string Models() *blockVariants ForceShade() bool ShouldCullAgainst() bool TintImage() *image.NRGBA TintColor() (r, g, b byte) IsTranslucent() bool LightReduction() int LightEmitted() int String() string NameLocaleKey() string StepSound() (name string, vol, pitch float64) DigSound() (name string, vol, pitch float64) BreakSound() (name string, vol, pitch float64) CreateBlockEntity() BlockEntity // contains filtered or unexported methods }
Block is a type of tile in the world. All blocks, excluding the special 'missing block', belong to a set.
func GetBlockByCombinedID ¶
GetBlockByCombinedID returns the block with the matching combined id. The combined id is:
block id << 4 | data
type BlockBreakComponent ¶
BlockBreakComponent is implemented by the block break animation entity
type BlockComponent ¶
BlockComponent is a component that defines the location of an entity when attached to a block.
type BlockEntity ¶
type BlockEntity interface { BlockComponent }
BlockEntity is the interface for which all block entities must implement
type BlockNBTComponent ¶
BlockNBTComponent is implemented by block entities that load information from nbt.
type ChatUI ¶
type ChatUI struct { Lines [chatHistoryLines]format.AnyComponent // contains filtered or unexported fields }
func (*ChatUI) Add ¶
func (c *ChatUI) Add(msg format.AnyComponent)
type ClientState ¶
type ClientState struct {
LX, LY, LZ float64
X, Y, Z float64
Yaw, Pitch float64
Health float64
Hunger float64
VSpeed float64
KeyState [keyCount]bool
OnGround bool
GameMode gameMode
HardCore bool
WorldType worldType
WorldAge int64
WorldTime, TargetWorldTime float64
TickTime bool
Bounds vmath.AABB
// contains filtered or unexported fields
}
var Client *ClientState
func (*ClientState) MouseAction ¶
func (c *ClientState) MouseAction(button glfw.MouseButton, down bool)
func (*ClientState) UpdateHealth ¶
func (c *ClientState) UpdateHealth(health float64)
func (*ClientState) UpdateHunger ¶
func (c *ClientState) UpdateHunger(hunger float64)
type ConfigServer ¶
type DebugComponent ¶
type DebugComponent interface {
DebugColor() (r, g, b byte)
}
type DisplayTag ¶
type Inventory ¶
type Inventory struct { Type InventoryType ID int Items []*ItemStack // contains filtered or unexported fields }
func NewInventory ¶
func NewInventory(ty InventoryType, id, size int) *Inventory
type InventoryType ¶
type ItemDamagable ¶
type ItemStack ¶
func ItemStackFromProtocol ¶
type ItemType ¶
type ItemType interface { Name() string NameLocaleKey() string ParseDamage(d int16) ParseTag(tag *nbt.Compound) }
func ItemOfBlock ¶
type NetworkComponent ¶
type PlayerComponent ¶
type PlayerModelComponent ¶
type PlayerModelComponent interface { SwingArm() SetCurrentItem(item *ItemStack) }
type PositionComponent ¶
type RotationComponent ¶
type SignComponent ¶
type SignComponent interface {
Update(lines [4]format.AnyComponent)
}
type SizeComponent ¶
type TargetPositionComponent ¶
Source Files ¶
- assets.go
- audio.go
- block.go
- blockentity.go
- blockimpl.go
- blockliquid.go
- blockreg.go
- blocks.go
- blocksign.go
- blocksimple.go
- blockskull.go
- blocksnapshot.go
- blocktint.go
- blocktree.go
- chat.go
- chunk.go
- chunkbuilder.go
- client.go
- clientdebug.go
- clouds.go
- config.go
- console.go
- desktop.go
- entities.go
- entity.go
- entityhelditem.go
- entitymodels.go
- entityparts.go
- entitysystems.go
- fakegen.go
- handler.go
- inventory.go
- item.go
- itemlist.go
- key.go
- model.go
- modelrender.go
- modelui.go
- mojangverify.go
- network.go
- playerlist.go
- pluginmessage.go
- pluginmessage_proto.go
- position.go
- progress.go
- resourcepacks.go
- steven.go
- ui.go
- uieditserver.go
- uigamemenu.go
- uilogin.go
- uilogo.go
- uioptions.go
- uiresourcelist.go
- uirespawn.go
- uiscreen.go
- uiserverlist.go
- uivolume.go
- world.go
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
Package console implements a system for parsing and executing commands + logging.
|
Package console implements a system for parsing and executing commands + logging. |
encoding
|
|
json
Package json proxies requests to encoding/json but allows for 'broken' json
|
Package json proxies requests to encoding/json but allows for 'broken' json |
Package entitysys provides a simple entity component system for handling entities.
|
Package entitysys provides a simple entity component system for handling entities. |
Package protocol provides definitions for Minecraft packets as well as methods for reading and writing them
|
Package protocol provides definitions for Minecraft packets as well as methods for reading and writing them |
atlas
Package atlas provides a basic texture atlas
|
Package atlas provides a basic texture atlas |
builder
Package builder provides a simple way to create buffers to upload to the gpu
|
Package builder provides a simple way to create buffers to upload to the gpu |
gl
Package gl provides a more Go friendly OpenGL API
|
Package gl provides a more Go friendly OpenGL API |
glsl
Package glsl handles glsl shaders and applies some preprocessing to them
|
Package glsl handles glsl shaders and applies some preprocessing to them |
type
|
|
Package ui provides methods to draw a user interface onto the the screen and manage resizing.
|
Package ui provides methods to draw a user interface onto the the screen and manage resizing. |
scene
Package scene provides methods to manage and load multiple ui scenes.
|
Package scene provides methods to manage and load multiple ui scenes. |
world
|
|
Click to show internal directories.
Click to hide internal directories.