public class MetaProviderFactory extends Object implements MetaProvider
Constructor and Description |
---|
MetaProviderFactory() |
Modifier and Type | Method and Description |
---|---|
boolean |
decode(Block block,
Value<Substance> substance,
byte[] data,
Value<Byte> result)
Decodes and applies the byte data to the block as specified in
BlockMeta.decodeMeta(Object, byte[]) |
boolean |
hasData(Substance substance) |
<S,T extends Meta<S>> |
provide(Class<T> cls)
Obtains a new instance of a meta value
|
void |
register(Meta meta)
Puts the meta value into the server meta registry
|
public MetaProviderFactory()
public boolean decode(Block block, Value<Substance> substance, byte[] data, Value<Byte> result)
MetaProvider
BlockMeta.decodeMeta(Object, byte[])
decode
in interface MetaProvider
block
- the blocksubstance
- the type to set the blockdata
- the dataresult
- @return true
if the block can be placed, false
if otherwisepublic <S,T extends Meta<S>> T provide(Class<T> cls)
MetaProvider
provide
in interface MetaProvider
S
- the meta owner typeT
- the meta value typecls
- the meta type classpublic void register(Meta meta)
MetaProvider
register
in interface MetaProvider
meta
- the metaCopyright © 2016. All rights reserved.