Search in sources :

Example 6 with PatternLayer

use of org.spongepowered.api.data.meta.PatternLayer in project SpongeCommon by SpongePowered.

the class TileEntityBannerDataProcessor method getValues.

@Override
protected Map<Key<?>, ?> getValues(TileEntityBanner entity) {
    List<PatternLayer> layers = ((IMixinBanner) entity).getLayers();
    DyeColor color = ((IMixinBanner) entity).getBaseColor();
    return ImmutableMap.of(Keys.BANNER_BASE_COLOR, color, Keys.BANNER_PATTERNS, layers);
}
Also used : PatternLayer(org.spongepowered.api.data.meta.PatternLayer) IMixinBanner(org.spongepowered.common.interfaces.block.tile.IMixinBanner) DyeColor(org.spongepowered.api.data.type.DyeColor)

Aggregations

PatternLayer (org.spongepowered.api.data.meta.PatternLayer)6 DyeColor (org.spongepowered.api.data.type.DyeColor)5 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)2 NBTTagList (net.minecraft.nbt.NBTTagList)2 IMixinBanner (org.spongepowered.common.interfaces.block.tile.IMixinBanner)2 List (java.util.List)1 EnumDyeColor (net.minecraft.item.EnumDyeColor)1 TileEntity (net.minecraft.tileentity.TileEntity)1 TileEntityBanner (net.minecraft.tileentity.TileEntityBanner)1 BannerData (org.spongepowered.api.data.manipulator.mutable.tileentity.BannerData)1 InvalidDataException (org.spongepowered.api.data.persistence.InvalidDataException)1 PatternListValue (org.spongepowered.api.data.value.mutable.PatternListValue)1 SpongeBannerData (org.spongepowered.common.data.manipulator.mutable.tileentity.SpongeBannerData)1 SpongePatternLayer (org.spongepowered.common.data.meta.SpongePatternLayer)1