Posted May 30, 20169 yr good days actually im fixing mi extructures, a waled village and a sewer under and i want to make chess whith custome loot i know is diferent from what i have in 1.8 how do i fill a vainilla chest in mi extructures whith the ramdom loot youl find in a vainilla dungeon where i must look at ?? thanks for reading
May 30, 20169 yr Author good days actually im fixing mi extructures, a waled village and a sewer under and i want to make chess whith custome loot i know is diferent from what i have in 1.8 how do i fill a vainilla chest in mi extructures whith the ramdom loot youl find in a vainilla dungeon where i must look at ?? thanks for reading
May 30, 20169 yr Use TileEntityLockableLoot#setLootTable (inherited by TileEntityChest ) to set the loot table and seed used to generate loot when the chest is first opened. Minecraft stores the ResourceLocation s of its loot tables in LootTableList . Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
May 30, 20169 yr Use TileEntityLockableLoot#setLootTable (inherited by TileEntityChest ) to set the loot table and seed used to generate loot when the chest is first opened. Minecraft stores the ResourceLocation s of its loot tables in LootTableList . Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
June 4, 20169 yr Author well thanks i manage to generate a chest and get some loot tables but two things puzless me Block chest = Blocks.CHEST; worldIn.setBlockState(tgt, chest.getDefaultState() ); TileEntityLockableLoot te = (TileEntityLockableLoot) worldIn.getTileEntity(tgt); te.setInventorySlotContents(2, new ItemStack(MMAF.parte_culataAcero,1,0) ); //te.getLootTable(); ResourceLocation cityEnd = LootTableList.CHESTS_END_CITY_TREASURE; te.setLootTable(cityEnd, 32000000L); the first is long parameter on te.setLootTable(cityEnd, 32000000L); i think i must set some kind of ramdom here but what coulbe the limits ?? or best saying what is the minimun value whith i have loot and whats its the max value whith ill have the more of the loot. long l = ((long) (Math.random() * 9223372036854775807L )); te.setLootTable(cityEnd, l); the second is how to add mi mod items to this loot tables, in 1.8 i do ChestGenHooks.getInfo(ChestGenHooks.BONUS_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(MercenaryModItems.maletin00, 1,3),1,1,15)); inside the init() from mi main class but here in 9.4 seems not to work or i must create some sort of this loot table thanks for reading
June 4, 20169 yr the first is long parameter on te.setLootTable(cityEnd, 32000000L); i think i must set some kind of ramdom here but what coulbe the limits ?? or best saying what is the minimun value whith i have loot and whats its the max value whith ill have the more of the loot. The second argument is a seed for the Random object used to select the loot. the second is how to add mi mod items to this loot tables, in 1.8 i do ChestGenHooks.getInfo(ChestGenHooks.BONUS_CHEST).addItem(new WeightedRandomChestContent(new ItemStack(MercenaryModItems.maletin00, 1,3),1,1,15)); inside the init() from mi main class but here in 9.4 seems not to work or i must create some sort of this loot table Subscribe to LootTableLoadEvent to modify a LootTable as it's loaded. To add an item to a LootTable , get the appropriate LootPool from the LootTable , create a LootEntryItem and then add it to the LootPool . You can also create a new LootPool containing the appropriate LootEntries and add it to the LootTable . Forge names vanilla LootPool s "poolN" (where N is the 0-based pool index). Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
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.