use of org.lanternpowered.server.block.trait.LanternBlockTrait in project LanternServer by LanternPowered.
the class LanternBlockState method toContainer.
@Override
public DataContainer toContainer() {
final DataContainer dataContainer = DataContainer.createNew();
dataContainer.set(DataQuery.of("BlockType"), this.baseState.getBlockType().getId());
for (Map.Entry<BlockTrait<?>, Comparable<?>> entry : this.traitValues.entrySet()) {
final Object value = entry.getValue();
dataContainer.set(((LanternBlockTrait) entry.getKey()).getKey().getQuery(), value);
}
return dataContainer;
}
Aggregations