Posted April 3, 20205 yr Let's say my block is called mod_block for a new_block mod. According to the documentation, Forge says I should use "LootTableList.register(new ResourceLocation("new_block", "mod_block"))" asuming that "mod_block" is a json file inside /assets/new_block/loot_tables/mod_block.json. The problem is that this method does not exist, and I've seen a lot of solutions stating that instead, just place the loot table under /data/new_block/loot_tables/blocks/ as one would do for a datapack, without the need of writing code (on a side note, I've tried placing it just under loot_tables/ too). Doing so, does not work for me, having a loot table like this. I have looked at vanilla loot tables, and most (if not all) look like that. So why does Forge still have the instruction of using that method if it does not exist, and that location if it's suggested to do it under another one? Is there something else I need to add, so that Forge recognizes that loot table? (at least, it does recognize a recipe for that block under data/recipes/). Edited April 3, 20205 yr by tubi_carrillo solved
April 3, 20205 yr 52 minutes ago, tubi_carrillo said: The problem is that this method does not exist, I don't know where you got the information that you have to use that method, but you don't it is automatic now. And it uses your registry name as the file name. 55 minutes ago, tubi_carrillo said: /assets/new_block/loot_tables/mod_block.json It's not supposed to be assets/ it's data/modid/loot_tables/blocks/mod_block.json. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
April 3, 20205 yr Author Just now, Animefan8888 said: I don't know where you got the information that you have to use that method, but you don't it is automatic now. It says so in the documentation: https://mcforge.readthedocs.io/en/1.15.x/items/loot_tables/#registering-a-modded-loot-table 1 minute ago, Animefan8888 said: It's not supposed to be assets/ it's data/modid/loot_tables/blocks/mod_block.json. I know, I've tried that too and did not work for me. Could it be something about the file itself?
April 3, 20205 yr Just now, tubi_carrillo said: It says so in the documentation: https://mcforge.readthedocs.io/en/1.15.x/items/loot_tables/#registering-a-modded-loot-table That's meant for other things. like entities and chests. not blocks. It doesn't say that it's required for blocks under the blocks section. 2 minutes ago, tubi_carrillo said: I know, I've tried that too and did not work for me. Could it be something about the file itself? If it is something about the file itself there will likely be an error in the console when you load up Minecraft. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
April 3, 20205 yr Author 1 minute ago, Animefan8888 said: That's meant for other things. like entities and chests. not blocks. It doesn't say that it's required for blocks under the blocks section. I see now, thanks for clarifying that. 1 minute ago, Animefan8888 said: If it is something about the file itself there will likely be an error in the console when you load up Minecraft. I searched through the logs, but there were no errors related to this. So I guess that too. Could this be a problem related to having a lot of block states? Vanilla doesn't have different loot tables for each block state, so I don't think this could be the case. Otherwise, I don't see what else could be the problem nor how to fix it.
April 3, 20205 yr 1 minute ago, tubi_carrillo said: Could this be a problem related to having a lot of block states? Vanilla doesn't have different loot tables for each block state, so I don't think this could be the case. No it shouldn't be can you post your project as a github repo. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
April 3, 20205 yr Author I just found out, that I could actually get the item. The thing is that very time I tried before, I did it bear-handed (for the time being, I only tried with a pickaxe).
April 3, 20205 yr Author Ok so, the problem was that I set the material of my block to be rock (Material.ROCK) and it was meant to be broken without the need of any other items. I changed it and it was solved, thanks for the fast responses.
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.