Posted June 11, 201510 yr Hey ! I need to generate items in chests, but it's not working. Here is what I've done: public void chestLoots() { ChestGenHooks mineshaft = ChestGenHooks.getInfo(ChestGenHooks.MINESHAFT_CORRIDOR); ChestGenHooks nether = ChestGenHooks.getInfo(ChestGenHooks.NETHER_FORTRESS); ChestGenHooks sh_couloir = ChestGenHooks.getInfo(ChestGenHooks.STRONGHOLD_CORRIDOR); ItemStack ame_loot = new ItemStack(ame); // addItem(Item, min, max, chances) // NB:Les chances de spawn du pain sont de 100 mineshaft.addItem(new WeightedRandomChestContent(ame_loot, 1, 1, 1)); nether.addItem(new WeightedRandomChestContent(ame_loot , 1, 10, 9001)); sh_couloir.addItem(new WeightedRandomChestContent(ame_loot, 1, 1, 20)); } and : @EventHandler public void init(FMLInitializationEvent event) { chestLoots(); } But it's not generating. You can see the chances are over 9000 in the nether, so this is not the problem. Thank you for your help !
June 11, 201510 yr Simply ChestGenHooks.getInfo(ChestGenHooks.BONUS_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(ItemsHandler.InfiniteFruit), 1,1,20)); Works for me. I'm beginner in java and in minecraft modding. Please be specific. Any code examples are appreciated. Sorry for my english i'm from Czech republic. Please hit that thank you button if i helped
June 11, 201510 yr What version of forge are you running? I'm in 1.7.10 and there is no ChestGenHooks.NETHER_FORTRESS for me.
June 12, 201510 yr neither The Creator of the We Are The Warriors Mod https://scontent-sjc.xx.fbcdn.net/hphotos-xpf1/v/t1.0-9/10985858_1068047526542843_8233581795453767454_n.png?oh=aad9679e5ae8470bbd9a58236c0e391b&oe=55AAFDC7[/img]
June 12, 201510 yr Author Ho, yeah, should have precised. I'm using forge 1.8. I'm using the version 1.8-11.14.1.1402, but I just saw the version Build 1.8-11.14.1.1404 added Initialized the Nether Fortress chest loot Forced the nether fortress chest loot to initialize in ChestGenHooks like the other types. Changed tabs to spaces. Silly Eclipse. Maybe I should use the latest version. Is there any way to do it easily ?
June 12, 201510 yr download it, extract it, gradle it and throw your old code inside the src Don't do it that way! It is much easier! Open your build.gradle file and change the version number. Then rerun gradlew setupDecompWorkspace eclipse . This is the intended way to update Forge. Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
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.