BlockState

A proxy for a block state from Minecraft
Instances are obtained through the WorldAPI
This proxy also contains a saved position for the BlockState

BlockState.getProperties

Returns a table with the properties of this BlockState
overload 1:
BlockState:getProperties()
Method Property Fluent Description Representation
Return Value a table

BlockState.isOpaque

Gets whether or not this BlockState is opaque
overload 1:
BlockState:isOpaque()
Method Property Fluent Description Representation
Return Value a Boolean

BlockState.getID

Returns this BlockState identifier
overload 1:
BlockState:getID()
Method Property Fluent Description Representation
Return Value a String

BlockState.getComparatorOutput

Gets the amount of signal strength a comparator would get from this BlockState
overload 1:
BlockState:getComparatorOutput()
Method Property Fluent Description Representation
Return Value an Integer

BlockState.hasEmissiveLighting

Gets whether or not the BlockState uses emissive lighting
overload 1:
BlockState:hasEmissiveLighting()
Method Property Fluent Description Representation
Return Value a Boolean

BlockState.setPos

Sets the saved position for this BlockState proxy
The saved position is used in BlockState functions that require a position
overload 1:
BlockState:setPos(pos)
Method Property Fluent Description Representation
pos accepts a Vector3
Return Value a BlockState
overload 2:
BlockState:setPos(x, y, z)
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
z accepts a Number
Return Value a BlockState

BlockState.getOpacity

Gets the opacity of the BlockState, in terms of how much it affects light levels
overload 1:
BlockState:getOpacity()
Method Property Fluent Description Representation
Return Value an Integer

BlockState.getTextures

Returns a List of this BlockState's textures
The keys represents the Culling Direction,
while the values is another table with all texture paths (string)
Note this only works for normal blocks,
special blocks (water, beds, …) will return an empty table
overload 1:
BlockState:getTextures()
Method Property Fluent Description Representation
Return Value a table

BlockState.getTags

Returns a table containing all the tags of this block, as strings
overload 1:
BlockState:getTags()
Method Property Fluent Description Representation
Return Value a table

BlockState.isTranslucent

Gets whether or not the BlockState would propagate sky light downwards
overload 1:
BlockState:isTranslucent()
Method Property Fluent Description Representation
Return Value a Boolean

BlockState.getMapColor

Gets the map color of this BlockState, as a Vector3 with R,G,B ranging 0 to 1
overload 1:
BlockState:getMapColor()
Method Property Fluent Description Representation
Return Value a Vector3

BlockState.getBlastResistance

Gets the blast resistance of this BlockState
overload 1:
BlockState:getBlastResistance()
Method Property Fluent Description Representation
Return Value a Number

BlockState.getSounds

Gets the names of all the sounds which can play from this BlockState, as well as their pitch and volume
Stored in a table
overload 1:
BlockState:getSounds()
Method Property Fluent Description Representation
Return Value a table

BlockState.getFluidTags

Returns a table containing all the fluid tags of this block, as strings
overload 1:
BlockState:getFluidTags()
Method Property Fluent Description Representation
Return Value a table

BlockState.getEntityData

Returns the nbt of the Block Entity associated with this BlockState, at its position, as a table
Since the mod is only on client side,
this NBT might not actually contain the real nbt, which is stored server-side
overload 1:
BlockState:getEntityData()
Method Property Fluent Description Representation
Return Value a table

BlockState.toStateString

Converts this BlockState into a string, like you'd see in a Minecraft command
overload 1:
BlockState:toStateString()
Method Property Fluent Description Representation
Return Value a String

BlockState.hasBlockEntity

Gets whether or not this BlockState has an associated block entity
overload 1:
BlockState:hasBlockEntity()
Method Property Fluent Description Representation
Return Value a Boolean

BlockState.isSolidBlock

Gets whether or not the BlockState is considered a "solid" block by Minecraft
overload 1:
BlockState:isSolidBlock()
Method Property Fluent Description Representation
Return Value a Boolean

BlockState.emitsRedstonePower

Gets whether or not this BlockState emits redstone power
overload 1:
BlockState:emitsRedstonePower()
Method Property Fluent Description Representation
Return Value a Boolean

BlockState.getFriction

Gets the friction of this BlockState
(Slime blocks and ice in vanilla)
overload 1:
BlockState:getFriction()
Method Property Fluent Description Representation
Return Value a Number

BlockState.getOutlineShape

Returns a table representing the bounding boxes of the outline shape
The table a list of every shape,
containing two Vector3, where the first vector is one corner of the box and the other vector is the other corner
overload 1:
BlockState:getOutlineShape()
Method Property Fluent Description Representation
Return Value a table

BlockState.isFullCube

Gets whether or not the BlockState has a full cube as its collision hitbox
overload 1:
BlockState:isFullCube()
Method Property Fluent Description Representation
Return Value a Boolean

BlockState.getCollisionShape

Returns a table representing the bounding boxes of the collision shape
The table a list of every shape,
containing two Vector3, where the first vector is one corner of the box and the other vector is the other corner
overload 1:
BlockState:getCollisionShape()
Method Property Fluent Description Representation
Return Value a table

BlockState.asItem

Returns an ItemStack representing this block in item form, whatever Minecraft deems that to be
If it cannot find an item for this block,
it will return nil
overload 1:
BlockState:asItem()
Method Property Fluent Description Representation
Return Value either an ItemStack or nil

BlockState.isAir

Checks if this block is air
overload 1:
BlockState:isAir()
Method Property Fluent Description Representation
Return Value a Boolean

BlockState.getPos

Returns the saved position for this BlockState proxy
The saved position is used in BlockState functions that require a position
overload 1:
BlockState:getPos()
Method Property Fluent Description Representation
Return Value a Vector3

BlockState.getHardness

Gets the hardness of the BlockState
overload 1:
BlockState:getHardness()
Method Property Fluent Description Representation
Return Value a Number

BlockState.getLuminance

Gets the emission light level of this BlockState
overload 1:
BlockState:getLuminance()
Method Property Fluent Description Representation
Return Value an Integer

BlockState.getJumpVelocityMultiplier

Gets the jump velocity multiplier of this BlockState
(Literally just honey blocks in vanilla)
overload 1:
BlockState:getJumpVelocityMultiplier()
Method Property Fluent Description Representation
Return Value a Number

BlockState.getVelocityMultiplier

Gets the velocity multiplier of this BlockState
(Only Soul sand,
honey blocks in vanilla)
overload 1:
BlockState:getVelocityMultiplier()
Method Property Fluent Description Representation
Return Value a Number

BlockState.hasCollision

Returns true if this block has collision
overload 1:
BlockState:hasCollision()
Method Property Fluent Description Representation
Return Value a Boolean

BlockState.pos

Sets the saved position for this BlockState proxy
The saved position is used in BlockState functions that require a position
overload 1:
BlockState:pos(pos)
Method Property Fluent Description Representation
pos accepts a Vector3
Return Value a BlockState
overload 2:
BlockState:pos(x, y, z)
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
z accepts a Number
Return Value a BlockState

BlockState.id

The identifier of the block this BlockState comes from
field signature:
id
Method Property Fluent Description Representation
Field Type a String

BlockState.properties

A table containing the properties of this BlockState
If this BlockState has no properties,
it is nil
field signature:
properties
Method Property Fluent Description Representation
Field Type a table
a a