Go: Blocks¶
Functions¶
Block¶
| Go | |
|---|---|
Block is the cell at x, y, z of dimension dim.
- Parameters:
- dim :
int32 - x :
int32 - y :
int32 - z :
int32
- dim :
- Return type:
BlockAt
BlockAt¶
BlockAt is one block cell of a dimension.
BlockAt.Info¶
| Go | |
|---|---|
Info reads the block: its type name and state.
- Return type:
(BlockInfo, error) - Slots:
get_block
BlockAt.Set¶
| Go | |
|---|---|
Set places a block from a block spec, as /setblock reads one.
- Parameters:
- blockSpec :
string
- blockSpec :
- Return type:
error - Slots:
set_block
BlockAt.State¶
| Go | |
|---|---|
State reads one block state by name.
- Parameters:
- name :
string
- name :
- Return type:
(string, error) - Slots:
block_get_state
BlockAt.SetState¶
| Go | |
|---|---|
SetState writes one block state by name.
- Parameters:
- name :
string - value :
string
- name :
- Return type:
error - Slots:
block_set_state
BlockAt.EntitySNBT¶
| Go | |
|---|---|
EntitySNBT is the block entity at the cell, such as a chest's contents, as SNBT.
- Return type:
(string, error) - Slots:
block_entity_snbt
BlockAt.Biome¶
| Go | |
|---|---|
Biome is the biome at the cell.
- Return type:
(string, error) - Slots:
level_get_biome
BlockAt.Container¶
| Go | |
|---|---|
Container is the cell's block container, such as a chest.
- Return type:
Container
BlockAt.IsAir¶
| Go | |
|---|---|
IsAir reads PIER_BPROP_IS_AIR: Block::isAir
- Return type:
(bool, error) - Slots:
block_get_num
BlockAt.Data¶
| Go | |
|---|---|
Data reads PIER_BPROP_DATA: Block::getData (legacy data value)
- Return type:
(float64, error) - Slots:
block_get_num
BlockAt.BlockItemId¶
| Go | |
|---|---|
BlockItemId reads PIER_BPROP_BLOCK_ITEM_ID: Block::getBlockItemId
- Return type:
(float64, error) - Slots:
block_get_num
BlockAt.IsCraftingBlock¶
| Go | |
|---|---|
IsCraftingBlock reads PIER_BPROP_IS_CRAFTING_BLOCK: Block::isCraftingBlock
- Return type:
(bool, error) - Slots:
block_get_num
BlockAt.IsInteractiveBlock¶
| Go | |
|---|---|
IsInteractiveBlock reads PIER_BPROP_IS_INTERACTIVE_BLOCK: Block::isInteractiveBlock
- Return type:
(bool, error) - Slots:
block_get_num
BlockAt.HasBlockEntity¶
| Go | |
|---|---|
HasBlockEntity reads PIER_BPROP_HAS_BLOCK_ENTITY: BlockSource::getBlockEntity(pos) != null
- Return type:
(bool, error) - Slots:
block_get_num
BlockAt.Light¶
| Go | |
|---|---|
Light reads PIER_BPROP_LIGHT: Block::getLight
- Return type:
(float64, error) - Slots:
block_get_num
BlockAt.LightEmission¶
| Go | |
|---|---|
LightEmission reads PIER_BPROP_LIGHT_EMISSION: Block::getLightEmission
- Return type:
(float64, error) - Slots:
block_get_num
BlockAt.DestroySpeed¶
| Go | |
|---|---|
DestroySpeed reads PIER_BPROP_DESTROY_SPEED: Block::getDestroySpeed
- Return type:
(float64, error) - Slots:
block_get_num
BlockAt.ExplosionResistance¶
| Go | |
|---|---|
ExplosionResistance reads PIER_BPROP_EXPLOSION_RESISTANCE: Block::getExplosionResistance
- Return type:
(float64, error) - Slots:
block_get_num
BlockAt.Friction¶
| Go | |
|---|---|
Friction reads PIER_BPROP_FRICTION: Block::getFriction
- Return type:
(float64, error) - Slots:
block_get_num
BlockAt.IsContainer¶
| Go | |
|---|---|
IsContainer reads PIER_BPROP_IS_CONTAINER: Block::isContainerBlock
- Return type:
(bool, error) - Slots:
block_get_num
BlockAt.IsDoor¶
| Go | |
|---|---|
IsDoor reads PIER_BPROP_IS_DOOR: unsupported since BDS 1.26.40: BlockType::isDoorBlock is gone
The host answers no on every current engine version: unsupported since BDS 1.26.40: BlockType::isDoorBlock is gone
- Return type:
(bool, error) - Slots:
block_get_num
BlockAt.IsFence¶
| Go | |
|---|---|
IsFence reads PIER_BPROP_IS_FENCE: Block::isFenceBlock
- Return type:
(bool, error) - Slots:
block_get_num
BlockAt.IsRail¶
| Go | |
|---|---|
IsRail reads PIER_BPROP_IS_RAIL: Block::isRailBlock
- Return type:
(bool, error) - Slots:
block_get_num
BlockAt.IsSlab¶
| Go | |
|---|---|
IsSlab reads PIER_BPROP_IS_SLAB: Block::isSlabBlock
- Return type:
(bool, error) - Slots:
block_get_num
BlockAt.IsStair¶
| Go | |
|---|---|
IsStair reads PIER_BPROP_IS_STAIR: unsupported since BDS 1.26.40: BlockType::isStairBlock is gone
The host answers no on every current engine version: unsupported since BDS 1.26.40: BlockType::isStairBlock is gone
- Return type:
(bool, error) - Slots:
block_get_num
BlockAt.IsWall¶
| Go | |
|---|---|
IsWall reads PIER_BPROP_IS_WALL: Block::isWallBlock
- Return type:
(bool, error) - Slots:
block_get_num
BlockAt.IsCrop¶
| Go | |
|---|---|
IsCrop reads PIER_BPROP_IS_CROP: Block::isCropBlock
- Return type:
(bool, error) - Slots:
block_get_num
BlockAt.IsUnbreakable¶
| Go | |
|---|---|
IsUnbreakable reads PIER_BPROP_IS_UNBREAKABLE: Block::isUnbreakable
- Return type:
(bool, error) - Slots:
block_get_num
BlockAt.RedstoneSignal¶
| Go | |
|---|---|
RedstoneSignal reads PIER_BPROP_REDSTONE_SIGNAL: Block::getDirectSignal
- Return type:
(float64, error) - Slots:
block_get_num
BlockAt.ComparatorSignal¶
| Go | |
|---|---|
ComparatorSignal reads PIER_BPROP_COMPARATOR_SIGNAL: Block::getComparatorSignal
- Return type:
(float64, error) - Slots:
block_get_num
BlockAt.IsSignalSource¶
| Go | |
|---|---|
IsSignalSource reads PIER_BPROP_IS_SIGNAL_SOURCE: Block::isSignalSource
- Return type:
(bool, error) - Slots:
block_get_num
BlockAt.Variant¶
| Go | |
|---|---|
Variant reads PIER_BPROP_VARIANT: Block::getVariant
- Return type:
(float64, error) - Slots:
block_get_num
BlockAt.BurnOdds¶
| Go | |
|---|---|
BurnOdds reads PIER_BPROP_BURN_ODDS: Block::getBurnOdds
- Return type:
(float64, error) - Slots:
block_get_num
BlockAt.FlameOdds¶
| Go | |
|---|---|
FlameOdds reads PIER_BPROP_FLAME_ODDS: Block::getFlameOdds
- Return type:
(float64, error) - Slots:
block_get_num
BlockAt.Bounciness¶
| Go | |
|---|---|
Bounciness reads PIER_BPROP_BOUNCINESS: Block::getBounciness
- Return type:
(float64, error) - Slots:
block_get_num
BlockAt.IsSolid¶
| Go | |
|---|---|
IsSolid reads PIER_BPROP_IS_SOLID: Block::isSolid
- Return type:
(bool, error) - Slots:
block_get_num
BlockAt.RequiresTool¶
| Go | |
|---|---|
RequiresTool reads PIER_BPROP_REQUIRES_TOOL: Block::requiresCorrectToolForDrops
- Return type:
(float64, error) - Slots:
block_get_num
BlockAt.TypeName¶
| Go | |
|---|---|
TypeName reads PIER_BSTR_TYPE_NAME: Block::getTypeName
- Return type:
(string, error) - Slots:
block_get_str
BlockAt.Snbt¶
| Go | |
|---|---|
Snbt reads PIER_BSTR_SNBT: Block::mSerializationId β SNBT {name,states,version}
- Return type:
(string, error) - Slots:
block_get_str
BlockAt.DescriptionId¶
| Go | |
|---|---|
DescriptionId reads PIER_BSTR_DESCRIPTION_ID: Block::getDescriptionId
- Return type:
(string, error) - Slots:
block_get_str
BlockAt.DebugString¶
| Go | |
|---|---|
DebugString reads PIER_BSTR_DEBUG_STRING: Block::toDebugString
- Return type:
(string, error) - Slots:
block_get_str
BlockAt.Tags¶
| Go | |
|---|---|
Tags reads PIER_BSTR_TAGS: Block::mTags β SNBT string list ["a","b"]
- Return type:
(string, error) - Slots:
block_get_str
BlockAt.StateText¶
| Go | |
|---|---|
StateText reads PIER_BSTR_STATE: SNBT {state_name:value,β¦} all block states
- Return type:
(string, error) - Slots:
block_get_str
BlockAt.CollisionShape¶
| Go | |
|---|---|
CollisionShape reads PIER_BSTR_COLLISION_SHAPE: SNBT [{min:[x,y,z],max:[x,y,z]},β¦]
- Return type:
(string, error) - Slots:
block_get_str
BlockAt.OutlineShape¶
| Go | |
|---|---|
OutlineShape reads PIER_BSTR_OUTLINE_SHAPE: SNBT [{min,max}] render outline
- Return type:
(string, error) - Slots:
block_get_str
BlockAt.DisplayName¶
| Go | |
|---|---|
DisplayName reads PIER_BSTR_DISPLAY_NAME: Block::getDisplayName
- Return type:
(string, error) - Slots:
block_get_str
BlockAt.HasTag¶
| Go | |
|---|---|
HasTag runs PIER_BACT_HAS_TAG: sarg=tag β out "0"/"1" Block::hasTag
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- sarg :
string
- sarg :
- Return type:
(string, error) - Slots:
block_action
BlockAt.GetState¶
| Go | |
|---|---|
GetState runs PIER_BACT_GET_STATE: sarg=state name β out value string Block::getState
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- sarg :
string
- sarg :
- Return type:
(string, error) - Slots:
block_action
BlockAt.PopResource¶
| Go | |
|---|---|
PopResource runs PIER_BACT_POP_RESOURCE: sarg=item SNBT β pop resource at pos Block::popResource
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- sarg :
string
- sarg :
- Return type:
(string, error) - Slots:
block_action
BlockAt.AsItem¶
| Go | |
|---|---|
AsItem runs PIER_BACT_AS_ITEM: β out item SNBT Block::asItemInstance
The output, when the verb has one, is returned; abi.h names each argument.
- Parameters:
- sarg :
string
- sarg :
- Return type:
(string, error) - Slots:
block_action
BlockInfo¶
BlockInfo is one block: its cell, its type name and its block state as SNBT.
BProp*¶
| Name | Value | Description |
|---|---|---|
BPropIsAir |
0 |
BPropIsAir is PIER_BPROP_IS_AIR: Block::isAir |
BPropData |
1 |
BPropData is PIER_BPROP_DATA: Block::getData (legacy data value) |
BPropBlockItemId |
2 |
BPropBlockItemId is PIER_BPROP_BLOCK_ITEM_ID: Block::getBlockItemId |
BPropIsCraftingBlock |
3 |
BPropIsCraftingBlock is PIER_BPROP_IS_CRAFTING_BLOCK: Block::isCraftingBlock |
BPropIsInteractiveBlock |
4 |
BPropIsInteractiveBlock is PIER_BPROP_IS_INTERACTIVE_BLOCK: Block::isInteractiveBlock |
BPropHasBlockEntity |
5 |
BPropHasBlockEntity is PIER_BPROP_HAS_BLOCK_ENTITY: BlockSource::getBlockEntity(pos) != null |
BPropLight |
6 |
BPropLight is PIER_BPROP_LIGHT: Block::getLight |
BPropLightEmission |
7 |
BPropLightEmission is PIER_BPROP_LIGHT_EMISSION: Block::getLightEmission |
BPropDestroySpeed |
8 |
BPropDestroySpeed is PIER_BPROP_DESTROY_SPEED: Block::getDestroySpeed |
BPropExplosionResistance |
9 |
BPropExplosionResistance is PIER_BPROP_EXPLOSION_RESISTANCE: Block::getExplosionResistance |
BPropFriction |
10 |
BPropFriction is PIER_BPROP_FRICTION: Block::getFriction |
BPropIsContainer |
11 |
BPropIsContainer is PIER_BPROP_IS_CONTAINER: Block::isContainerBlock |
BPropIsDoor |
12 |
the current engine version gives no value for this constant: BPropIsDoor is PIER_BPROP_IS_DOOR: unsupported since BDS 1.26.40: BlockType::isDoorBlock is gone |
BPropIsFence |
13 |
BPropIsFence is PIER_BPROP_IS_FENCE: Block::isFenceBlock |
BPropIsRail |
14 |
BPropIsRail is PIER_BPROP_IS_RAIL: Block::isRailBlock |
BPropIsSlab |
15 |
BPropIsSlab is PIER_BPROP_IS_SLAB: Block::isSlabBlock |
BPropIsStair |
16 |
the current engine version gives no value for this constant: BPropIsStair is PIER_BPROP_IS_STAIR: unsupported since BDS 1.26.40: BlockType::isStairBlock is gone |
BPropIsWall |
17 |
BPropIsWall is PIER_BPROP_IS_WALL: Block::isWallBlock |
BPropIsCrop |
18 |
BPropIsCrop is PIER_BPROP_IS_CROP: Block::isCropBlock |
BPropIsUnbreakable |
19 |
BPropIsUnbreakable is PIER_BPROP_IS_UNBREAKABLE: Block::isUnbreakable |
BPropRedstoneSignal |
20 |
BPropRedstoneSignal is PIER_BPROP_REDSTONE_SIGNAL: Block::getDirectSignal |
BPropComparatorSignal |
21 |
BPropComparatorSignal is PIER_BPROP_COMPARATOR_SIGNAL: Block::getComparatorSignal |
BPropIsSignalSource |
22 |
BPropIsSignalSource is PIER_BPROP_IS_SIGNAL_SOURCE: Block::isSignalSource |
BPropVariant |
23 |
BPropVariant is PIER_BPROP_VARIANT: Block::getVariant |
BPropBurnOdds |
24 |
BPropBurnOdds is PIER_BPROP_BURN_ODDS: Block::getBurnOdds |
BPropFlameOdds |
25 |
BPropFlameOdds is PIER_BPROP_FLAME_ODDS: Block::getFlameOdds |
BPropBounciness |
26 |
BPropBounciness is PIER_BPROP_BOUNCINESS: Block::getBounciness |
BPropIsSolid |
27 |
BPropIsSolid is PIER_BPROP_IS_SOLID: Block::isSolid |
BPropRequiresTool |
28 |
BPropRequiresTool is PIER_BPROP_REQUIRES_TOOL: Block::requiresCorrectToolForDrops |
BStr*¶
| Name | Value | Description |
|---|---|---|
BStrTypeName |
0 |
BStrTypeName is PIER_BSTR_TYPE_NAME: Block::getTypeName |
BStrSnbt |
1 |
BStrSnbt is PIER_BSTR_SNBT: Block::mSerializationId β SNBT |
BStrDescriptionId |
2 |
BStrDescriptionId is PIER_BSTR_DESCRIPTION_ID: Block::getDescriptionId |
BStrDebugString |
3 |
BStrDebugString is PIER_BSTR_DEBUG_STRING: Block::toDebugString |
BStrTags |
4 |
BStrTags is PIER_BSTR_TAGS: Block::mTags β SNBT string list ["a","b"] |
BStrState |
5 |
BStrState is PIER_BSTR_STATE: SNBT {state_name:value,β¦} all block states |
BStrCollisionShape |
6 |
BStrCollisionShape is PIER_BSTR_COLLISION_SHAPE: SNBT [{min:[x,y,z],max:[x,y,z]},β¦] |
BStrOutlineShape |
7 |
BStrOutlineShape is PIER_BSTR_OUTLINE_SHAPE: SNBT [{min,max}] render outline |
BStrDisplayName |
8 |
BStrDisplayName is PIER_BSTR_DISPLAY_NAME: Block::getDisplayName |
BAct*¶
| Name | Value | Description |
|---|---|---|
BActHasTag |
0 |
BActHasTag is PIER_BACT_HAS_TAG: sarg=tag β out "0"/"1" Block::hasTag |
BActGetState |
1 |
BActGetState is PIER_BACT_GET_STATE: sarg=state name β out value string Block::getState |
BActPopResource |
2 |
BActPopResource is PIER_BACT_POP_RESOURCE: sarg=item SNBT β pop resource at pos Block::popResource |
BActAsItem |
3 |
BActAsItem is PIER_BACT_AS_ITEM: β out item SNBT Block::asItemInstance |