Search in sources :

Example 1 with BannerPattern

use of net.minecraft.tileentity.BannerPattern in project SpongeCommon by SpongePowered.

the class BannerPatternShapeRegistryModule method registerDefaults.

@Override
public void registerDefaults() {
    for (BannerPattern pattern : BannerPattern.values()) {
        this.bannerPatternShapeMappings.put(pattern.name().toLowerCase(Locale.ENGLISH), (BannerPatternShape) (Object) pattern);
        this.bannerPatternShapeMappings.put(pattern.getHashname().toLowerCase(Locale.ENGLISH), (BannerPatternShape) (Object) pattern);
    }
}
Also used : BannerPattern(net.minecraft.tileentity.BannerPattern)

Example 2 with BannerPattern

use of net.minecraft.tileentity.BannerPattern in project SpongeCommon by SpongePowered.

the class BannerPatternShapeRegistryModule method registerAdditional.

@AdditionalRegistration
public void registerAdditional() {
    for (BannerPattern pattern : BannerPattern.values()) {
        if (!this.bannerPatternShapeMappings.containsKey(pattern.name())) {
            this.bannerPatternShapeMappings.put(pattern.name().toLowerCase(Locale.ENGLISH), (BannerPatternShape) (Object) pattern);
            this.bannerPatternShapeMappings.put(pattern.getHashname().toLowerCase(Locale.ENGLISH), (BannerPatternShape) (Object) pattern);
        }
    }
}
Also used : BannerPattern(net.minecraft.tileentity.BannerPattern) AdditionalRegistration(org.spongepowered.api.registry.util.AdditionalRegistration)

Aggregations

BannerPattern (net.minecraft.tileentity.BannerPattern)2 AdditionalRegistration (org.spongepowered.api.registry.util.AdditionalRegistration)1