Interface BlockData
- All Known Subinterfaces:
Ageable, Bisected, Directional, Door, Levelled, Lightable, NoteBlock, Openable, Orientable, Powerable, Rotatable, Slab, Snowable, Stairs, Waterlogged
public interface BlockData
One state of a
BlockType: the block plus a value for each of its properties.
States are immutable and shared; with(String, String) and the with... methods
of the traits in fr.fidorial.world.block.data return another state.
- Since:
- 0.1.0
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault StringasString()Returns this state in command syntax, for instanceminecraft:oak_stairs[facing=north].Gets the value of a property.default booleanisAir()Returnstruefor any kind of air.default Keykey()Returns the key of the block type of this state.intReturns the network identifier of this state.Returns every property value of this state, in declaration order.type()Returns the block type of this state.Returns the state of the same block with one property changed.
-
Field Details
-
AIR
-
CAVE_AIR
-
VOID_AIR
-
-
Method Details
-
type
BlockType type()Returns the block type of this state.- Returns:
- the block type of this state
- Since:
- 0.1.0
-
key
Returns the key of the block type of this state.- Returns:
- the key of the block type of this state
- Since:
- 0.1.0
-
networkId
int networkId()Returns the network identifier of this state.- Returns:
- the network identifier of this state
- Since:
- 0.1.0
-
get
-
with
Returns the state of the same block with one property changed.- Parameters:
property- the property namevalue- the new value- Returns:
- the state of the same block with one property changed
- Throws:
IllegalArgumentException- if the property or value is unknown to this block- Since:
- 0.1.0
-
propertyMap
-
isAir
default boolean isAir()Returnstruefor any kind of air.- Returns:
truefor any kind of air- Since:
- 0.1.0
-
asString
Returns this state in command syntax, for instanceminecraft:oak_stairs[facing=north].- Returns:
- this state in command syntax, for instance
minecraft:oak_stairs[facing=north] - Since:
- 0.1.0
-