good days im trying to create a custom block following kaupenjoe
Caused by: java.lang.NullPointerException: Block id not set
mi BlockInit only has on block for the moment
public static final Block STEEL_BLOCK = registerBlock(
"steel_block",
new bloque(AbstractBlock.Settings.copy(Blocks.IRON_BLOCK)) );
private static Block registerBlock(String name, Block block) {
Identifier key = Ptools.id(name);
Registry.register(Registries.ITEM, key,
new BlockItem(block, new Item.Settings()));
return Registry.register(Registries.BLOCK, key, block);
}
mi Main class
public void onInitialize() {
// This code runs as soon as Minecraft is in a mod-load-ready state.
// However, some things (like resources) may still be uninitialized.
// Proceed with mild caution.
LOGGER.info("Hello Fabric world!");
ModComponents.load();
ItemInit.load();
BlockInit.load();
}
public static Identifier id(String path){
return Identifier.of(MOD_ID, path);
}
Caused by: java.lang.NullPointerException: Block id not set
at java.base/java.util.Objects.requireNonNull(Objects.java:246)
at knot//net.minecraft.block.AbstractBlock$Settings.getLootTableKey(AbstractBlock.java:671)
at knot//net.minecraft.block.AbstractBlock.<init>(AbstractBlock.java:111)
at knot//net.minecraft.block.Block.<init>(Block.java:236)
at knot//kingdom.ptools.blocks.classes.bloque.<init>(bloque.java:41)
at knot//kingdom.ptools.blocks.BlockInit.<clinit>(BlockInit.java:56)
I dont know what i have wrong whit Blocks
mi ItemInit is working fine
..???