Documentation ¶
Index ¶
- func BreakDuration(b world.Block, i item.Stack) time.Duration
- func BreaksInstantly(b world.Block, i item.Stack) bool
- func FlammableBlock(block world.Block) bool
- func Parse(s string) ([]world.Block, error)
- type Activatable
- type Air
- type AncientDebris
- type Andesite
- type Barrier
- type Basalt
- func (b Basalt) BreakInfo() BreakInfo
- func (b Basalt) EncodeBlock() (name string, properties map[string]interface{})
- func (b Basalt) EncodeItem() (id int32, meta int16)
- func (Basalt) HasNBT() bool
- func (b Basalt) Hash() uint64
- func (Basalt) Instrument() instrument.Instrument
- func (Basalt) Model() world.BlockModel
- func (b Basalt) UseOnBlock(pos world.BlockPos, face world.Face, _ mgl64.Vec3, w *world.World, ...) (used bool)
- type Beacon
- func (b Beacon) Activate(pos world.BlockPos, _ world.Face, _ *world.World, u item.User)
- func (b Beacon) BreakInfo() BreakInfo
- func (b Beacon) CanDisplace(l world.Liquid) bool
- func (b Beacon) DecodeNBT(data map[string]interface{}) interface{}
- func (Beacon) EncodeItem() (id int32, meta int16)
- func (b Beacon) EncodeNBT() map[string]interface{}
- func (Beacon) HasNBT() bool
- func (Beacon) Instrument() instrument.Instrument
- func (b Beacon) Level() int
- func (Beacon) LightDiffusionLevel() uint8
- func (Beacon) LightEmissionLevel() uint8
- func (Beacon) Model() world.BlockModel
- func (b Beacon) SideClosed(world.BlockPos, world.BlockPos, *world.World) bool
- func (b Beacon) Tick(currentTick int64, pos world.BlockPos, w *world.World)
- func (b Beacon) UseOnBlock(pos world.BlockPos, face world.Face, _ mgl64.Vec3, w *world.World, ...) (used bool)
- type BeaconSource
- type Bedrock
- func (b Bedrock) EncodeBlock() (name string, properties map[string]interface{})
- func (Bedrock) EncodeItem() (id int32, meta int16)
- func (Bedrock) HasNBT() bool
- func (b Bedrock) Hash() uint64
- func (Bedrock) Instrument() instrument.Instrument
- func (Bedrock) LightDiffusionLevel() uint8
- func (Bedrock) Model() world.BlockModel
- type BeetrootSeeds
- func (b BeetrootSeeds) BoneMeal(pos world.BlockPos, w *world.World) bool
- func (b BeetrootSeeds) BreakInfo() BreakInfo
- func (c BeetrootSeeds) CalculateGrowthChance(pos world.BlockPos, w *world.World) float64
- func (b BeetrootSeeds) EncodeBlock() (name string, properties map[string]interface{})
- func (b BeetrootSeeds) EncodeItem() (id int32, meta int16)
- func (c BeetrootSeeds) GrowthStage() int
- func (c BeetrootSeeds) HasLiquidDrops() bool
- func (b BeetrootSeeds) Hash() uint64
- func (c BeetrootSeeds) NeighbourUpdateTick(pos, _ world.BlockPos, w *world.World)
- func (b BeetrootSeeds) RandomTick(pos world.BlockPos, w *world.World, _ *rand.Rand)
- func (BeetrootSeeds) SameCrop(c Crop) bool
- func (b BeetrootSeeds) UseOnBlock(pos world.BlockPos, face world.Face, _ mgl64.Vec3, w *world.World, ...) bool
- type BlueIce
- type BoneBlock
- func (b BoneBlock) BreakInfo() BreakInfo
- func (b BoneBlock) EncodeBlock() (name string, properties map[string]interface{})
- func (b BoneBlock) EncodeItem() (id int32, meta int16)
- func (BoneBlock) HasNBT() bool
- func (b BoneBlock) Hash() uint64
- func (b BoneBlock) Instrument() instrument.Instrument
- func (BoneBlock) Model() world.BlockModel
- func (b BoneBlock) UseOnBlock(pos world.BlockPos, face world.Face, _ mgl64.Vec3, w *world.World, ...) (used bool)
- type BoneMealAffected
- type BreakInfo
- type Breakable
- type Bricks
- type Cake
- func (c Cake) Activate(pos world.BlockPos, _ world.Face, w *world.World, u item.User)
- func (c Cake) BreakInfo() BreakInfo
- func (c Cake) CanDisplace(b world.Liquid) bool
- func (c Cake) EncodeBlock() (name string, properties map[string]interface{})
- func (c Cake) EncodeItem() (id int32, meta int16)
- func (Cake) HasNBT() bool
- func (c Cake) Hash() uint64
- func (Cake) LightDiffusionLevel() uint8
- func (c Cake) Model() world.BlockModel
- func (c Cake) NeighbourUpdateTick(pos, _ world.BlockPos, w *world.World)
- func (c Cake) SideClosed(world.BlockPos, world.BlockPos, *world.World) bool
- func (c Cake) UseOnBlock(pos world.BlockPos, face world.Face, _ mgl64.Vec3, w *world.World, ...) bool
- type Carpet
- func (c Carpet) BreakInfo() BreakInfo
- func (Carpet) CanDisplace(b world.Liquid) bool
- func (c Carpet) EncodeBlock() (name string, properties map[string]interface{})
- func (c Carpet) EncodeItem() (id int32, meta int16)
- func (c Carpet) FlammabilityInfo() FlammabilityInfo
- func (Carpet) HasLiquidDrops() bool
- func (Carpet) HasNBT() bool
- func (c Carpet) Hash() uint64
- func (Carpet) LightDiffusionLevel() uint8
- func (Carpet) Model() world.BlockModel
- func (Carpet) NeighbourUpdateTick(pos, _ world.BlockPos, w *world.World)
- func (Carpet) SideClosed(world.BlockPos, world.BlockPos, *world.World) bool
- func (c Carpet) UseOnBlock(pos world.BlockPos, face world.Face, _ mgl64.Vec3, w *world.World, ...) (used bool)
- type Carrot
- func (c Carrot) AlwaysConsumable() bool
- func (c Carrot) BoneMeal(pos world.BlockPos, w *world.World) bool
- func (c Carrot) BreakInfo() BreakInfo
- func (c Carrot) CalculateGrowthChance(pos world.BlockPos, w *world.World) float64
- func (c Carrot) Consume(_ *world.World, consumer item.Consumer) item.Stack
- func (c Carrot) ConsumeDuration() time.Duration
- func (c Carrot) EncodeBlock() (name string, properties map[string]interface{})
- func (c Carrot) EncodeItem() (id int32, meta int16)
- func (c Carrot) GrowthStage() int
- func (c Carrot) HasLiquidDrops() bool
- func (c Carrot) Hash() uint64
- func (c Carrot) NeighbourUpdateTick(pos, _ world.BlockPos, w *world.World)
- func (c Carrot) RandomTick(pos world.BlockPos, w *world.World, _ *rand.Rand)
- func (Carrot) SameCrop(c Crop) bool
- func (c Carrot) UseOnBlock(pos world.BlockPos, face world.Face, _ mgl64.Vec3, w *world.World, ...) bool
- type Chest
- func (c Chest) Activate(pos world.BlockPos, _ world.Face, _ *world.World, u item.User)
- func (c Chest) AddViewer(v ContainerViewer, w *world.World, pos world.BlockPos)
- func (c Chest) BreakInfo() BreakInfo
- func (Chest) CanDisplace(b world.Liquid) bool
- func (c Chest) DecodeNBT(data map[string]interface{}) interface{}
- func (c Chest) Drops() []item.Stack
- func (c Chest) EncodeBlock() (name string, properties map[string]interface{})
- func (Chest) EncodeItem() (id int32, meta int16)
- func (c Chest) EncodeNBT() map[string]interface{}
- func (c Chest) FlammabilityInfo() FlammabilityInfo
- func (Chest) HasNBT() bool
- func (c Chest) Hash() uint64
- func (Chest) Instrument() instrument.Instrument
- func (c Chest) Inventory() *inventory.Inventory
- func (Chest) LightDiffusionLevel() uint8
- func (Chest) Model() world.BlockModel
- func (c Chest) RemoveViewer(v ContainerViewer, w *world.World, pos world.BlockPos)
- func (Chest) SideClosed(world.BlockPos, world.BlockPos, *world.World) bool
- func (c Chest) UseOnBlock(pos world.BlockPos, face world.Face, _ mgl64.Vec3, w *world.World, ...) (used bool)
- func (c Chest) WithName(a ...interface{}) world.Item
- type ChiseledQuartz
- func (c ChiseledQuartz) BreakInfo() BreakInfo
- func (ChiseledQuartz) EncodeBlock() (name string, properties map[string]interface{})
- func (c ChiseledQuartz) EncodeItem() (id int32, meta int16)
- func (ChiseledQuartz) HasNBT() bool
- func (ChiseledQuartz) Hash() uint64
- func (ChiseledQuartz) Instrument() instrument.Instrument
- func (ChiseledQuartz) Model() world.BlockModel
- type Clay
- func (c Clay) BreakInfo() BreakInfo
- func (c Clay) EncodeBlock() (name string, properties map[string]interface{})
- func (c Clay) EncodeItem() (id int32, meta int16)
- func (Clay) HasNBT() bool
- func (c Clay) Hash() uint64
- func (c Clay) Instrument() instrument.Instrument
- func (Clay) Model() world.BlockModel
- type CoalBlock
- func (c CoalBlock) BreakInfo() BreakInfo
- func (CoalBlock) EncodeBlock() (name string, properties map[string]interface{})
- func (CoalBlock) EncodeItem() (id int32, meta int16)
- func (c CoalBlock) FlammabilityInfo() FlammabilityInfo
- func (CoalBlock) HasNBT() bool
- func (CoalBlock) Hash() uint64
- func (CoalBlock) Instrument() instrument.Instrument
- func (CoalBlock) Model() world.BlockModel
- type CoalOre
- type Cobblestone
- type CocoaBean
- func (c CocoaBean) BoneMeal(pos world.BlockPos, w *world.World) bool
- func (c CocoaBean) BreakInfo() BreakInfo
- func (c CocoaBean) EncodeBlock() (name string, properties map[string]interface{})
- func (c CocoaBean) EncodeItem() (id int32, meta int16)
- func (c CocoaBean) HasLiquidDrops() bool
- func (CocoaBean) HasNBT() bool
- func (c CocoaBean) Hash() uint64
- func (CocoaBean) LightDiffusionLevel() uint8
- func (c CocoaBean) Model() world.BlockModel
- func (c CocoaBean) NeighbourUpdateTick(pos, _ world.BlockPos, w *world.World)
- func (c CocoaBean) RandomTick(pos world.BlockPos, w *world.World, r *rand.Rand)
- func (c CocoaBean) UseOnBlock(pos world.BlockPos, face world.Face, _ mgl64.Vec3, w *world.World, ...) bool
- type Concrete
- func (c Concrete) BreakInfo() BreakInfo
- func (c Concrete) EncodeBlock() (name string, properties map[string]interface{})
- func (c Concrete) EncodeItem() (id int32, meta int16)
- func (Concrete) HasNBT() bool
- func (c Concrete) Hash() uint64
- func (Concrete) Instrument() instrument.Instrument
- func (Concrete) Model() world.BlockModel
- type ConcretePowder
- func (c ConcretePowder) BreakInfo() BreakInfo
- func (c ConcretePowder) CanSolidify(pos world.BlockPos, w *world.World) bool
- func (c ConcretePowder) EncodeBlock() (name string, properties map[string]interface{})
- func (c ConcretePowder) EncodeItem() (id int32, meta int16)
- func (ConcretePowder) HasNBT() bool
- func (c ConcretePowder) Hash() uint64
- func (ConcretePowder) Instrument() instrument.Instrument
- func (ConcretePowder) Model() world.BlockModel
- func (c ConcretePowder) NeighbourUpdateTick(pos, _ world.BlockPos, w *world.World)
- type Container
- type ContainerOpener
- type ContainerViewer
- type Coral
- func (c Coral) BreakInfo() BreakInfo
- func (c Coral) CanDisplace(b world.Liquid) bool
- func (c Coral) EncodeBlock() (name string, properties map[string]interface{})
- func (c Coral) EncodeItem() (id int32, meta int16)
- func (c Coral) HasLiquidDrops() bool
- func (Coral) HasNBT() bool
- func (c Coral) Hash() uint64
- func (Coral) Instrument() instrument.Instrument
- func (Coral) LightDiffusionLevel() uint8
- func (Coral) Model() world.BlockModel
- func (c Coral) NeighbourUpdateTick(pos, changedNeighbour world.BlockPos, w *world.World)
- func (c Coral) ScheduledTick(pos world.BlockPos, w *world.World)
- func (c Coral) SideClosed(pos, side world.BlockPos, w *world.World) bool
- func (c Coral) UseOnBlock(pos world.BlockPos, face world.Face, clickPos mgl64.Vec3, w *world.World, ...) bool
- type CoralBlock
- func (c CoralBlock) BreakInfo() BreakInfo
- func (c CoralBlock) EncodeBlock() (name string, properties map[string]interface{})
- func (c CoralBlock) EncodeItem() (id int32, meta int16)
- func (CoralBlock) HasNBT() bool
- func (c CoralBlock) Hash() uint64
- func (CoralBlock) Instrument() instrument.Instrument
- func (CoralBlock) Model() world.BlockModel
- func (c CoralBlock) NeighbourUpdateTick(pos, changedNeighbour world.BlockPos, w *world.World)
- func (c CoralBlock) ScheduledTick(pos world.BlockPos, w *world.World)
- type Crop
- type CryingObsidian
- type DiamondBlock
- type DiamondOre
- type Diorite
- type Dirt
- type DragonEgg
- func (d DragonEgg) Activate(pos world.BlockPos, _ world.Face, w *world.World, _ item.User)
- func (d DragonEgg) BreakInfo() BreakInfo
- func (d DragonEgg) CanDisplace(b world.Liquid) bool
- func (g DragonEgg) CanSolidify(world.BlockPos, *world.World) bool
- func (d DragonEgg) EncodeItem() (id int32, meta int16)
- func (DragonEgg) HasNBT() bool
- func (DragonEgg) LightDiffusionLevel() uint8
- func (d DragonEgg) LightEmissionLevel() uint8
- func (DragonEgg) Model() world.BlockModel
- func (d DragonEgg) NeighbourUpdateTick(pos, _ world.BlockPos, w *world.World)
- func (d DragonEgg) Punch(pos world.BlockPos, _ world.Face, w *world.World, _ item.User)
- func (d DragonEgg) SideClosed(world.BlockPos, world.BlockPos, *world.World) bool
- type EmeraldBlock
- type EmeraldOre
- type EndBrickStairs
- func (s EndBrickStairs) BreakInfo() BreakInfo
- func (EndBrickStairs) CanDisplace(b world.Liquid) bool
- func (s EndBrickStairs) EncodeBlock() (name string, properties map[string]interface{})
- func (s EndBrickStairs) EncodeItem() (id int32, meta int16)
- func (EndBrickStairs) HasNBT() bool
- func (s EndBrickStairs) Hash() uint64
- func (EndBrickStairs) LightDiffusionLevel() uint8
- func (s EndBrickStairs) Model() world.BlockModel
- func (s EndBrickStairs) SideClosed(pos, side world.BlockPos, w *world.World) bool
- func (s EndBrickStairs) UseOnBlock(pos world.BlockPos, face world.Face, clickPos mgl64.Vec3, w *world.World, ...) (used bool)
- type EndBricks
- type EndStone
- type EntityCollider
- type Farmland
- func (f Farmland) BreakInfo() BreakInfo
- func (f Farmland) EncodeBlock() (name string, properties map[string]interface{})
- func (Farmland) HasNBT() bool
- func (f Farmland) Hash() uint64
- func (Farmland) Model() world.BlockModel
- func (f Farmland) NeighbourUpdateTick(pos, _ world.BlockPos, w *world.World)
- func (f Farmland) RandomTick(pos world.BlockPos, w *world.World, _ *rand.Rand)
- type Fire
- func (f Fire) EncodeBlock() (name string, properties map[string]interface{})
- func (f Fire) EntityCollide(e world.Entity)
- func (f Fire) HasLiquidDrops() bool
- func (Fire) HasNBT() bool
- func (f Fire) Hash() uint64
- func (Fire) LightDiffusionLevel() uint8
- func (f Fire) LightEmissionLevel() uint8
- func (Fire) Model() world.BlockModel
- func (f Fire) NeighbourUpdateTick(pos, neighbour world.BlockPos, w *world.World)
- func (f Fire) RandomTick(pos world.BlockPos, w *world.World, _ *rand.Rand)
- func (Fire) ReplaceableBy(world.Block) bool
- func (f Fire) ScheduledTick(pos world.BlockPos, w *world.World)
- type FlammabilityInfo
- type Flammable
- type FromStringer
- type GildedBlackstone
- type Glass
- type GlassPane
- func (p GlassPane) BreakInfo() BreakInfo
- func (p GlassPane) CanDisplace(b world.Liquid) bool
- func (p GlassPane) EncodeItem() (id int32, meta int16)
- func (GlassPane) HasNBT() bool
- func (GlassPane) Instrument() instrument.Instrument
- func (GlassPane) LightDiffusionLevel() uint8
- func (GlassPane) Model() world.BlockModel
- func (p GlassPane) SideClosed(world.BlockPos, world.BlockPos, *world.World) bool
- type GlazedTerracotta
- func (t GlazedTerracotta) BreakInfo() BreakInfo
- func (t GlazedTerracotta) EncodeBlock() (name string, properties map[string]interface{})
- func (t GlazedTerracotta) EncodeItem() (id int32, meta int16)
- func (GlazedTerracotta) HasNBT() bool
- func (t GlazedTerracotta) Hash() uint64
- func (GlazedTerracotta) Instrument() instrument.Instrument
- func (GlazedTerracotta) Model() world.BlockModel
- func (t GlazedTerracotta) UseOnBlock(pos world.BlockPos, face world.Face, _ mgl64.Vec3, w *world.World, ...) (used bool)
- type Glowstone
- type GoldBlock
- type GoldOre
- type Granite
- type Grass
- type GrassPath
- type Gravel
- func (g Gravel) BreakInfo() BreakInfo
- func (g Gravel) CanSolidify(world.BlockPos, *world.World) bool
- func (g Gravel) EncodeItem() (id int32, meta int16)
- func (Gravel) HasNBT() bool
- func (Gravel) Instrument() instrument.Instrument
- func (Gravel) Model() world.BlockModel
- func (g Gravel) NeighbourUpdateTick(pos, _ world.BlockPos, w *world.World)
- type GravityAffected
- type InstrumentBlock
- type InvisibleBedrock
- type IronBars
- func (i IronBars) BreakInfo() BreakInfo
- func (i IronBars) CanDisplace(b world.Liquid) bool
- func (IronBars) EncodeItem() (id int32, meta int16)
- func (IronBars) HasNBT() bool
- func (IronBars) LightDiffusionLevel() uint8
- func (IronBars) Model() world.BlockModel
- func (i IronBars) SideClosed(world.BlockPos, world.BlockPos, *world.World) bool
- type IronBlock
- type IronOre
- type Kelp
- func (k Kelp) BoneMeal(pos world.BlockPos, w *world.World) bool
- func (k Kelp) BreakInfo() BreakInfo
- func (Kelp) CanDisplace(b world.Liquid) bool
- func (k Kelp) EncodeBlock() (name string, properties map[string]interface{})
- func (Kelp) EncodeItem() (id int32, meta int16)
- func (Kelp) HasNBT() bool
- func (k Kelp) Hash() uint64
- func (Kelp) LightDiffusionLevel() uint8
- func (Kelp) Model() world.BlockModel
- func (k Kelp) NeighbourUpdateTick(pos, changed world.BlockPos, w *world.World)
- func (k Kelp) RandomTick(pos world.BlockPos, w *world.World, r *rand.Rand)
- func (Kelp) SideClosed(world.BlockPos, world.BlockPos, *world.World) bool
- func (k Kelp) UseOnBlock(pos world.BlockPos, face world.Face, _ mgl64.Vec3, w *world.World, ...) (used bool)
- type Lantern
- func (l Lantern) BreakInfo() BreakInfo
- func (l Lantern) EncodeBlock() (name string, properties map[string]interface{})
- func (l Lantern) EncodeItem() (id int32, meta int16)
- func (l Lantern) HasLiquidDrops() bool
- func (Lantern) HasNBT() bool
- func (l Lantern) Hash() uint64
- func (Lantern) LightDiffusionLevel() uint8
- func (l Lantern) LightEmissionLevel() uint8
- func (l Lantern) Model() world.BlockModel
- func (l Lantern) NeighbourUpdateTick(pos, _ world.BlockPos, w *world.World)
- func (l Lantern) UseOnBlock(pos world.BlockPos, face world.Face, _ mgl64.Vec3, w *world.World, ...) bool
- type LapisBlock
- type LapisOre
- type Lava
- func (Lava) AABB(world.BlockPos, *world.World) []physics.AABB
- func (l Lava) EncodeBlock() (name string, properties map[string]interface{})
- func (l Lava) EntityCollide(e world.Entity)
- func (l Lava) Harden(pos world.BlockPos, w *world.World, flownIntoBy *world.BlockPos) bool
- func (Lava) HasLiquidDrops() bool
- func (Lava) HasNBT() bool
- func (l Lava) Hash() uint64
- func (Lava) LightDiffusionLevel() uint8
- func (Lava) LightEmissionLevel() uint8
- func (l Lava) LiquidDepth() int
- func (l Lava) LiquidFalling() bool
- func (Lava) LiquidType() string
- func (Lava) Model() world.BlockModel
- func (l Lava) NeighbourUpdateTick(pos, _ world.BlockPos, w *world.World)
- func (l Lava) RandomTick(pos world.BlockPos, w *world.World, r *rand.Rand)
- func (Lava) ReplaceableBy(world.Block) bool
- func (l Lava) ScheduledTick(pos world.BlockPos, w *world.World)
- func (Lava) SpreadDecay() int
- func (l Lava) WithDepth(depth int, falling bool) world.Liquid
- type Leaves
- func (l Leaves) BreakInfo() BreakInfo
- func (Leaves) CanDisplace(b world.Liquid) bool
- func (l Leaves) EncodeBlock() (name string, properties map[string]interface{})
- func (l Leaves) EncodeItem() (id int32, meta int16)
- func (l Leaves) FlammabilityInfo() FlammabilityInfo
- func (Leaves) HasNBT() bool
- func (l Leaves) Hash() uint64
- func (Leaves) LightDiffusionLevel() uint8
- func (Leaves) Model() world.BlockModel
- func (l Leaves) NeighbourUpdateTick(pos, _ world.BlockPos, w *world.World)
- func (l Leaves) RandomTick(pos world.BlockPos, w *world.World, r *rand.Rand)
- func (Leaves) SideClosed(world.BlockPos, world.BlockPos, *world.World) bool
- type Light
- func (l Light) EncodeBlock() (name string, properties map[string]interface{})
- func (l Light) EncodeItem() (id int32, meta int16)
- func (Light) HasNBT() bool
- func (l Light) Hash() uint64
- func (Light) LightDiffusionLevel() uint8
- func (l Light) LightEmissionLevel() uint8
- func (Light) Model() world.BlockModel
- func (Light) ReplaceableBy(world.Block) bool
- type LightDiffuser
- type LightEmitter
- type LiquidRemovable
- type LitPumpkin
- func (l LitPumpkin) BreakInfo() BreakInfo
- func (l LitPumpkin) EncodeBlock() (name string, properties map[string]interface{})
- func (l LitPumpkin) EncodeItem() (id int32, meta int16)
- func (LitPumpkin) HasNBT() bool
- func (l LitPumpkin) Hash() uint64
- func (l LitPumpkin) LightEmissionLevel() uint8
- func (LitPumpkin) Model() world.BlockModel
- func (l LitPumpkin) UseOnBlock(pos world.BlockPos, face world.Face, _ mgl64.Vec3, w *world.World, ...) (used bool)
- type Log
- func (l Log) BreakInfo() BreakInfo
- func (l Log) EncodeBlock() (name string, properties map[string]interface{})
- func (l Log) EncodeItem() (id int32, meta int16)
- func (l Log) FlammabilityInfo() FlammabilityInfo
- func (Log) HasNBT() bool
- func (l Log) Hash() uint64
- func (Log) Instrument() instrument.Instrument
- func (Log) Model() world.BlockModel
- func (l Log) UseOnBlock(pos world.BlockPos, face world.Face, _ mgl64.Vec3, w *world.World, ...) (used bool)
- type Melon
- type MelonSeeds
- func (m MelonSeeds) BoneMeal(pos world.BlockPos, w *world.World) bool
- func (m MelonSeeds) BreakInfo() BreakInfo
- func (c MelonSeeds) CalculateGrowthChance(pos world.BlockPos, w *world.World) float64
- func (m MelonSeeds) EncodeBlock() (name string, properties map[string]interface{})
- func (m MelonSeeds) EncodeItem() (id int32, meta int16)
- func (c MelonSeeds) GrowthStage() int
- func (c MelonSeeds) HasLiquidDrops() bool
- func (m MelonSeeds) Hash() uint64
- func (m MelonSeeds) NeighbourUpdateTick(pos, _ world.BlockPos, w *world.World)
- func (m MelonSeeds) RandomTick(pos world.BlockPos, w *world.World, r *rand.Rand)
- func (MelonSeeds) SameCrop(c Crop) bool
- func (m MelonSeeds) UseOnBlock(pos world.BlockPos, face world.Face, _ mgl64.Vec3, w *world.World, ...) bool
- type NetherBrickFence
- func (n NetherBrickFence) BreakInfo() BreakInfo
- func (NetherBrickFence) CanDisplace(b world.Liquid) bool
- func (n NetherBrickFence) EncodeItem() (id int32, meta int16)
- func (NetherBrickFence) HasNBT() bool
- func (NetherBrickFence) LightDiffusionLevel() uint8
- func (n NetherBrickFence) Model() world.BlockModel
- func (NetherBrickFence) SideClosed(world.BlockPos, world.BlockPos, *world.World) bool
- type NetherGoldOre
- type NetherQuartzOre
- type NetherWart
- func (n NetherWart) BreakInfo() BreakInfo
- func (n NetherWart) EncodeBlock() (name string, properties map[string]interface{})
- func (NetherWart) EncodeItem() (id int32, meta int16)
- func (n NetherWart) HasLiquidDrops() bool
- func (NetherWart) HasNBT() bool
- func (n NetherWart) Hash() uint64
- func (NetherWart) LightDiffusionLevel() uint8
- func (NetherWart) Model() world.BlockModel
- func (n NetherWart) NeighbourUpdateTick(pos, _ world.BlockPos, w *world.World)
- func (n NetherWart) RandomTick(pos world.BlockPos, w *world.World, r *rand.Rand)
- func (n NetherWart) UseOnBlock(pos world.BlockPos, face world.Face, clickPos mgl64.Vec3, w *world.World, ...) bool
- type NetheriteBlock
- type Netherrack
- type NoteBlock
- func (n NoteBlock) Activate(pos world.BlockPos, _ world.Face, w *world.World, _ item.User)
- func (n NoteBlock) BreakInfo() BreakInfo
- func (n NoteBlock) DecodeNBT(data map[string]interface{}) interface{}
- func (n NoteBlock) EncodeItem() (id int32, meta int16)
- func (n NoteBlock) EncodeNBT() map[string]interface{}
- func (NoteBlock) HasNBT() bool
- func (NoteBlock) Instrument() instrument.Instrument
- func (NoteBlock) Model() world.BlockModel
- func (n NoteBlock) Punch(pos world.BlockPos, _ world.Face, w *world.World, u item.User)
- type Obsidian
- type Placer
- type Planks
- func (p Planks) BreakInfo() BreakInfo
- func (p Planks) EncodeBlock() (name string, properties map[string]interface{})
- func (p Planks) EncodeItem() (id int32, meta int16)
- func (p Planks) FlammabilityInfo() FlammabilityInfo
- func (Planks) HasNBT() bool
- func (p Planks) Hash() uint64
- func (Planks) Instrument() instrument.Instrument
- func (Planks) Model() world.BlockModel
- type Potato
- func (p Potato) AlwaysConsumable() bool
- func (p Potato) BoneMeal(pos world.BlockPos, w *world.World) bool
- func (p Potato) BreakInfo() BreakInfo
- func (c Potato) CalculateGrowthChance(pos world.BlockPos, w *world.World) float64
- func (p Potato) Consume(_ *world.World, c item.Consumer) item.Stack
- func (p Potato) ConsumeDuration() time.Duration
- func (p Potato) EncodeBlock() (name string, properties map[string]interface{})
- func (p Potato) EncodeItem() (id int32, meta int16)
- func (c Potato) GrowthStage() int
- func (c Potato) HasLiquidDrops() bool
- func (p Potato) Hash() uint64
- func (c Potato) NeighbourUpdateTick(pos, _ world.BlockPos, w *world.World)
- func (p Potato) RandomTick(pos world.BlockPos, w *world.World, _ *rand.Rand)
- func (Potato) SameCrop(c Crop) bool
- func (p Potato) UseOnBlock(pos world.BlockPos, face world.Face, _ mgl64.Vec3, w *world.World, ...) bool
- type Pumpkin
- func (p Pumpkin) BreakInfo() BreakInfo
- func (p Pumpkin) EncodeBlock() (name string, properties map[string]interface{})
- func (p Pumpkin) EncodeItem() (id int32, meta int16)
- func (Pumpkin) HasNBT() bool
- func (p Pumpkin) Hash() uint64
- func (p Pumpkin) Instrument() instrument.Instrument
- func (Pumpkin) Model() world.BlockModel
- func (p Pumpkin) UseOnBlock(pos world.BlockPos, face world.Face, _ mgl64.Vec3, w *world.World, ...) (used bool)
- type PumpkinSeeds
- func (p PumpkinSeeds) BoneMeal(pos world.BlockPos, w *world.World) bool
- func (p PumpkinSeeds) BreakInfo() BreakInfo
- func (c PumpkinSeeds) CalculateGrowthChance(pos world.BlockPos, w *world.World) float64
- func (p PumpkinSeeds) EncodeBlock() (name string, properties map[string]interface{})
- func (p PumpkinSeeds) EncodeItem() (id int32, meta int16)
- func (c PumpkinSeeds) GrowthStage() int
- func (c PumpkinSeeds) HasLiquidDrops() bool
- func (p PumpkinSeeds) Hash() uint64
- func (p PumpkinSeeds) NeighbourUpdateTick(pos, _ world.BlockPos, w *world.World)
- func (p PumpkinSeeds) RandomTick(pos world.BlockPos, w *world.World, r *rand.Rand)
- func (PumpkinSeeds) SameCrop(c Crop) bool
- func (p PumpkinSeeds) UseOnBlock(pos world.BlockPos, face world.Face, _ mgl64.Vec3, w *world.World, ...) bool
- type Punchable
- type Quartz
- func (q Quartz) BreakInfo() BreakInfo
- func (q Quartz) EncodeBlock() (name string, properties map[string]interface{})
- func (q Quartz) EncodeItem() (id int32, meta int16)
- func (Quartz) HasNBT() bool
- func (q Quartz) Hash() uint64
- func (Quartz) Instrument() instrument.Instrument
- func (Quartz) Model() world.BlockModel
- type QuartzBricks
- type QuartzPillar
- func (q QuartzPillar) BreakInfo() BreakInfo
- func (q QuartzPillar) EncodeBlock() (name string, properties map[string]interface{})
- func (q QuartzPillar) EncodeItem() (id int32, meta int16)
- func (QuartzPillar) HasNBT() bool
- func (q QuartzPillar) Hash() uint64
- func (QuartzPillar) Instrument() instrument.Instrument
- func (QuartzPillar) Model() world.BlockModel
- func (q QuartzPillar) UseOnBlock(pos world.BlockPos, face world.Face, _ mgl64.Vec3, w *world.World, ...) (used bool)
- type Replaceable
- type Sand
- func (s Sand) BreakInfo() BreakInfo
- func (g Sand) CanSolidify(world.BlockPos, *world.World) bool
- func (s Sand) EncodeItem() (id int32, meta int16)
- func (Sand) HasNBT() bool
- func (Sand) Instrument() instrument.Instrument
- func (Sand) Model() world.BlockModel
- func (s Sand) NeighbourUpdateTick(pos, _ world.BlockPos, w *world.World)
- type SeaLantern
- func (s SeaLantern) BreakInfo() BreakInfo
- func (SeaLantern) EncodeItem() (id int32, meta int16)
- func (SeaLantern) HasNBT() bool
- func (SeaLantern) Instrument() instrument.Instrument
- func (SeaLantern) LightDiffusionLevel() uint8
- func (SeaLantern) LightEmissionLevel() uint8
- func (SeaLantern) Model() world.BlockModel
- type Shroomlight
- type SoulSand
- type SoulSoil
- type Sponge
- func (s Sponge) BreakInfo() BreakInfo
- func (s Sponge) EncodeItem() (id int32, meta int16)
- func (Sponge) HasNBT() bool
- func (Sponge) Model() world.BlockModel
- func (s Sponge) NeighbourUpdateTick(pos, _ world.BlockPos, w *world.World)
- func (s Sponge) UseOnBlock(pos world.BlockPos, face world.Face, _ mgl64.Vec3, w *world.World, ...) (used bool)
- type StainedGlass
- func (g StainedGlass) BreakInfo() BreakInfo
- func (g StainedGlass) EncodeBlock() (name string, properties map[string]interface{})
- func (g StainedGlass) EncodeItem() (id int32, meta int16)
- func (StainedGlass) HasNBT() bool
- func (g StainedGlass) Hash() uint64
- func (StainedGlass) Instrument() instrument.Instrument
- func (StainedGlass) LightDiffusionLevel() uint8
- func (StainedGlass) Model() world.BlockModel
- type StainedGlassPane
- func (p StainedGlassPane) BreakInfo() BreakInfo
- func (p StainedGlassPane) CanDisplace(b world.Liquid) bool
- func (p StainedGlassPane) EncodeBlock() (name string, properties map[string]interface{})
- func (p StainedGlassPane) EncodeItem() (id int32, meta int16)
- func (StainedGlassPane) HasNBT() bool
- func (p StainedGlassPane) Hash() uint64
- func (StainedGlassPane) Instrument() instrument.Instrument
- func (StainedGlassPane) LightDiffusionLevel() uint8
- func (StainedGlassPane) Model() world.BlockModel
- func (p StainedGlassPane) SideClosed(world.BlockPos, world.BlockPos, *world.World) bool
- type StainedTerracotta
- func (t StainedTerracotta) BreakInfo() BreakInfo
- func (t StainedTerracotta) EncodeBlock() (name string, properties map[string]interface{})
- func (t StainedTerracotta) EncodeItem() (id int32, meta int16)
- func (StainedTerracotta) HasNBT() bool
- func (t StainedTerracotta) Hash() uint64
- func (StainedTerracotta) Instrument() instrument.Instrument
- func (StainedTerracotta) Model() world.BlockModel
- type Stone
- type Terracotta
- type Torch
- func (t Torch) EncodeBlock() (name string, properties map[string]interface{})
- func (t Torch) EncodeItem() (id int32, meta int16)
- func (t Torch) HasLiquidDrops() bool
- func (Torch) HasNBT() bool
- func (t Torch) Hash() uint64
- func (Torch) LightDiffusionLevel() uint8
- func (t Torch) LightEmissionLevel() uint8
- func (Torch) Model() world.BlockModel
- func (t Torch) NeighbourUpdateTick(pos, _ world.BlockPos, w *world.World)
- func (t Torch) UseOnBlock(pos world.BlockPos, face world.Face, clickPos mgl64.Vec3, w *world.World, ...) bool
- type Water
- func (w Water) EncodeBlock() (name string, properties map[string]interface{})
- func (w Water) EntityCollide(e world.Entity)
- func (w Water) Harden(pos world.BlockPos, wo *world.World, flownIntoBy *world.BlockPos) bool
- func (Water) HasLiquidDrops() bool
- func (Water) HasNBT() bool
- func (w Water) Hash() uint64
- func (Water) LightDiffusionLevel() uint8
- func (w Water) LiquidDepth() int
- func (w Water) LiquidFalling() bool
- func (Water) LiquidType() string
- func (Water) Model() world.BlockModel
- func (Water) NeighbourUpdateTick(pos, _ world.BlockPos, wo *world.World)
- func (Water) ReplaceableBy(world.Block) bool
- func (w Water) ScheduledTick(pos world.BlockPos, wo *world.World)
- func (Water) SpreadDecay() int
- func (w Water) WithDepth(depth int, falling bool) world.Liquid
- type WheatSeeds
- func (s WheatSeeds) BoneMeal(pos world.BlockPos, w *world.World) bool
- func (s WheatSeeds) BreakInfo() BreakInfo
- func (c WheatSeeds) CalculateGrowthChance(pos world.BlockPos, w *world.World) float64
- func (s WheatSeeds) EncodeBlock() (name string, properties map[string]interface{})
- func (s WheatSeeds) EncodeItem() (id int32, meta int16)
- func (c WheatSeeds) GrowthStage() int
- func (c WheatSeeds) HasLiquidDrops() bool
- func (s WheatSeeds) Hash() uint64
- func (c WheatSeeds) NeighbourUpdateTick(pos, _ world.BlockPos, w *world.World)
- func (s WheatSeeds) RandomTick(pos world.BlockPos, w *world.World, _ *rand.Rand)
- func (WheatSeeds) SameCrop(c Crop) bool
- func (s WheatSeeds) UseOnBlock(pos world.BlockPos, face world.Face, _ mgl64.Vec3, w *world.World, ...) bool
- type WoodDoor
- func (d WoodDoor) Activate(pos world.BlockPos, _ world.Face, w *world.World, _ item.User)
- func (d WoodDoor) BreakInfo() BreakInfo
- func (d WoodDoor) CanDisplace(l world.Liquid) bool
- func (d WoodDoor) EncodeBlock() (name string, properties map[string]interface{})
- func (d WoodDoor) EncodeItem() (id int32, meta int16)
- func (d WoodDoor) FlammabilityInfo() FlammabilityInfo
- func (WoodDoor) HasNBT() bool
- func (d WoodDoor) Hash() uint64
- func (WoodDoor) Instrument() instrument.Instrument
- func (WoodDoor) LightDiffusionLevel() uint8
- func (d WoodDoor) Model() world.BlockModel
- func (d WoodDoor) NeighbourUpdateTick(pos, _ world.BlockPos, w *world.World)
- func (d WoodDoor) SideClosed(world.BlockPos, world.BlockPos, *world.World) bool
- func (d WoodDoor) UseOnBlock(pos world.BlockPos, face world.Face, _ mgl64.Vec3, w *world.World, ...) bool
- type WoodFence
- func (w WoodFence) BreakInfo() BreakInfo
- func (WoodFence) CanDisplace(b world.Liquid) bool
- func (w WoodFence) EncodeBlock() (name string, properties map[string]interface{})
- func (w WoodFence) EncodeItem() (id int32, meta int16)
- func (w WoodFence) FlammabilityInfo() FlammabilityInfo
- func (WoodFence) HasNBT() bool
- func (w WoodFence) Hash() uint64
- func (WoodFence) Instrument() instrument.Instrument
- func (WoodFence) LightDiffusionLevel() uint8
- func (w WoodFence) Model() world.BlockModel
- func (WoodFence) SideClosed(world.BlockPos, world.BlockPos, *world.World) bool
- type WoodFenceGate
- func (f WoodFenceGate) Activate(pos world.BlockPos, clickedFace world.Face, w *world.World, u item.User)
- func (f WoodFenceGate) BreakInfo() BreakInfo
- func (f WoodFenceGate) CanDisplace(b world.Liquid) bool
- func (f WoodFenceGate) EncodeBlock() (name string, properties map[string]interface{})
- func (f WoodFenceGate) EncodeItem() (id int32, meta int16)
- func (f WoodFenceGate) FlammabilityInfo() FlammabilityInfo
- func (WoodFenceGate) HasNBT() bool
- func (f WoodFenceGate) Hash() uint64
- func (WoodFenceGate) Instrument() instrument.Instrument
- func (WoodFenceGate) LightDiffusionLevel() uint8
- func (f WoodFenceGate) Model() world.BlockModel
- func (f WoodFenceGate) SideClosed(pos, side world.BlockPos, w *world.World) bool
- func (f WoodFenceGate) UseOnBlock(pos world.BlockPos, face world.Face, clickPos mgl64.Vec3, w *world.World, ...) bool
- type WoodSlab
- func (s WoodSlab) AABB(world.BlockPos, *world.World) []physics.AABB
- func (s WoodSlab) BreakInfo() BreakInfo
- func (s WoodSlab) CanDisplace(b world.Liquid) bool
- func (s WoodSlab) EncodeBlock() (name string, properties map[string]interface{})
- func (s WoodSlab) EncodeItem() (id int32, meta int16)
- func (s WoodSlab) FlammabilityInfo() FlammabilityInfo
- func (WoodSlab) HasNBT() bool
- func (s WoodSlab) Hash() uint64
- func (WoodSlab) Instrument() instrument.Instrument
- func (s WoodSlab) LightDiffusionLevel() uint8
- func (s WoodSlab) Model() world.BlockModel
- func (s WoodSlab) SideClosed(pos, side world.BlockPos, _ *world.World) bool
- func (s WoodSlab) UseOnBlock(pos world.BlockPos, face world.Face, clickPos mgl64.Vec3, w *world.World, ...) (used bool)
- type WoodStairs
- func (s WoodStairs) BreakInfo() BreakInfo
- func (WoodStairs) CanDisplace(b world.Liquid) bool
- func (s WoodStairs) EncodeBlock() (name string, properties map[string]interface{})
- func (s WoodStairs) EncodeItem() (id int32, meta int16)
- func (f WoodStairs) FlammabilityInfo() FlammabilityInfo
- func (WoodStairs) HasNBT() bool
- func (s WoodStairs) Hash() uint64
- func (WoodStairs) Instrument() instrument.Instrument
- func (WoodStairs) LightDiffusionLevel() uint8
- func (s WoodStairs) Model() world.BlockModel
- func (s WoodStairs) SideClosed(pos, side world.BlockPos, w *world.World) bool
- func (s WoodStairs) UseOnBlock(pos world.BlockPos, face world.Face, clickPos mgl64.Vec3, w *world.World, ...) (used bool)
- type WoodTrapdoor
- func (t WoodTrapdoor) Activate(pos world.BlockPos, _ world.Face, w *world.World, _ item.User)
- func (t WoodTrapdoor) BreakInfo() BreakInfo
- func (t WoodTrapdoor) CanDisplace(l world.Liquid) bool
- func (t WoodTrapdoor) EncodeBlock() (name string, properties map[string]interface{})
- func (t WoodTrapdoor) EncodeItem() (id int32, meta int16)
- func (t WoodTrapdoor) FlammabilityInfo() FlammabilityInfo
- func (WoodTrapdoor) HasNBT() bool
- func (t WoodTrapdoor) Hash() uint64
- func (WoodTrapdoor) Instrument() instrument.Instrument
- func (WoodTrapdoor) LightDiffusionLevel() uint8
- func (t WoodTrapdoor) Model() world.BlockModel
- func (t WoodTrapdoor) SideClosed(world.BlockPos, world.BlockPos, *world.World) bool
- func (t WoodTrapdoor) UseOnBlock(pos world.BlockPos, face world.Face, clickPos mgl64.Vec3, w *world.World, ...) bool
- type Wool
- func (w Wool) BreakInfo() BreakInfo
- func (w Wool) EncodeBlock() (name string, properties map[string]interface{})
- func (w Wool) EncodeItem() (id int32, meta int16)
- func (w Wool) FlammabilityInfo() FlammabilityInfo
- func (Wool) HasNBT() bool
- func (w Wool) Hash() uint64
- func (w Wool) Instrument() instrument.Instrument
- func (Wool) Model() world.BlockModel
- type XPDropRange
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BreakDuration ¶
BreakDuration returns the base duration that breaking the block passed takes when being broken using the item passed.
func BreaksInstantly ¶
BreaksInstantly checks if the block passed can be broken instantly using the item stack passed to break it.
func FlammableBlock ¶
FlammableBlock returns true if a block is flammable.
func Parse ¶
Parse attempts to parse a string passed into a slice of blocks. The string passed is a list of either one or more blocks, separated using a comma. If parsing the string was not successful, the slice returned is nil and an error is returned explaining the reason the string could not be parsed.
Parse parses strings in a rather specific format. The strings accepted may look like the following: "andesite" "andesite,log[wood=oak]" "log,leaves[wood=spruce,persistent=true]" The properties, which are optional, are identical to the fields of the blocks registered, except for being fully lowercase.
Errors returned by Parse are explicitly user-friendly. They are fit to be displayed to the end user supplying the string. noinspection GoErrorStringFormat
Types ¶
type Activatable ¶
type Activatable interface { // Activate activates the block at a specific block position. The face clicked is passed, as well as the // world in which the block was activated and the viewer that activated it. Activate(pos world.BlockPos, clickedFace world.Face, w *world.World, u item.User) }
Activatable represents a block that may be activated by a viewer of the world. When activated, the block will execute some specific logic.
type Air ¶
type Air struct {
// contains filtered or unexported fields
}
Air is the block present in otherwise empty space.
type AncientDebris ¶
type AncientDebris struct {
// contains filtered or unexported fields
}
AncientDebris is a rare ore found within The Nether.
func (AncientDebris) EncodeItem ¶
func (a AncientDebris) EncodeItem() (id int32, meta int16)
EncodeItem ...
type Barrier ¶
type Barrier struct {
// contains filtered or unexported fields
}
Barrier is a transparent solid block used to create invisible boundaries.
func (Barrier) LightDiffusionLevel ¶
func (Barrier) LightDiffusionLevel() uint8
LightDiffusionLevel ...
type Basalt ¶
type Basalt struct { // Polished specifies if the basalt is its polished variant. Polished bool // Axis is the axis which the basalt faces. Axis world.Axis // contains filtered or unexported fields }
Basalt is a type of igneous rock found in the Nether.
func (Basalt) EncodeBlock ¶
EncodeBlock ...
type Beacon ¶
type Beacon struct {
// Primary and Secondary are the primary and secondary effects broadcast to nearby entities by the
// beacon.
Primary, Secondary effect.Effect
// contains filtered or unexported fields
}
Beacon is a block that projects a light beam skyward, and can provide status effects such as Speed, Jump Boost, Haste, Regeneration, Resistance, or Strength to nearby players.
func (Beacon) Level ¶
Level returns an integer 0-4 which defines the current pyramid level of the beacon.
func (Beacon) LightDiffusionLevel ¶
func (Beacon) LightDiffusionLevel() uint8
LightDiffusionLevel ...
func (Beacon) SideClosed ¶
SideClosed ...
type BeaconSource ¶
type BeaconSource interface { // PowersBeacon returns a bool which indicates whether this block can contribute to powering up a // beacon pyramid. PowersBeacon() bool }
BeaconSource represents a block which is capable of contributing to powering a beacon pyramid.
type Bedrock ¶
type Bedrock struct { // InfiniteBurning specifies if the bedrock block is set aflame and will burn forever. This is the case // for bedrock found under end crystals on top of the end pillars. InfiniteBurning bool // contains filtered or unexported fields }
Bedrock is a block that is indestructible in survival.
func (Bedrock) EncodeBlock ¶
EncodeBlock ...
func (Bedrock) LightDiffusionLevel ¶
func (Bedrock) LightDiffusionLevel() uint8
LightDiffusionLevel ...
type BeetrootSeeds ¶
type BeetrootSeeds struct {
// contains filtered or unexported fields
}
BeetrootSeeds are a crop that can be harvested to craft soup or red dye.
func (BeetrootSeeds) CalculateGrowthChance ¶
CalculateGrowthChance calculates the chance the crop will grow during a random tick.
func (BeetrootSeeds) EncodeBlock ¶
func (b BeetrootSeeds) EncodeBlock() (name string, properties map[string]interface{})
EncodeBlock ...
func (BeetrootSeeds) EncodeItem ¶
func (b BeetrootSeeds) EncodeItem() (id int32, meta int16)
EncodeItem ...
func (BeetrootSeeds) GrowthStage ¶
func (c BeetrootSeeds) GrowthStage() int
GrowthStage returns the current stage of growth.
func (BeetrootSeeds) HasLiquidDrops ¶
func (c BeetrootSeeds) HasLiquidDrops() bool
HasLiquidDrops ...
func (BeetrootSeeds) NeighbourUpdateTick ¶
NeighbourUpdateTick ...
func (BeetrootSeeds) RandomTick ¶
RandomTick ...
type BlueIce ¶
type BlueIce struct {
// contains filtered or unexported fields
}
BlueIce is a solid block similar to packed ice.
func (BlueIce) LightEmissionLevel ¶
LightEmissionLevel ...
type BoneBlock ¶
type BoneBlock struct { // Axis is the axis which the bone block faces. Axis world.Axis // contains filtered or unexported fields }
BoneBlock is a decorative block that can face different directions.
func (BoneBlock) EncodeBlock ¶
EncodeBlock ...
type BoneMealAffected ¶
type BoneMealAffected interface { // BoneMeal attempts to affect the block using a bone meal item. BoneMeal(pos world.BlockPos, w *world.World) bool }
BoneMealAffected represents a block that is affected when bonemeal is used on it.
type BreakInfo ¶
type BreakInfo struct { // Hardness is the hardness of the block, which influences the speed with which the block may be mined. Hardness float64 // Harvestable is a function called to check if the block is harvestable using the tool passed. If the // item used to break the block is not a tool, a tool.None is passed. Harvestable func(t tool.Tool) bool // Effective is a function called to check if the block can be mined more effectively with the tool passed // than with an empty hand. Effective func(t tool.Tool) bool // Drops is a function called to get the drops of the block if it is broken using the tool passed. If the // item used to break the block is not a tool, a tool.None is passed. Drops func(t tool.Tool) []item.Stack // XPDrops is the range of XP a block can drop when broken. XPDrops XPDropRange }
BreakInfo is a struct returned by every block. It holds information on block breaking related data, such as the tool type and tier required to break it.
type Breakable ¶
type Breakable interface { // BreakInfo returns information of the block related to the breaking of it. BreakInfo() BreakInfo }
Breakable represents a block that may be broken by a player in survival mode. Blocks not include are blocks such as bedrock.
type Bricks ¶
type Bricks struct {
// contains filtered or unexported fields
}
Bricks are decorative building blocks.
type Cake ¶
type Cake struct { // Bites is the amount of bites taken out of the cake. Bites int // contains filtered or unexported fields }
Cake is an edible block.
func (Cake) EncodeBlock ¶
EncodeBlock ...
func (Cake) NeighbourUpdateTick ¶
NeighbourUpdateTick ...
func (Cake) SideClosed ¶
SideClosed ...
type Carpet ¶
type Carpet struct { // Colour is the colour of the carpet. Colour colour.Colour // contains filtered or unexported fields }
Carpet is a colourful block that can be obtained by killing/shearing sheep, or crafted using four string.
func (Carpet) EncodeBlock ¶
EncodeBlock ...
func (Carpet) FlammabilityInfo ¶
func (c Carpet) FlammabilityInfo() FlammabilityInfo
FlammabilityInfo ...
func (Carpet) LightDiffusionLevel ¶
func (Carpet) LightDiffusionLevel() uint8
LightDiffusionLevel ...
func (Carpet) NeighbourUpdateTick ¶
NeighbourUpdateTick ...
func (Carpet) SideClosed ¶
SideClosed ...
type Carrot ¶
type Carrot struct {
// contains filtered or unexported fields
}
Carrot is a crop that can be consumed raw.
func (Carrot) CalculateGrowthChance ¶
CalculateGrowthChance calculates the chance the crop will grow during a random tick.
func (Carrot) EncodeBlock ¶
EncodeBlock ...
func (Carrot) GrowthStage ¶
func (c Carrot) GrowthStage() int
GrowthStage returns the current stage of growth.
func (Carrot) NeighbourUpdateTick ¶
NeighbourUpdateTick ...
func (Carrot) RandomTick ¶
RandomTick ...
type Chest ¶
type Chest struct { // Facing is the direction that the chest is facing. Facing world.Direction // CustomName is the custom name of the chest. This name is displayed when the chest is opened, and may // include colour codes. CustomName string // contains filtered or unexported fields }
Chest is a container block which may be used to store items. Chests may also be paired to create a bigger single container. The empty value of Chest is not valid. It must be created using item.NewChest(). TODO: Redo inventory stuff in here. The inventory should be moved to a different place in world.World so
that this block can be hashed properly.
func NewChest ¶
func NewChest() Chest
NewChest creates a new initialised chest. The inventory is properly initialised.
func (Chest) AddViewer ¶
AddViewer adds a viewer to the chest, so that it is updated whenever the inventory of the chest is changed.
func (Chest) Drops ¶
Drops returns the drops of the chest. This includes all items held in the inventory and the chest itself.
func (Chest) EncodeBlock ¶
EncodeBlock ...
func (Chest) FlammabilityInfo ¶
func (c Chest) FlammabilityInfo() FlammabilityInfo
FlammabilityInfo ...
func (Chest) Inventory ¶
Inventory returns the inventory of the chest. The size of the inventory will be 27 or 54, depending on whether the chest is single or double.
func (Chest) RemoveViewer ¶
RemoveViewer removes a viewer from the chest, so that slot updates in the inventory are no longer sent to it.
func (Chest) SideClosed ¶
SideClosed ...
type ChiseledQuartz ¶
type ChiseledQuartz struct {
// contains filtered or unexported fields
}
ChiseledQuartz is a mineral block used only for decoration.
func (ChiseledQuartz) EncodeBlock ¶
func (ChiseledQuartz) EncodeBlock() (name string, properties map[string]interface{})
EncodeBlock ...
func (ChiseledQuartz) EncodeItem ¶
func (c ChiseledQuartz) EncodeItem() (id int32, meta int16)
EncodeItem ...
func (ChiseledQuartz) Instrument ¶
func (ChiseledQuartz) Instrument() instrument.Instrument
Instrument ...
type Clay ¶
type Clay struct {
// contains filtered or unexported fields
}
Clay is a block that can be found underwater.
func (Clay) EncodeBlock ¶
EncodeBlock ...
type CoalBlock ¶
type CoalBlock struct {
// contains filtered or unexported fields
}
CoalBlock is a precious mineral block made from 9 coal.
func (CoalBlock) EncodeBlock ¶
EncodeBlock ...
func (CoalBlock) FlammabilityInfo ¶
func (c CoalBlock) FlammabilityInfo() FlammabilityInfo
FlammabilityInfo ...
type CoalOre ¶
type CoalOre struct {
// contains filtered or unexported fields
}
CoalOre is a common ore.
type Cobblestone ¶
type Cobblestone struct { // Mossy specifies if the cobblestone is mossy. This variant of cobblestone is typically found in // dungeons or in small clusters in the giant tree taiga biome. Mossy bool // contains filtered or unexported fields }
Cobblestone is a common block, obtained from mining stone.
func (Cobblestone) EncodeItem ¶
func (c Cobblestone) EncodeItem() (id int32, meta int16)
EncodeItem ...
func (Cobblestone) Instrument ¶
func (Cobblestone) Instrument() instrument.Instrument
Instrument ...
type CocoaBean ¶
type CocoaBean struct { // Facing is the direction from the cocoa bean to the log. Facing world.Direction // Age is the stage of the cocoa bean's growth. 2 is fully grown. Age int // contains filtered or unexported fields }
CocoaBean is a crop block found in Jungle biomes.
func (CocoaBean) EncodeBlock ¶
EncodeBlock ...
func (CocoaBean) LightDiffusionLevel ¶
func (CocoaBean) LightDiffusionLevel() uint8
LightDiffusionLevel ...
func (CocoaBean) NeighbourUpdateTick ¶
NeighbourUpdateTick ...
func (CocoaBean) RandomTick ¶
RandomTick ...
type Concrete ¶
type Concrete struct { // Colour is the colour of the concrete block. Colour colour.Colour // contains filtered or unexported fields }
Concrete is a solid block which comes in the 16 regular dye colors, created by placing concrete powder adjacent to water.
func (Concrete) EncodeBlock ¶
EncodeBlock ...
type ConcretePowder ¶
type ConcretePowder struct { // Colour is the colour of the concrete powder. Colour colour.Colour // contains filtered or unexported fields }
ConcretePowder is a gravity affected block that comes in 16 different colours. When interacting with water, it becomes concrete.
func (ConcretePowder) CanSolidify ¶
CanSolidify ...
func (ConcretePowder) EncodeBlock ¶
func (c ConcretePowder) EncodeBlock() (name string, properties map[string]interface{})
EncodeBlock ...
func (ConcretePowder) EncodeItem ¶
func (c ConcretePowder) EncodeItem() (id int32, meta int16)
EncodeItem ...
func (ConcretePowder) Instrument ¶
func (ConcretePowder) Instrument() instrument.Instrument
Instrument ...
func (ConcretePowder) NeighbourUpdateTick ¶
func (c ConcretePowder) NeighbourUpdateTick(pos, _ world.BlockPos, w *world.World)
NeighbourUpdateTick ...
type Container ¶
type Container interface { AddViewer(v ContainerViewer, w *world.World, pos world.BlockPos) RemoveViewer(v ContainerViewer, w *world.World, pos world.BlockPos) Inventory() *inventory.Inventory }
Container represents a container of items, typically a block such as a chest. Containers may have their inventory opened by viewers.
type ContainerOpener ¶
type ContainerOpener interface { // OpenBlockContainer opens a block container at the position passed. OpenBlockContainer(pos world.BlockPos) }
ContainerOpener represents an entity that is able to open a container.
type ContainerViewer ¶
type ContainerViewer interface { // ViewSlotChange views a change of a single slot in the inventory, in which the item was changed to the // new item passed. ViewSlotChange(slot int, newItem item.Stack) }
ContainerViewer represents a viewer that is able to view a container and its inventory.
type Coral ¶
type Coral struct { // Type is the type of coral of the block. Type coral.Coral // Dead is whether the coral is dead. Dead bool // contains filtered or unexported fields }
Coral is a non solid block that comes in 5 variants.
func (Coral) EncodeBlock ¶
EncodeBlock ...
func (Coral) NeighbourUpdateTick ¶
NeighbourUpdateTick ...
func (Coral) ScheduledTick ¶
ScheduledTick ...
func (Coral) SideClosed ¶
SideClosed ...
type CoralBlock ¶
type CoralBlock struct { // Type is the type of coral of the block. Type coral.Coral // Dead is whether the coral block is dead. Dead bool // contains filtered or unexported fields }
CoralBlock is a solid block that comes in 5 variants.
func (CoralBlock) EncodeBlock ¶
func (c CoralBlock) EncodeBlock() (name string, properties map[string]interface{})
EncodeBlock ...
func (CoralBlock) EncodeItem ¶
func (c CoralBlock) EncodeItem() (id int32, meta int16)
EncodeItem ...
func (CoralBlock) NeighbourUpdateTick ¶
func (c CoralBlock) NeighbourUpdateTick(pos, changedNeighbour world.BlockPos, w *world.World)
NeighbourUpdateTick ...
func (CoralBlock) ScheduledTick ¶
func (c CoralBlock) ScheduledTick(pos world.BlockPos, w *world.World)
ScheduledTick ...
type Crop ¶
type Crop interface { // GrowthStage returns the crop's current stage of growth. The max value is 7. GrowthStage() int // SameCrop checks if two crops are of the same type. SameCrop(c Crop) bool }
Crop is an interface for all crops that are grown on farmland. A crop has a random chance to grow during random ticks.
type CryingObsidian ¶
type CryingObsidian struct {
// contains filtered or unexported fields
}
CryingObsidian is a luminous variant of obsidian that can be used to craft a respawn anchor and produces purple particles when placed.
func (CryingObsidian) EncodeItem ¶
func (CryingObsidian) EncodeItem() (id int32, meta int16)
EncodeItem ...
func (CryingObsidian) Instrument ¶
func (CryingObsidian) Instrument() instrument.Instrument
Instrument ...
func (CryingObsidian) LightEmissionLevel ¶
func (CryingObsidian) LightEmissionLevel() uint8
LightEmissionLevel ...
type DiamondBlock ¶
type DiamondBlock struct {
// contains filtered or unexported fields
}
DiamondBlock is a block which can only be gained by crafting it.
func (DiamondBlock) EncodeItem ¶
func (DiamondBlock) EncodeItem() (id int32, meta int16)
EncodeItem ...
type DiamondOre ¶
type DiamondOre struct {
// contains filtered or unexported fields
}
DiamondOre is a rare ore that generates underground.
func (DiamondOre) EncodeItem ¶
func (d DiamondOre) EncodeItem() (id int32, meta int16)
EncodeItem ...
type Dirt ¶
type Dirt struct { // Coarse specifies if the dirt should be off the coarse dirt variant. Grass blocks won't spread on // the block if set to true. Coarse bool // contains filtered or unexported fields }
Dirt is a block found abundantly in most biomes under a layer of grass blocks at the top of the normal world.
type DragonEgg ¶
type DragonEgg struct {
// contains filtered or unexported fields
}
DragonEgg is a decorative block or a "trophy item", and the rarest item in the game.
func (DragonEgg) CanSolidify ¶
CanSolidify ...
func (DragonEgg) LightDiffusionLevel ¶
func (DragonEgg) LightDiffusionLevel() uint8
LightDiffusionLevel ...
func (DragonEgg) LightEmissionLevel ¶
LightEmissionLevel ...
func (DragonEgg) NeighbourUpdateTick ¶
NeighbourUpdateTick ...
type EmeraldBlock ¶
type EmeraldBlock struct {
// contains filtered or unexported fields
}
EmeraldBlock is a precious mineral block crafted using 9 emeralds.
func (EmeraldBlock) EncodeItem ¶
func (EmeraldBlock) EncodeItem() (id int32, meta int16)
EncodeItem ...
func (EmeraldBlock) Instrument ¶
func (e EmeraldBlock) Instrument() instrument.Instrument
Instrument ...
type EmeraldOre ¶
type EmeraldOre struct {
// contains filtered or unexported fields
}
EmeraldOre is an ore generating exclusively under mountain biomes.
func (EmeraldOre) EncodeItem ¶
func (e EmeraldOre) EncodeItem() (id int32, meta int16)
EncodeItem ...
type EndBrickStairs ¶
type EndBrickStairs struct { // UpsideDown specifies if the stairs are upside down. If set to true, the full side is at the top part // of the block. UpsideDown bool // Facing is the direction that the full side of the stairs is facing. Facing world.Direction // contains filtered or unexported fields }
EndBrickStairs are blocks that allow entities to walk up blocks without jumping. They are crafted using end bricks.
func (EndBrickStairs) CanDisplace ¶
func (EndBrickStairs) CanDisplace(b world.Liquid) bool
CanDisplace ...
func (EndBrickStairs) EncodeBlock ¶
func (s EndBrickStairs) EncodeBlock() (name string, properties map[string]interface{})
EncodeBlock ...
func (EndBrickStairs) EncodeItem ¶
func (s EndBrickStairs) EncodeItem() (id int32, meta int16)
EncodeItem ...
func (EndBrickStairs) LightDiffusionLevel ¶
func (EndBrickStairs) LightDiffusionLevel() uint8
LightDiffusionLevel ...
func (EndBrickStairs) SideClosed ¶
SideClosed ...
func (EndBrickStairs) UseOnBlock ¶
func (s EndBrickStairs) UseOnBlock(pos world.BlockPos, face world.Face, clickPos mgl64.Vec3, w *world.World, user item.User, ctx *item.UseContext) (used bool)
UseOnBlock handles the directional placing of stairs and makes sure they are properly placed upside down when needed.
type EndBricks ¶
type EndBricks struct {
// contains filtered or unexported fields
}
EndBricks is a block made from combining four endstone blocks together.
type EndStone ¶
type EndStone struct {
// contains filtered or unexported fields
}
EndStone is a block found in The End.
type EntityCollider ¶
type EntityCollider interface { // EntityCollide is called on entity collision. EntityCollide(e world.Entity) }
EntityCollider is an interface for blocks with special behaviors on entity collision.
type Farmland ¶
type Farmland struct { // Hydration is how much moisture the farmland block has. Hydration starts at 0 & caps at 7. During a random tick // update, if there is water within 4 blocks from the farmland block, hydration is set to 7. Otherwise, it // decreases until it turns into dirt. Hydration int // contains filtered or unexported fields }
Farmland is a block that crops are grown on. Farmland is created by interacting with a grass or dirt block using a hoe. Farmland can be hydrated by nearby water, with no hydration resulting in it turning into a dirt block.
func (Farmland) EncodeBlock ¶
EncodeBlock ...
func (Farmland) NeighbourUpdateTick ¶
NeighbourUpdateTick ...
type Fire ¶
type Fire struct { // Type is the type of fire. Type fire.Fire // Age affects how fire extinguishes. Newly placed fire starts at 0 and the value has a 1/3 chance of incrementing // each block tick. Age int // contains filtered or unexported fields }
Fire is a non-solid block that can spread to nearby flammable blocks.
func (Fire) EncodeBlock ¶
EncodeBlock ...
func (Fire) NeighbourUpdateTick ¶
NeighbourUpdateTick ...
func (Fire) RandomTick ¶
RandomTick ...
type FlammabilityInfo ¶
type FlammabilityInfo struct { // Encouragement is the chance a block will catch on fire during attempted fire spread. Encouragement, Flammability int // LavaFlammable returns whether it can catch on fire from lava. LavaFlammable bool }
FlammabilityInfo contains values related to block behaviors involving fire.
type Flammable ¶
type Flammable interface { // FlammabilityInfo returns information about a blocks behavior involving fire. FlammabilityInfo() FlammabilityInfo }
Flammable is an interface for blocks that can catch on fire.
type FromStringer ¶
FromStringer represents a type that is able to return a specific variant of itself by reading the string passed.
type GildedBlackstone ¶
type GildedBlackstone struct {
// contains filtered or unexported fields
}
GildedBlackstone is a variant of blackstone that can drop itself or gold nuggets when mined.
func (GildedBlackstone) EncodeItem ¶
func (GildedBlackstone) EncodeItem() (id int32, meta int16)
EncodeItem ...
type Glass ¶
type Glass struct {
// contains filtered or unexported fields
}
Glass is a decorative, fully transparent solid block that can be dyed into stained glass.
type GlassPane ¶
type GlassPane struct {
// contains filtered or unexported fields
}
GlassPane is a transparent block that can be used as a more efficient alternative to glass blocks.
func (GlassPane) LightDiffusionLevel ¶
func (GlassPane) LightDiffusionLevel() uint8
LightDiffusionLevel ...
type GlazedTerracotta ¶
type GlazedTerracotta struct { // Colour specifies the colour of the block. Colour colour.Colour // Facing specifies the face of the block. Facing world.Direction // contains filtered or unexported fields }
GlazedTerracotta is a vibrant solid block that comes in the 16 regular dye colours.
func (GlazedTerracotta) EncodeBlock ¶
func (t GlazedTerracotta) EncodeBlock() (name string, properties map[string]interface{})
EncodeBlock ...
func (GlazedTerracotta) EncodeItem ¶
func (t GlazedTerracotta) EncodeItem() (id int32, meta int16)
EncodeItem ...
func (GlazedTerracotta) Instrument ¶
func (GlazedTerracotta) Instrument() instrument.Instrument
Instrument ...
func (GlazedTerracotta) UseOnBlock ¶
func (t GlazedTerracotta) UseOnBlock(pos world.BlockPos, face world.Face, _ mgl64.Vec3, w *world.World, user item.User, ctx *item.UseContext) (used bool)
UseOnBlock ensures the proper facing is used when placing a glazed terracotta block, by using the opposite of the player.
type Glowstone ¶
type Glowstone struct {
// contains filtered or unexported fields
}
Glowstone is commonly found on the ceiling of the nether dimension.
func (Glowstone) LightEmissionLevel ¶
LightEmissionLevel returns 15.
type GoldBlock ¶
type GoldBlock struct {
// contains filtered or unexported fields
}
GoldBlock is a precious metal block crafted from 9 gold ingots.
type GoldOre ¶
type GoldOre struct {
// contains filtered or unexported fields
}
GoldOre is a rare mineral block found underground.
type Grass ¶
type Grass struct {
// contains filtered or unexported fields
}
Grass blocks generate abundantly across the surface of the world.
type GrassPath ¶
type GrassPath struct {
// contains filtered or unexported fields
}
GrassPath is a decorative block that can be created by using a shovel on a grass block.
func (GrassPath) LightDiffusionLevel ¶
func (GrassPath) LightDiffusionLevel() uint8
LightDiffusionLevel ...
type Gravel ¶
type Gravel struct {
// contains filtered or unexported fields
}
Gravel is a block affected by gravity. It has a 10% chance of dropping flint instead of itself on break.
func (Gravel) CanSolidify ¶
CanSolidify ...
type GravityAffected ¶
type GravityAffected interface { // CanSolidify returns whether the falling block can return back to a normal block without being on the ground. CanSolidify(pos world.BlockPos, w *world.World) bool }
GravityAffected represents blocks affected by gravity.
type InstrumentBlock ¶
type InstrumentBlock interface { // Instrument returns the instrument used. Instrument() instrument.Instrument }
InstrumentBlock represents a block that creates a note block sound other than the piano.
type InvisibleBedrock ¶
type InvisibleBedrock struct {
// contains filtered or unexported fields
}
InvisibleBedrock is an indestructible, solid block, similar to bedrock and has the appearance of air. It shares many of its properties with barriers.
func (InvisibleBedrock) EncodeItem ¶
func (InvisibleBedrock) EncodeItem() (id int32, meta int16)
EncodeItem ...
func (InvisibleBedrock) LightDiffusionLevel ¶
func (InvisibleBedrock) LightDiffusionLevel() uint8
LightDiffusionLevel ...
type IronBars ¶
type IronBars struct {
// contains filtered or unexported fields
}
IronBars are blocks that serve a similar purpose to glass panes, but made of iron instead of glass.
func (IronBars) LightDiffusionLevel ¶
func (IronBars) LightDiffusionLevel() uint8
LightDiffusionLevel ...
type IronBlock ¶
type IronBlock struct {
// contains filtered or unexported fields
}
IronBlock is a precious metal block made from 9 iron ingots.
type IronOre ¶
type IronOre struct {
// contains filtered or unexported fields
}
IronOre is a mineral block found underground.
type Kelp ¶
type Kelp struct { // Age is the age of the kelp block which can be 0-25. If age is 25, kelp won't grow any further. Age int // contains filtered or unexported fields }
Kelp is an underwater block which can grow on top of solids underwater.
func (Kelp) CanDisplace ¶
CanDisplace will return true if the liquid is Water, since kelp can waterlog.
func (Kelp) EncodeBlock ¶
EncodeBlock ...
func (Kelp) NeighbourUpdateTick ¶
NeighbourUpdateTick ...
func (Kelp) RandomTick ¶
RandomTick ...
func (Kelp) SideClosed ¶
SideClosed will always return false since kelp doesn't close any side.
type Lantern ¶
type Lantern struct { // Hanging determines if a lantern is hanging off a block. Hanging bool // Type of fire lighting the lantern. Type fire.Fire // contains filtered or unexported fields }
Lantern is a light emitting block.
func (Lantern) EncodeBlock ¶
EncodeBlock ...
func (Lantern) LightDiffusionLevel ¶
func (Lantern) LightDiffusionLevel() uint8
LightDiffusionLevel ...
func (Lantern) LightEmissionLevel ¶
LightEmissionLevel ...
func (Lantern) NeighbourUpdateTick ¶
NeighbourUpdateTick ...
type LapisBlock ¶
type LapisBlock struct {
// contains filtered or unexported fields
}
LapisBlock is a decorative mineral block that is crafted from lapis lazuli.
type LapisOre ¶
type LapisOre struct {
// contains filtered or unexported fields
}
LapisOre is an ore block from which lapis lazuli is obtained.
type Lava ¶
type Lava struct { // Still makes the lava not spread whenever it is updated. Still lava cannot be acquired in the game // without world editing. Still bool // Depth is the depth of the water. This is a number from 1-8, where 8 is a source block and 1 is the // smallest possible lava block. Depth int // Falling specifies if the lava is falling. Falling lava will always appear as a source block, but its // behaviour differs when it starts spreading. Falling bool // contains filtered or unexported fields }
Lava is a light-emitting fluid block that causes fire damage.
func (Lava) EncodeBlock ¶
EncodeBlock ...
func (Lava) LightDiffusionLevel ¶
LightDiffusionLevel always returns 2.
func (Lava) LightEmissionLevel ¶
LightEmissionLevel returns 15.
func (Lava) LiquidDepth ¶
LiquidDepth returns the depth of the lava.
func (Lava) LiquidFalling ¶
LiquidFalling checks if the lava is falling.
func (Lava) LiquidType ¶
LiquidType returns "lava" as a unique identifier for the lava liquid.
func (Lava) NeighbourUpdateTick ¶
NeighbourUpdateTick ...
func (Lava) RandomTick ¶
RandomTick ...
func (Lava) ScheduledTick ¶
ScheduledTick ...
type Leaves ¶
type Leaves struct { // Wood is the type of wood of the leaves. This field must have one of the values found in the material // package. Wood wood.Wood // Persistent specifies if the leaves are persistent, meaning they will not decay as a result of no wood // being nearby. Persistent bool // contains filtered or unexported fields }
Leaves are blocks that grow as part of trees which mainly drop saplings and sticks.
func (Leaves) EncodeBlock ¶
EncodeBlock ...
func (Leaves) FlammabilityInfo ¶
func (l Leaves) FlammabilityInfo() FlammabilityInfo
FlammabilityInfo ...
func (Leaves) LightDiffusionLevel ¶
LightDiffusionLevel ...
func (Leaves) NeighbourUpdateTick ¶
NeighbourUpdateTick ...
func (Leaves) RandomTick ¶
RandomTick ...
type Light ¶
type Light struct { // Level is the light level that the light block produces. It is a number from 0-15, where 15 is the // brightest and 0 is no light at all. Level int // contains filtered or unexported fields }
Light is an invisible block that can produce any light level.
func (Light) EncodeBlock ¶
EncodeBlock ...
type LightDiffuser ¶
type LightDiffuser interface { // LightDiffusionLevel returns the amount of light levels that is subtracted when light passes through // this block. Some blocks, such as leaves, have this behaviour. A diffusion level of 15 means that all // light will be completely blocked when it passes through the block. LightDiffusionLevel() uint8 }
LightDiffuser represents a block that diffuses light. This means that a specific amount of light levels will be subtracted when light passes through the block. Blocks that do not implement LightDiffuser will be assumed to be solid: Light will not be able to pass through these blocks.
type LightEmitter ¶
type LightEmitter interface { // LightEmissionLevel returns the light emission level of the block, a number from 0-15 where 15 is the // brightest and 0 means it doesn't emit light at all. LightEmissionLevel() uint8 }
LightEmitter represents a block that emits light when placed. Blocks such as torches or lanterns implement this interface.
type LiquidRemovable ¶
type LiquidRemovable interface {
HasLiquidDrops() bool
}
LiquidRemovable represents a block that may be removed by a liquid flowing into it. When this happens, the block's drops are dropped at the position if HasLiquidDrops returns true.
type LitPumpkin ¶
type LitPumpkin struct { // Facing is the direction the pumpkin is facing. Facing world.Direction // contains filtered or unexported fields }
LitPumpkin is a decorative light emitting block crafted with a Carved Pumpkin & Torch
func (LitPumpkin) EncodeBlock ¶
func (l LitPumpkin) EncodeBlock() (name string, properties map[string]interface{})
EncodeBlock ...
func (LitPumpkin) EncodeItem ¶
func (l LitPumpkin) EncodeItem() (id int32, meta int16)
EncodeItem ...
func (LitPumpkin) LightEmissionLevel ¶
func (l LitPumpkin) LightEmissionLevel() uint8
LightEmissionLevel ...
type Log ¶
type Log struct { // Wood is the type of wood of the log. This field must have one of the values found in the material // package. Wood wood.Wood // Stripped specifies if the log is stripped or not. Stripped bool // Axis is the axis which the log block faces. Axis world.Axis // contains filtered or unexported fields }
Log is a naturally occurring block found in trees, primarily used to create planks. It comes in six species: oak, spruce, birch, jungle, acacia, and dark oak. Stripped log is a variant obtained by using an axe on a log.
func (Log) EncodeBlock ¶
EncodeBlock ...
type Melon ¶
type Melon struct {
// contains filtered or unexported fields
}
Melon is a fruit block that grows from melon stems.
type MelonSeeds ¶
type MelonSeeds struct {
// contains filtered or unexported fields
}
MelonSeeds grow melon blocks.
func (MelonSeeds) CalculateGrowthChance ¶
CalculateGrowthChance calculates the chance the crop will grow during a random tick.
func (MelonSeeds) EncodeBlock ¶
func (m MelonSeeds) EncodeBlock() (name string, properties map[string]interface{})
EncodeBlock ...
func (MelonSeeds) EncodeItem ¶
func (m MelonSeeds) EncodeItem() (id int32, meta int16)
EncodeItem ...
func (MelonSeeds) GrowthStage ¶
func (c MelonSeeds) GrowthStage() int
GrowthStage returns the current stage of growth.
func (MelonSeeds) NeighbourUpdateTick ¶
func (m MelonSeeds) NeighbourUpdateTick(pos, _ world.BlockPos, w *world.World)
NeighbourUpdateTick ...
func (MelonSeeds) RandomTick ¶
RandomTick ...
type NetherBrickFence ¶
type NetherBrickFence struct {
// contains filtered or unexported fields
}
NetherBrickFence is the nether brick variant of the fence block.
func (NetherBrickFence) CanDisplace ¶
func (NetherBrickFence) CanDisplace(b world.Liquid) bool
CanDisplace ...
func (NetherBrickFence) EncodeItem ¶
func (n NetherBrickFence) EncodeItem() (id int32, meta int16)
EncodeItem ...
func (NetherBrickFence) LightDiffusionLevel ¶
func (NetherBrickFence) LightDiffusionLevel() uint8
LightDiffusionLevel ...
func (NetherBrickFence) SideClosed ¶
SideClosed ...
type NetherGoldOre ¶
type NetherGoldOre struct {
// contains filtered or unexported fields
}
NetherGoldOre is a variant of gold ore found exclusively in The Nether.
func (NetherGoldOre) EncodeItem ¶
func (n NetherGoldOre) EncodeItem() (id int32, meta int16)
EncodeItem ...
type NetherQuartzOre ¶
type NetherQuartzOre struct {
// contains filtered or unexported fields
}
NetherQuartzOre is ore found in the Nether.
func (NetherQuartzOre) EncodeItem ¶
func (NetherQuartzOre) EncodeItem() (id int32, meta int16)
EncodeItem ...
func (NetherQuartzOre) Instrument ¶
func (NetherQuartzOre) Instrument() instrument.Instrument
Instrument ...
type NetherWart ¶
type NetherWart struct { // Age is the age of the nether wart block. 3 is fully grown. Age int // contains filtered or unexported fields }
NetherWart is a fungus found in the Nether that is vital in the creation of potions.
func (NetherWart) EncodeBlock ¶
func (n NetherWart) EncodeBlock() (name string, properties map[string]interface{})
EncodeBlock ...
func (NetherWart) LightDiffusionLevel ¶
func (NetherWart) LightDiffusionLevel() uint8
LightDiffusionLevel ...
func (NetherWart) NeighbourUpdateTick ¶
func (n NetherWart) NeighbourUpdateTick(pos, _ world.BlockPos, w *world.World)
NeighbourUpdateTick ...
func (NetherWart) RandomTick ¶
RandomTick ...
type NetheriteBlock ¶
type NetheriteBlock struct {
// contains filtered or unexported fields
}
NetheriteBlock is a precious mineral block made from 9 netherite ingots.
func (NetheriteBlock) EncodeItem ¶
func (NetheriteBlock) EncodeItem() (id int32, meta int16)
EncodeItem ...
func (NetheriteBlock) Instrument ¶
func (NetheriteBlock) Instrument() instrument.Instrument
Instrument ...
type Netherrack ¶
type Netherrack struct {
// contains filtered or unexported fields
}
Netherrack is a block found in The Nether.
func (Netherrack) EncodeItem ¶
func (e Netherrack) EncodeItem() (id int32, meta int16)
EncodeItem ...
type NoteBlock ¶
type NoteBlock struct { // Pitch is the current pitch the note block is set to. Value ranges from 0-24. Pitch int // contains filtered or unexported fields }
NoteBlock is a musical block that emits sounds when powered with redstone.
type Obsidian ¶
type Obsidian struct {
// contains filtered or unexported fields
}
Obsidian is a dark purple block known for its high blast resistance and strength, most commonly found when water flows over lava.
type Placer ¶
type Placer interface { item.User PlaceBlock(pos world.BlockPos, b world.Block, ctx *item.UseContext) }
Placer represents an entity that is able to place a block at a specific position in the world.
type Planks ¶
type Planks struct { // Wood is the type of wood of the planks. This field must have one of the values found in the material // package. Wood wood.Wood // contains filtered or unexported fields }
Planks are common blocks used in crafting recipes. They are made by crafting logs into planks.
func (Planks) EncodeBlock ¶
EncodeBlock ...
func (Planks) FlammabilityInfo ¶
func (p Planks) FlammabilityInfo() FlammabilityInfo
FlammabilityInfo ...
type Potato ¶
type Potato struct {
// contains filtered or unexported fields
}
Potato is a crop that can be consumed raw or cooked to make baked potatoes.
func (Potato) CalculateGrowthChance ¶
CalculateGrowthChance calculates the chance the crop will grow during a random tick.
func (Potato) EncodeBlock ¶
EncodeBlock ...
func (Potato) GrowthStage ¶
func (c Potato) GrowthStage() int
GrowthStage returns the current stage of growth.
func (Potato) NeighbourUpdateTick ¶
NeighbourUpdateTick ...
func (Potato) RandomTick ¶
RandomTick ...
type Pumpkin ¶
type Pumpkin struct { // Carved is whether the pumpkin is carved. Carved bool // Facing is the direction the pumpkin is facing. Facing world.Direction // contains filtered or unexported fields }
Pumpkin is a crop block. Interacting with shears results in the carved variant.
func (Pumpkin) EncodeBlock ¶
EncodeBlock ...
type PumpkinSeeds ¶
type PumpkinSeeds struct { // Direction is the direction from the stem to the pumpkin. Direction world.Face // contains filtered or unexported fields }
PumpkinSeeds grow pumpkin blocks.
func (PumpkinSeeds) CalculateGrowthChance ¶
CalculateGrowthChance calculates the chance the crop will grow during a random tick.
func (PumpkinSeeds) EncodeBlock ¶
func (p PumpkinSeeds) EncodeBlock() (name string, properties map[string]interface{})
EncodeBlock ...
func (PumpkinSeeds) EncodeItem ¶
func (p PumpkinSeeds) EncodeItem() (id int32, meta int16)
EncodeItem ...
func (PumpkinSeeds) GrowthStage ¶
func (c PumpkinSeeds) GrowthStage() int
GrowthStage returns the current stage of growth.
func (PumpkinSeeds) NeighbourUpdateTick ¶
func (p PumpkinSeeds) NeighbourUpdateTick(pos, _ world.BlockPos, w *world.World)
NeighbourUpdateTick ...
func (PumpkinSeeds) RandomTick ¶
RandomTick ...
type Punchable ¶
type Punchable interface { // Punch punches the block at a specific block position. The face clicked is passed, as well as the // world in which the block was punched and the viewer that punched it. Punch(pos world.BlockPos, clickedFace world.Face, w *world.World, u item.User) }
Punchable represents a block that may be punched by a viewer of the world. When punched, the block will execute some specific logic.
type Quartz ¶
type Quartz struct { // Smooth specifies if the quartz block is smooth or not. Smooth bool // contains filtered or unexported fields }
Quartz is a mineral block used only for decoration.
func (Quartz) EncodeBlock ¶
EncodeBlock ...
type QuartzBricks ¶
type QuartzBricks struct {
// contains filtered or unexported fields
}
QuartzBricks is a mineral block used only for decoration.
func (QuartzBricks) EncodeItem ¶
func (QuartzBricks) EncodeItem() (id int32, meta int16)
EncodeItem ...
func (QuartzBricks) Instrument ¶
func (QuartzBricks) Instrument() instrument.Instrument
Instrument ...
type QuartzPillar ¶
type QuartzPillar struct { // Axis is the axis which the quartz pillar block faces. Axis world.Axis // contains filtered or unexported fields }
QuartzPillar is a mineral block used only for decoration.
func (QuartzPillar) EncodeBlock ¶
func (q QuartzPillar) EncodeBlock() (name string, properties map[string]interface{})
EncodeBlock ...
func (QuartzPillar) EncodeItem ¶
func (q QuartzPillar) EncodeItem() (id int32, meta int16)
EncodeItem ...
func (QuartzPillar) Instrument ¶
func (QuartzPillar) Instrument() instrument.Instrument
Instrument ...
type Replaceable ¶
type Replaceable interface { // ReplaceableBy returns a bool which indicates if the block is replaceableWith by another block. ReplaceableBy(b world.Block) bool }
Replaceable represents a block that may be replaced by another block automatically. An example is grass, which may be replaced by clicking it with another block.
type Sand ¶
type Sand struct { // Red toggles the red sand variant. Red bool // contains filtered or unexported fields }
Sand is a block affected by gravity. It can come in a red variant.
func (Sand) CanSolidify ¶
CanSolidify ...
type SeaLantern ¶
type SeaLantern struct {
// contains filtered or unexported fields
}
SeaLantern is an underwater light sources that appear in ocean monuments and underwater ruins.
func (SeaLantern) LightDiffusionLevel ¶
func (SeaLantern) LightDiffusionLevel() uint8
LightDiffusionLevel ...
func (SeaLantern) LightEmissionLevel ¶
func (SeaLantern) LightEmissionLevel() uint8
LightEmissionLevel ...
type Shroomlight ¶
type Shroomlight struct {
// contains filtered or unexported fields
}
Shroomlight are light-emitting blocks that generate in huge fungi.
func (Shroomlight) EncodeItem ¶
func (Shroomlight) EncodeItem() (id int32, meta int16)
EncodeItem ...
func (Shroomlight) LightEmissionLevel ¶
func (Shroomlight) LightEmissionLevel() uint8
LightEmissionLevel ...
type SoulSand ¶
type SoulSand struct {
// contains filtered or unexported fields
}
SoulSand is a block found naturally only in the Nether. SoulSand slows movement of mobs & players.
type SoulSoil ¶
type SoulSoil struct {
// contains filtered or unexported fields
}
SoulSoil is a block naturally found only in the soul sand valley.
type Sponge ¶
type Sponge struct { // Wet specifies whether the dry or the wet variant of the block is used. Wet bool // contains filtered or unexported fields }
Sponge is a block that can be used to remove water around itself when placed, turning into a wet sponge in the process.
func (Sponge) NeighbourUpdateTick ¶
NeighbourUpdateTick checks for nearby water flow. If water could be found and the sponge is dry, it will absorb the water and be flagged as wet.
type StainedGlass ¶
type StainedGlass struct { // Colour specifies the colour of the block. Colour colour.Colour // contains filtered or unexported fields }
StainedGlass is a decorative, fully transparent solid block that is dyed into a different colour.
func (StainedGlass) EncodeBlock ¶
func (g StainedGlass) EncodeBlock() (name string, properties map[string]interface{})
EncodeBlock ...
func (StainedGlass) EncodeItem ¶
func (g StainedGlass) EncodeItem() (id int32, meta int16)
EncodeItem ...
func (StainedGlass) Instrument ¶
func (StainedGlass) Instrument() instrument.Instrument
Instrument ...
func (StainedGlass) LightDiffusionLevel ¶
func (StainedGlass) LightDiffusionLevel() uint8
LightDiffusionLevel ...
type StainedGlassPane ¶
type StainedGlassPane struct { // Colour specifies the colour of the block. Colour colour.Colour // contains filtered or unexported fields }
StainedGlassPane is a transparent block that can be used as a more efficient alternative to glass blocks.
func (StainedGlassPane) CanDisplace ¶
func (p StainedGlassPane) CanDisplace(b world.Liquid) bool
CanDisplace ...
func (StainedGlassPane) EncodeBlock ¶
func (p StainedGlassPane) EncodeBlock() (name string, properties map[string]interface{})
EncodeBlock ...
func (StainedGlassPane) EncodeItem ¶
func (p StainedGlassPane) EncodeItem() (id int32, meta int16)
EncodeItem ...
func (StainedGlassPane) Instrument ¶
func (StainedGlassPane) Instrument() instrument.Instrument
Instrument ...
func (StainedGlassPane) LightDiffusionLevel ¶
func (StainedGlassPane) LightDiffusionLevel() uint8
LightDiffusionLevel ...
func (StainedGlassPane) SideClosed ¶
SideClosed ...
type StainedTerracotta ¶
type StainedTerracotta struct { // Colour specifies the colour of the block. Colour colour.Colour // contains filtered or unexported fields }
StainedTerracotta is a block formed from clay, with a hardness and blast resistance comparable to stone. In contrast to Terracotta, t can be coloured in the same 16 colours that wool can be dyed, but more dulled and earthen.
func (StainedTerracotta) EncodeBlock ¶
func (t StainedTerracotta) EncodeBlock() (name string, properties map[string]interface{})
EncodeBlock ...
func (StainedTerracotta) EncodeItem ¶
func (t StainedTerracotta) EncodeItem() (id int32, meta int16)
EncodeItem ...
func (StainedTerracotta) Instrument ¶
func (StainedTerracotta) Instrument() instrument.Instrument
Instrument ...
type Stone ¶
type Stone struct { // Smooth specifies if the stone is its smooth variant. Smooth bool // contains filtered or unexported fields }
Stone is a block found underground in the world or on mountains.
type Terracotta ¶
type Terracotta struct {
// contains filtered or unexported fields
}
Terracotta is a block formed from clay, with a hardness and blast resistance comparable to stone. For colouring it, take a look at StainedTerracotta.
func (Terracotta) EncodeItem ¶
func (t Terracotta) EncodeItem() (id int32, meta int16)
EncodeItem ...
type Torch ¶
type Torch struct { // Facing is the direction from the torch to the block. Facing world.Face // Type is the type of fire lighting the torch. Type fire.Fire // contains filtered or unexported fields }
Torch are non-solid blocks that emit light.
func (Torch) EncodeBlock ¶
EncodeBlock ...
func (Torch) NeighbourUpdateTick ¶
NeighbourUpdateTick ...