Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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

  • 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

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.

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.

  • 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

 

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.