@ThreadSafe public interface BlockMeta<T> extends Meta<T>
Meta
object which is possessed by blocksModifier and Type | Method and Description |
---|---|
Meta<T> |
decode(T instance,
float yaw,
byte direction,
byte cx,
byte cy,
byte cz,
short damageValue)
Decodes the block meta
|
default Meta<T> |
decodeMeta(T instance,
byte[] data)
In BlockMeta, the data always has 8 elements laid out like so:
0-1: Player yaw * 10
2: Block direction
3: Cursor x
4: Cursor y
5: Cursor z
6-7: item damage
|
default Class[] |
dependencies()
Used by the metadata compiler to order the specific metadata value before this one
to preserve bit order
|
byte |
encode()
Encodes the block metadata into a single byte, which is then combined with the rest of the metadata
|
default byte[] |
encodeMeta()
In blocks, only one meta field byte is needed
|
default Meta<T> decodeMeta(T instance, byte[] data)
decodeMeta
in interface Meta<T>
instance
- the data owner which the value will be applied upondata
- the datadefault byte[] encodeMeta()
encodeMeta
in interface Meta<T>
default Class[] dependencies()
byte encode()
Meta<T> decode(T instance, float yaw, byte direction, byte cx, byte cy, byte cz, short damageValue)
instance
- the block instanceyaw
- the player yawdirection
- the block directioncx
- the cursor xcy
- the cursor ycz
- the cursor zdamageValue
- the item damageCopyright © 2016. All rights reserved.