ModernLifePatch/src/main/java/com/r3944realms/modernlifepatch/content/blocks/ModBlocks.java
3944Realms bc8614dedd Update to 1.4.1
MirrorBlock中updateShape方法里一堆烂代码,别看
2025-02-08 02:07:11 +08:00

36 lines
2.1 KiB
Java

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.items.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;
public class ModBlocks {
public static final DeferredRegister<Block> BLOCKS
= DeferredRegister.create(ForgeRegistries.BLOCKS, ModernLifePatch.MOD_ID);
public static final RegistryObject<MirrorBlock> MIRROR = BLOCKS.register("mirror",
() -> new MirrorBlock(BlockBehaviour.Properties.copy(Blocks.GLASS), MirrorPart.MirrorType.COMMON_MIRROR));
public static final RegistryObject<MirrorBlock> TALL_MIRROR = BLOCKS.register("tall_mirror",
() -> new MirrorBlock(BlockBehaviour.Properties.copy(Blocks.GLASS), MirrorPart.MirrorType.TELL_MIRROR));
public static final RegistryObject<MirrorBlock> LARGE_MIRROR= BLOCKS.register("large_mirror",
() -> new MirrorBlock(BlockBehaviour.Properties.copy(Blocks.GLASS), MirrorPart.MirrorType.LARGE_MIRROR));
public static final RegistryObject<MirrorBlock> MASSIVE_MIRROR = BLOCKS.register("massive_mirror" ,
() -> new MirrorBlock(BlockBehaviour.Properties.copy(Blocks.GLASS), MirrorPart.MirrorType.MASSIVE_MIRROR));
@SuppressWarnings("UnusedReturnValue")
public static <T extends Block> RegistryObject<BlockItem> registerBlockItem(String name , RegistryObject<T> block){
return ModItems.ITEMS.register(name,() -> new BlockItem(block.get(),new Item.Properties()));
}
public static void register(IEventBus bus) {
BLOCKS.register(bus);
}
}