Constructs new BlockState instance from given block numeric ID and data
BlockState with the given property set to the value, which goes right next to the current value in the set of possible values of given property
the value of given block property in the following BlockState, wrapped in a java.util.Optional object, which holds null if the following block cannot hold the given property or it was not found for some reason
iterable set of all block properties the block type in the following BlockState can hold
runtime ID of the following BlockState, read more about it in the class description
the value of given block property in the following BlockState. Use only if you are sure the following block can hold the given property.
whether the following BlockState owns a vanilla or Java-registered custom block entity
whether the block type in the following BlockState can hold the given block property
BlockState with given mirroring applied. Matters only
for Java-registered custom blocks with IMirrorable
block component.
BlockState with given rotation applied. Matters only
for Java-registered custom blocks with IRotatable
block component.
another BlockState with the given property value matching to the value given. Read more about how it works in the class description.
Generated using TypeDoc
Class to operate additional properties of a certain block in the world. Full rewrite not connected with InnerCoreBlockState, adding bunch of useful methods similar to those from Forge.
The main thing you need to know about block states is that the object is in fact immutable. Each object has a runtime ID. Each runtime ID refers to a block state object with a specific combination of property values. If you change the value of a property, for example using BlockState.setValue method, it is not changed in the object, but another object with another runtime ID and needed property values combination is returned.
This also means that if you want to change the value of a block property on specific coordinates in the world, you have to call BlockSource.setBlockState with an object obtained after changing the value of a property.
Example:
One more important thing to note is that a certain block with specific ID cannot store any block property by default. If you are initializing a block which you want to hold some properties, you have to specify them all using BlocksModule.registerStateForBlock method, providing block's numeric ID and property object.
Since this class released in KEX 5.0, InnerCoreBlockState was replaced with KEX's BlockState everywhere it was used.
5.0