@ThreadSafe public interface MetaOwner<T>
Modifier and Type | Method and Description |
---|---|
<M extends T> |
applyMeta(boolean replace,
M... meta)
Commits the changes from the meta value to the block
|
<M extends T> |
applyMeta(M... meta)
Applies the specified metas to the owner, replacing the previous value if present
|
void |
clearMeta()
Removes all meta values and sets the block meta to
(byte) 0 |
<M extends T> |
newMetaIfNull(Class<M> cls)
Creates a new metadata value for the type specified if this block supports it, and it is not already
created in the block
|
<M extends T> |
obtainMeta(Class<M> cls)
Obtains the meta tag from the class type
|
<M extends MetaOwner> |
ownedMeta()
Gets all of the metadata values currently owned by this meta owner
|
<M extends T> M obtainMeta(Class<M> cls)
M
- the meta typecls
- the class type of the meta valuenull
if the meta is not owned<M extends T> M newMetaIfNull(Class<M> cls)
M
- the metacls
- the meta typenull
if it could not be made<M extends MetaOwner> MetaCollection<M> ownedMeta()
<M extends T> void applyMeta(M... meta)
M
- the meta typemeta
- the metas to apply<M extends T> boolean applyMeta(boolean replace, M... meta)
M
- the meta typemeta
- the metadatareplace
- true
to apply meta anyways if the data mapping already existstrue
if the all of the meta changes took effectvoid clearMeta()
(byte) 0
Copyright © 2016. All rights reserved.