-
Notifications
You must be signed in to change notification settings - Fork 4
Storage
The following code snippet below contains a simple refilling chest with 5 items and time 180 seconds.
You can simply edit this file and the chest will be automatically updated.
"item-provider" = the way items are provided to the inventory. type can be SELF, KIT or LOOT_TABLE. location determines the name of the kit/loot_table.
"items" = contains a list of all items that are regenerating in the given chest.
"ItemType" = item id, which you can easly change as you need
"Count" = number of items for the specific itemtype
"UnsafeDamage" = variant of the itemtype.
For example, white wool will ba marked as a "UnsafeDamage": 0 and green wool will be marked as a "UnsafeDamage": 5 😄
"time" = time after which the chest will be refilled
"chance" = Chance to get item. 1.0 = 100%. 0.2 = 20%.
"one-item-at-time" = can be true/false. Tells the chest if it should regenerate only one random item.
"replace-existing-items" = can be true/false. Tells the chest if it should replace existing items with new, regenerated ones.
"hidden-if-no-items" = can be true/false. Tells the chest if it should hide if is empty.
"hiding-block" = the block that chest is replaced with if the hidden-if-no-items is set to true.
"has-been-opened" = determines if the container has already been opened. Used together with first-open-message.
"first-open-message" = the message that should be displayed when container is opened for the first time.
"open-message" = the message that should be displayed each time container is opened.
"place-items-in-random-slots" = determines if items should be placed in random slots or from the beginning (top left corner).
{
"chestrefill": {
"refillable-containers": {
"(178, 67, -57)|41d1455e-882f-4b1d-a3a0-435c27f4605f": {
"name": "My Awesome Chest",
"container-block-type": "minecraft:chest",
"item-provider": {
"type": "LOOT_TABLE",
"location": "minecraft:chests/igloo_chest"
},
"items": [
{
"item": {
"ContentVersion": 1,
"ItemType": "minecraft:log",
"Count": 64,
"UnsafeDamage": 0
},
"chance": 1.0
},
{
"item": {
"ContentVersion": 1,
"ItemType": "minecraft:wool",
"Count": 64,
"UnsafeDamage": 2
},
"chance": 1.0
},
{
"item": {
"ContentVersion": 1,
"ItemType": "minecraft:planks",
"Count": 64,
"UnsafeDamage": 0
},
"chance": 1.0
},
{
"item": {
"ContentVersion": 1,
"ItemType": "minecraft:gold_ore",
"Count": 64,
"UnsafeDamage": 0
},
"chance": 1.0
}
],
"time": 10,
"one-item-at-time": false,
"replace-existing-items": true,
"hidden-if-no-items": true,
"hiding-block": "minecraft:dirt",
"required-permission": "",
"has-been-opened": true,
"place-items-in-random-slots": true,
"open-message": "\"",
"first-open-message": ""
}
}
}
}
- Open an issue here on Github if you want to report a bug or suggest an enhancement!
- Write to me on Spongepowered Forum!
- Join my Discord server and contact me there!