package com.example.examplemod.objects;
import com.example.examplemod.init.BlockInit;
import com.example.examplemod.init.ItemInit;
import net.minecraft.block.Block;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemBlock;
public class BaseBlock extends Block
{
public BaseBlock(String name, Material material, float hardness, String toolClass, int harvestLevel, SoundType soundType, CreativeTabs creativeTab)
{
super(material);
setRegistryName(name);
setUnlocalizedName(name);
setHardness(hardness);
setHarvestLevel(toolClass, harvestLevel);
setSoundType(soundType);
setCreativeTab(creativeTab);
BlockInit.BLOCKS.add(this);
ItemInit.ITEMS.add(new ItemBlock(this).setRegistryName(this.getRegistryName()));
}
}
I think there are no problems in the block class, because ordinary blocks were successfully created using it.
How can I create a block / plant in the Forge API like mushrooms? So that it can multiply like minecraft mushrooms (without the participation of the player and under certain conditions (for example, little light))
I apologize if the question seems silly to you. I could not find a solution