use of net.minecraft.world.level.block.state.BlockBehaviour.Properties 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);
}
}
}
Aggregations