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)
MetaProviderBlockMeta.decodeMeta(Object, byte[])decode in interface MetaProviderblock - 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)
MetaProviderprovide in interface MetaProviderS - the meta owner typeT - the meta value typecls - the meta type classpublic void register(Meta meta)
MetaProviderregister in interface MetaProvidermeta - the metaCopyright © 2016. All rights reserved.