I am trying to register a new Block but in 1.20.4 there seems to be no BlockBehaviour.Properties.copy() anymore, and i have no clue how to use BlockBehaviour.Properties.of() and can't find a documentation for it (other sources stated i can but Material.STONE in it but that doesnt work either). Here is the part where i'm stuck:
public static final RegistryObject<Block> RADIO= registerBlock("radio", () -> new Block(BlockBehaviour.Properties.of()
and this is my whole class yet:
package de.groupxyz.radiomod.block; import de.groupxyz.radiomod.RadioMod; import de.groupxyz.radiomod.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.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.function.Supplier; public class ModBlocks { public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, RadioMod.MODID); public static final RegistryObject<Block> RADIO= registerBlock("radio", () -> new Block(BlockBehaviour.Properties.of() private static <T extends Block> RegistryObject<T> registerBlock(String name, Supplier<T> block) { RegistryObject<T> toReturn = BLOCKS.register(name, block); registerBlockItem(name, toReturn); return toReturn; } private static <T extends Block>RegistryObject<Item> registerBlockItem(String name, RegistryObject<T> block) { return ModItems.ITEMS.register(name, () -> new BlockItem(block.get(), new Item.Properties())); } public static void register(IEventBus eventBus) { BLOCKS.register(eventBus); } }
Thanks for any help!