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.

[1.19.4] add more things to existing vainilla loot table, and also add loot tables to frames

Featured Replies

Posted

well 

i finally find a way to preload a custome chest whit things from a loot table 

	//st =  block pos 
	warudo.setBlock( st, maletin_init.BRIEFCASE_BLOCK.get().defaultBlockState(), 10 );
container_9_ghost ghost = (container_9_ghost)warudo.getBlockEntity(st);

CompoundTag NBT = ghost.serializeNBT();
NBT.putString("LootTable", "minecraft:chests/spawn_bonus_chest");
ghost.load(NBT);
	

i dont know how it internally works  just realize minecraft:structure_block set a tag on the blockentity nbt and i just artificially set the tag, it works, call it a day 
#######################################################################

two questions spawning 
first of all how doo i spand this vanilla loot lists in 

/home/usuario/.minecraft/versions/Forge 1.20.1/Forge 1.20.1/data/minecraft/loot_tables/chests/

to add costume items, they looks more complicated than the forge tag lists 


the second one is can i use this loot tables to spawn frames whit loot on mi costume structures ??
item frames have potential they allow you to make the frame invisible and give the impression of things just dropped on tables and floors 

	Direction facing = (blkstate.getValue(UP))? Direction.UP : ((blkstate.getValue(DOWN))? Direction.DOWN : blkstate.getValue(FACING));
ItemStack dropstack = new ItemStack(ItemInit.INGOT_STEEL.get(), 1);
ItemFrame pframe = new ItemFrame(warudo, pos, facing);
	
//pframe.setItem(dropstack);//seems diferent from the chest block entity 
pframe.setInvisible(true);

warudo.addFreshEntity(pframe);

CompoundTag NBT = pframe.serializeNBT();
NBT.putString("LootTable", "minecraft:chests/spawn_bonus_chest");
pframe.load(NBT); //this dont works the frame its always invisible but empty 

 




 

 

 

 

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.