版本信息
你使用的系统:windows10 64
你是用的JDK: 1.8 64
你使用的IDE:IDEA
你使用的IDE版本:20.1.3
Forge版本: 32.0.75
Minecraft版本: 1.16.1
错误情况简述
相关代码
LJB748Generator
package com.qyr.ljb748.block;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraftforge.common.ToolType;
public class LJB748Generator extends Block {
public LJB748Generator(){
super(Properties.create(Material.ROCK).hardnessAndResistance(20).harvestTool(ToolType.get("pickaxe")).harvestLevel(2));
}
}
BlockRegistry
package com.qyr.ljb748.registry;
import com.qyr.ljb748.block.*;
import net.minecraft.block.Block;
import net.minecraftforge.fml.RegistryObject;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
public abstract class BlockRegistry {
public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, "ljb748");
public static RegistryObject<Block> LJB748Ore = BLOCKS.register("ljb748_ore", LJB748Ore::new);
public static RegistryObject<Block> LJB748MaterialBlock = BLOCKS.register("ljb748_material_block", LJB748MaterialBlock::new);
public static RegistryObject<Block> LJB748Generator = BLOCKS.register("ljb748_generator", LJB748Generator::new);
}
查到的资料
使用过McJty的教程代码,但是报错