Posted June 30, 20223 yr Hello, I have been working on a mod that generates blocks based on a given material, and I have ran into an issue that I am not sure about what causes it. After doing some testing I found out that my descriptionId's for my SignItems and WallSignBlocks are empty. Here is a log that prints the values of a few of the blocks that are used in the sign language provider case. Note that 'block' is the standing sign block. [22:37:51] [main/INFO] [Ne.Dr.Al.da.cl.ATWLanguageProvider/]: Primary location: minecraft:oak_sign [22:37:51] [main/INFO] [Ne.Dr.Al.da.cl.ATWLanguageProvider/]: Test location: test_block [22:37:51] [main/INFO] [Ne.Dr.Al.da.cl.ATWLanguageProvider/]: RegistryObject location: minecraft:oak_sign [22:37:51] [main/INFO] [Ne.Dr.Al.da.cl.ATWLanguageProvider/]: Block item: Block{minecraft:oak_sign} [22:37:51] [main/INFO] [Ne.Dr.Al.da.cl.ATWLanguageProvider/]: Block Description: block.minecraft.oak_sign [22:37:51] [main/INFO] [Ne.Dr.Al.da.cl.ATWLanguageProvider/]: Block as item: oak_sign [22:37:51] [main/INFO] [Ne.Dr.Al.da.cl.ATWLanguageProvider/]: Block registry: minecraft:oak_sign [22:37:51] [main/INFO] [Ne.Dr.Al.da.cl.ATWLanguageProvider/]: Primary location: minecraft:oak_sign [22:37:51] [main/INFO] [Ne.Dr.Al.da.cl.ATWLanguageProvider/]: Test location: test_block [22:37:51] [main/INFO] [Ne.Dr.Al.da.cl.ATWLanguageProvider/]: Match Found. [22:37:51] [main/INFO] [Ne.Dr.Al.da.cl.ATWLanguageProvider/]: oak sign [22:37:51] [main/INFO] [Ne.Dr.Al.da.cl.ATWLanguageProvider/]: Item id: minecraft:oak_sign [22:37:51] [main/INFO] [Ne.Dr.Al.da.cl.ATWLanguageProvider/]: Item item: oak_sign [22:37:51] [main/INFO] [Ne.Dr.Al.da.cl.ATWLanguageProvider/]: Item Description: [22:37:51] [main/INFO] [Ne.Dr.Al.da.cl.ATWLanguageProvider/]: Item as item: oak_sign [22:37:51] [main/INFO] [Ne.Dr.Al.da.cl.ATWLanguageProvider/]: Item registry: minecraft:oak_sign [22:37:51] [main/INFO] [Ne.Dr.Al.da.cl.ATWLanguageProvider/]: item Primary Location: minecraft:oak_sign [22:37:51] [main/INFO] [Ne.Dr.Al.da.cl.ATWLanguageProvider/]: Wall Location: minecraft:oak_wall_sign [22:37:51] [main/INFO] [Ne.Dr.Al.da.cl.ATWLanguageProvider/]: Wall id: minecraft:oak_wall_sign [22:37:51] [main/INFO] [Ne.Dr.Al.da.cl.ATWLanguageProvider/]: Wall item: Block{minecraft:oak_wall_sign} [22:37:51] [main/INFO] [Ne.Dr.Al.da.cl.ATWLanguageProvider/]: Wall Description: [22:37:51] [main/INFO] [Ne.Dr.Al.da.cl.ATWLanguageProvider/]: Wall as item: oak_sign [22:37:51] [main/INFO] [Ne.Dr.Al.da.cl.ATWLanguageProvider/]: Wall registry: minecraft:oak_wall_sign Here is the code that is used to create the sign blocks, items and tile entities: ublic static RegistryObject<TileEntityType<ATWSignTileEntity>> createSignTileEntity(String blockname, SimpleModule module, ATWMaterial material, ItemGroup itemGroup){ RegistryObject<Block> wall = createSignBlock(material.getName()+"_wall_sign", () -> new ATWWallSignBlock(AbstractBlock.Properties.of(Material.WOOD, material.getMaterialColor()).sound(SoundType.WOOD).harvestTool(ToolType.AXE).harvestLevel(0).strength(3.0F, 4.0F).noCollission().noOcclusion()) , module.BLOCKS_REGISTRY); RegistryObject<Block> standing = createSignBlock(blockname, () -> new ATWStandingSignBlock(AbstractBlock.Properties.of(Material.WOOD, material.getMaterialColor()).sound(SoundType.WOOD).harvestTool(ToolType.AXE).harvestLevel(0).strength(3.0F, 4.0F).noCollission().noOcclusion()) , module.BLOCKS_REGISTRY); createSignItem(blockname,itemGroup,module.ITEM_REGISTRY, standing, wall); cutout = wall; cutout = standing; RegistryObject<TileEntityType<ATWSignTileEntity>> sign = module.TILE_ENTITY_REGISTRY.register(blockname, () -> TileEntityType.Builder.of(ATWSignTileEntity::new, standing.get(), wall.get() ).build(null)); return(sign); } public static void createSignItem(String name, ItemGroup tab, DeferredRegister<Item> ITEM_REGISTER, RegistryObject<Block> wall, RegistryObject<Block> standing) { ITEM_REGISTER.register(name,() -> new SignItem(new Item.Properties().stacksTo(16).tab(tab),standing.get(),wall.get())); } public static RegistryObject<Block> createSignBlock(String name, Supplier<? extends Block> supplier, DeferredRegister<Block> BLOCK_REGISTER) { RegistryObject<Block> block = BLOCK_REGISTER.register(name, supplier); return block; } Github: https://github.com/StijnArts/All-The-Wood Thanks in advance to anyone willing to take a look!
June 30, 20223 yr I don't think you explained this very well. Its seems like you are saying some descriptor ids (which ones?) are blank in the resulting language file. You don't show the resulting file. You are generating the language file in that ATWLanguageProvider. Your log snippets doesn't show any blanks. Are these the ones that are blank in the file, they are all vanilla names? Are they blank because your code is being passed wrong data, it is not being passed data or something else? Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post.
July 1, 20223 yr I just downloaded and ran your mod and now I can see the real problem. You have recursive death for your WallSignBlock.getDescriptionId() Quote java.lang.StackOverflowError: Initializing game at net.minecraft.item.BlockItem.getDescriptionId(BlockItem.java:184) ~[forge:?] {re:classloading} at net.minecraft.block.WallSignBlock.getDescriptionId(WallSignBlock.java:44) ~[forge:?] {re:classloading} at net.minecraft.item.BlockItem.getDescriptionId(BlockItem.java:184) ~[forge:?] {re:classloading} at net.minecraft.block.WallSignBlock.getDescriptionId(WallSignBlock.java:44) ~[forge:?] {re:classloading} at net.minecraft.item.BlockItem.getDescriptionId(BlockItem.java:184) ~[forge:?] {re:classloading} at net.minecraft.block.WallSignBlock.getDescriptionId(WallSignBlock.java:44) ~[forge:?] {re:classloading} at net.minecraft.item.BlockItem.getDescriptionId(BlockItem.java:184) ~[forge:?] {re:classloading} at net.minecraft.block.WallSignBlock.getDescriptionId(WallSignBlock.java:44) ~[forge:?] {re:classloading} at net.minecraft.item.BlockItem.getDescriptionId(BlockItem.java:184) ~[forge:?] {re:classloading} The way this works in vanilla is that the StandingSignBlock and WallSignBlock both share the same SignItem. The SignItem is linked to the StandingSignBlock which holds the description. The WallSignBlock does this.asItem().getDescriptionId() which is supposed to do the redirect to the StandingSignBlock via the item. In your case this isn't working. There is something wrong with the way you are registering these blocks/items. Your SignItem seems to be linked to the Wall block when it should be linked to the Standing version? It is not obvious to me what you are doing wrong in your code though. Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post.
July 1, 20223 yr Spotted it, your parameters are in different orders Quote public static void createSignItem(String name, ItemGroup tab, DeferredRegister<Item> ITEM_REGISTER, RegistryObject<Block> wall, RegistryObject<Block> standing) createSignItem(blockname,itemGroup,module.ITEM_REGISTRY, standing, wall); Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post.
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.