use of org.spongepowered.common.registry.SpongeGameRegistry in project SpongeCommon by SpongePowered.
the class MixinTileEntityBanner method updatePatterns.
private void updatePatterns() {
this.patternLayers.clear();
if (this.patterns != null) {
SpongeGameRegistry registry = SpongeImpl.getRegistry();
for (int i = 0; i < this.patterns.tagCount(); i++) {
NBTTagCompound tagCompound = this.patterns.getCompoundTagAt(i);
String patternId = tagCompound.getString(NbtDataUtil.BANNER_PATTERN_ID);
this.patternLayers.add(new SpongePatternLayer(SpongeImpl.getRegistry().getType(BannerPatternShape.class, patternId).get(), registry.getType(DyeColor.class, EnumDyeColor.byDyeDamage(tagCompound.getInteger(NbtDataUtil.BANNER_PATTERN_COLOR)).getName()).get()));
}
}
this.markDirtyAndUpdate();
}
use of org.spongepowered.common.registry.SpongeGameRegistry in project SpongeCommon by SpongePowered.
the class TestMain method main.
public static void main(String[] args) {
Bootstrap.register();
SpongeGameRegistry registry = Guice.createInjector(new SpongeModule(), new TestImplementationModule()).getInstance(SpongeGameRegistry.class);
registry.preRegistryInit();
registry.preInit();
registry.init();
// registry.postInit();
}
Aggregations