Search in sources :

Example 1 with LanternQuartzType

use of org.lanternpowered.server.data.type.LanternQuartzType in project LanternServer by LanternPowered.

the class QuartzItemTypeSerializer method serializeValues.

@Override
public void serializeValues(ItemStack itemStack, SimpleValueContainer valueContainer, DataView dataView) {
    super.serializeValues(itemStack, valueContainer, dataView);
    LanternQuartzType quartzType = (LanternQuartzType) valueContainer.remove(Keys.QUARTZ_TYPE).get();
    if (quartzType == LanternQuartzType.LINES_X || quartzType == LanternQuartzType.LINES_Z) {
        quartzType = LanternQuartzType.LINES_Y;
    }
    dataView.set(DATA_VALUE, quartzType.getInternalId());
}
Also used : LanternQuartzType(org.lanternpowered.server.data.type.LanternQuartzType)

Aggregations

LanternQuartzType (org.lanternpowered.server.data.type.LanternQuartzType)1