TransWikia.com

Referencing JSON file in Minecraft Bedrock via command

Arqade Asked by DigitalRookie4 on July 22, 2020

On Minecraft Bedrock Edition, I have just created a JSON file that creates a chest with random loot in it. The problem is that I don’t know the command to get the chest that contains random loot. Here is what I did.

I used https://minecraft.tools/en/loots.php to create a loot table that gives you a certain amount of random items.

I then saved this in a JSON file and put it in the following directory along with a manifest JSON file in order for Minecraft to recognise it.

enter image description here

The problem I am now having is that I don’t know how to use the give command in Minecraft to give me a chest with random loot that uses the JSON file. The website I used to create the random loot table generator mentions this is the command you would use to get the chest with random loot from the JSON file loot table created (in Java Editon though):

/give @p minecraft:chest 1 0 {BlockEntityTag:{LootTable:"mctools:chests/loot_table"}}

The problems I am having with this are that I don’t know what directory I would need to put in to access the JSON file loot table, I am also not sure what other syntax would be needed because I know the idea of using minecraft:chest only works for Minecraft: Java Edition and for Minecraft: Bedrock Edition you would have to do something different. What I am asking is, what type of command do I need to use to give me a chest which uses the JSON file loot table?

2 Answers

The location you would specify the loot table in Minecraft Java Edition is in the NBT tags. Notice how the command the website gave you is only for Java Edition. In Bedrock, you come across a roadblock: you can't specify NBT. If you click on the link, you can see that there are some workarounds, but unfortunately there aren't any for loot tables.

Therefore, you couldn't possibly be able to give yourself a chest with a loot table using commands, because there is no place to specify it.

Answered by ExpertCoder14 on July 22, 2020

The loot tables determine spoils of randomly generated dungeon loot, but don't give you a way to spawn them directly.

A better way of doing this is to fill several chests with loot load-outs. You can then copy these chests by Ctrl+pick-block to duplicate them. This will allow you to place them in a dispenser or dropper and have them dispensed to the player. The player can then place them down themselves to retrieve the items.

Answered by peabody on July 22, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP