package com.r3944realms.modernlifepatch.content.blocks; import com.r3944realms.modernlifepatch.ModernLifePatch; import com.r3944realms.modernlifepatch.content.blocks.type.mirror.MirrorBlock; import com.r3944realms.modernlifepatch.content.blocks.type.mirror.MirrorPart; import com.r3944realms.modernlifepatch.content.item.ModItems; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.Item; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.RegistryObject; import java.util.Collection; public class ModBlocks { private static final DeferredRegister BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, ModernLifePatch.MOD_ID); public static final RegistryObject MIRROR = BLOCKS.register("mirror", () -> new MirrorBlock(BlockBehaviour.Properties.copy(Blocks.GLASS), MirrorPart.MirrorType.COMMON_MIRROR)); public static final RegistryObject TALL_MIRROR = BLOCKS.register("tall_mirror", () -> new MirrorBlock(BlockBehaviour.Properties.copy(Blocks.GLASS), MirrorPart.MirrorType.TELL_MIRROR)); public static final RegistryObject LARGE_MIRROR= BLOCKS.register("large_mirror", () -> new MirrorBlock(BlockBehaviour.Properties.copy(Blocks.GLASS), MirrorPart.MirrorType.LARGE_MIRROR)); public static final RegistryObject MASSIVE_MIRROR = BLOCKS.register("massive_mirror" , () -> new MirrorBlock(BlockBehaviour.Properties.copy(Blocks.GLASS), MirrorPart.MirrorType.MASSIVE_MIRROR)); @SuppressWarnings("UnusedReturnValue") public static RegistryObject registerBlockItem(String name , RegistryObject block){ return ModItems.register(name,() -> new BlockItem(block.get(),new Item.Properties())); } public static Collection> getEntries() { return BLOCKS.getEntries(); } public static void register(IEventBus bus) { BLOCKS.register(bus); } }