Posted March 8, 20223 yr I have generated a blockstate .json file in src/generated/resources/assets/multicolored_dragon_mod/blockstates/multicolored_enderdragon_egg.json . My registration code in MyMod.java is as follows: public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, Constants.MODID); public static final DeferredRegister<Item> BLOCK_ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, Constants.MODID); public static RegistryObject<Block> DRAGON_EGG_BLOCK = BLOCKS.register(Constants.EGG_ID, ColoredEggBlock::new); public static RegistryObject<Item> DRAGON_EGG_BLOCK_ITEM = BLOCK_ITEMS.register(Constants.EGG_ID, () -> new BlockItem( DRAGON_EGG_BLOCK.get(), new Item.Properties().rarity(Rarity.RARE) ) ); // ... public MyMod() { // ... EntityRenderers.register(EntityType.ENDER_DRAGON, ColoredDragonRenderer::new); MinecraftForge.EVENT_BUS.register(this); BLOCKS.register(FMLJavaModLoadingContext.get().getModEventBus()); BLOCK_ITEMS.register(FMLJavaModLoadingContext.get().getModEventBus()); FMLJavaModLoadingContext.get().getModEventBus() .addListener(ModPacketHandler::register); } Yet I get the following FileNotFoundException warning on load: [05:21:54] [Worker-Main-14/WARN]: Exception loading blockstate definition: multicolored_dragon_mod:blockstates/multicolored_dragon_egg.json: java.io.FileNotFoundException: multicolored_dragon_mod:blockstates/multicolored_dragon_egg.json Looking with a debugger, I found that in SimpleReloadableResourceManager::getResources, this.namespacedPacks doesn't contain multicolored_dragon_mod, which is very strange... any help would be appreciated. Edited March 9, 20223 yr by Will Bradley Changed dummy to real world variables
March 8, 20223 yr you didn't make the blockstate json. X.x Just because you register a block, doesn't mean Minecraft generates those model & blockstate files.
March 8, 20223 yr Author Quote I have generated a blockstate .json file in src/generated/resources/assets/MODID/blockstates/my_blockstate.json
March 8, 20223 yr src/main/resources/assets/MODID/blockstates/my_blockstate.json why aren't you using this one? I personally tend to do my own support files, and this location, from within the main folder. Are your other blocks working? also, I don't see the name of the 'block' that you the file is meant to match.
March 9, 20223 yr Author Sorry, I tried to anonymize it by replacing my real names with dummy variables, but I wrote it at 5 AM so it was all screwy. My bad.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.