Interface BlockState
- All Superinterfaces:
Keyed,Registry.Entry
- All Known Subinterfaces:
Block.Entity<B>
Represents a state of a block.
-
Method Summary
Modifier and TypeMethodDescriptionfloatGets the destroy time of the block.booleanhasProperty(@NotNull String key) Checks if the state has the property with the specified key.intid()Gets the id of the state.@NotNull Keykey()Gets the key of the state.Gets the properties of the state.properties(@NotNull Map<String, String> properties) Sets the properties.Gets the property of the specified key.Sets the property with the specified key to the specified value.Sets the property with the specified key to the specified value.Sets the property with the specified key to the specified value.Methods inherited from interface eu.sculkpowered.server.registry.Registry.Entry
asNBT, name
-
Method Details
-
key
Gets the key of the state. -
id
int id()Gets the id of the state.- Specified by:
idin interfaceRegistry.Entry- Returns:
- the state's id
- Since:
- 1.0.0
-
destroyTime
float destroyTime()Gets the destroy time of the block.- Returns:
- the destroy time of the block
- Since:
- 1.0.0
-
properties
Gets the properties of the state.- Returns:
- the state's properties
- Since:
- 1.0.0
-
hasProperty
Checks if the state has the property with the specified key.- Parameters:
key- the key of the property- Returns:
- whether the state has the key or not
- Since:
- 1.0.0
-
property
Sets the property with the specified key to the specified value.- Parameters:
key- the key of the propertyvalue- the value the porperty should be set to- Returns:
- the state
- Since:
- 1.0.0
-
property
Sets the property with the specified key to the specified value.- Parameters:
key- the key of the propertyvalue- the value the property should be set to- Returns:
- the state
- Since:
- 1.0.0
-
property
Sets the property with the specified key to the specified value.- Parameters:
key- the key of the propertyvalue- the value the property should be set to- Returns:
- the state
- Since:
- 1.0.0
-
property
Gets the property of the specified key.- Parameters:
key- the key of the property- Returns:
- the property
- Since:
- 1.0.0
-
properties
Sets the properties.- Parameters:
properties- the properties to set- Returns:
- the state
- Since:
- 1.0.0
-