use of pokefenn.totemic.block.totem.TotemBaseBlock in project Totemic by TeamTotemic.
the class ModBlocks method init.
@SubscribeEvent
public static void init(RegistryEvent.Register<Block> event) {
internallyRegisterTotemEffects();
for (TotemWoodType woodType : TotemWoodType.getWoodTypes()) {
Properties blockProperties = Properties.of(Material.WOOD, woodType.getWoodColor()).strength(2, 5).sound(SoundType.WOOD);
TotemBaseBlock totemBase = new TotemBaseBlock(woodType, blockProperties);
totemBase.setRegistryName(Totemic.MOD_ID, woodType.getName() + "_totem_base");
event.getRegistry().register(totemBase);
totemBases.put(woodType, totemBase);
blocksWithItemBlock.add(totemBase);
for (TotemEffect totemEffect : totemEffectsToRegister) {
TotemPoleBlock totemPole = new TotemPoleBlock(woodType, totemEffect, blockProperties);
totemPole.setRegistryName(Totemic.MOD_ID, woodType.getName() + "_totem_pole_" + totemEffect.getRegistryName().getPath());
event.getRegistry().register(totemPole);
totemPoles.put(woodType, totemEffect, totemPole);
blocksWithItemBlock.add(totemPole);
}
}
}
use of pokefenn.totemic.block.totem.TotemBaseBlock in project Totemic by TeamTotemic.
the class TotemicBlockStateProvider method registerStatesAndModels.
@Override
protected void registerStatesAndModels() {
for (TotemBaseBlock block : ModBlocks.getTotemBases().values()) {
ResourceLocation blockName = block.getRegistryName();
ModelFile blockModel = models().getExistingFile(new ResourceLocation(blockName.getNamespace(), ModelProvider.BLOCK_FOLDER + "/" + blockName.getPath()));
// Block state
horizontalBlock(block, blockModel);
// Item model
itemModels().withExistingParent(block.getRegistryName().toString(), blockModel.getLocation());
}
}
Aggregations