Chest Refill (1.10.2-1.12.2) - Create refillable chests

Plugin is now available on Ore - Chest Refill

Be aware that this forum post is not maintained anymore!

Chest Refill

Chest Refill is a Minecraft plugin for servers which use SpongeForge.

This plugin allows you to create refillable containers and regenerate their content after a specified time.

Simply place a e.g. chest, put items in it, mark it as a refillable chest and that’s it! You can then update your chest at any time or change how often it should be refilled. :grin:

Check our Wiki to get to know how everything works!

If you enjoy using Chest Refill, give this repo a star!

Links

License

MIT

Donation

Creation of this plugin is really a time consuming task. If you would like to support me or motivate me to further work then you can star this repo or send me some cookies through PayPal.

9 Likes

Finally a refill plugin, good job! I suggest to add even refill for dispenser and so on :wink:

3 Likes

Right! Good suggestion! :grin:

It will be added ^^

3 Likes

Chest Refill-1.1.0 (1.10.2-1.12.2)

Update 1.1.0 is live! :grin:

This update contains code improvements & some new features!

Release Notes

Added:

  • Refillable Dispensers
  • Refillable Droppers
  • Refillable Hoppers
  • Refillable Shulker-boxes

Fixed:

  • If chests.json file will be modified then the plugin will be automatically refreshed and load created changes into the game.

Download available at Github-ChestRefill


Thanks for using Chest Refill! :grin:

1 Like

Chest Refill-1.2.0 (1.10.2-1.12.2)


One day brake and we have 1.2.0!

This update contains code improvements & some new features as well!

Release Notes

Added:

  • It should be possible to convert all blocks that have an inventory to an refillable container. :grin: (Tested with all vanilla’s blocks that have an inventory and with chests from mod Iron Chest).

Feedback would be awesome. If some containers won’t work then please tell me about it.

Fixed:

  • There was a bug where a container wasn’t removed from the file after being destroyed.

Download available at Github-ChestRefill


Thanks for using Chest Refill! :grin:

Chest Refill-1.2.1 (1.10.2-1.12.2)


Just a small bugfix update.

Release Notes

Fixed:

  • Error in the console that was thrown from RightClickListener

Download available at Github-ChestRefill


Thanks for using Chest Refill! :grin:

Is it possible to have chests refill, picking a specified (or random) number of items from a list?
EG, fill the chest with items and you can have it pick lets say 3-5 at random to refill it with.

Or possibly have “kits” of items you can specify in the config and assign a chest a “kit” and an amount of items (or a range) to randomly refill it with.

Also is it possible to have the chest render as a different block (or invisible) when it does not have items in it?

Such things are not possible…

But, you can always make a feature request and describe what you would like to see as best as you can and I will see what I can do. :slightly_smiling_face:

Right now I could say that something like “hidding a chest” would be maybe possible to make.

But I have difficulties to imagine the first thing.

Write both things as a feature request on Github if you want and I will look at them closer :wink:
Describe them as much as you can. :slightly_smiling_face:

Can you add a chance system for each item in the chest?

I will add this to my „To do” list and see what I can do :slight_smile:

1 Like

Can you add One item but everyone can have it

I don’t really understand what you mean. Could you explain more?

Chest Refill-1.3.0 (1.10.2-1.12.2)

Hello!

Finally, we are welcoming random function in chests.

You can set up item probability for each item and hide chests if they are empty. Check wiki to get to know how to edit chests.

It is possible that new update will contain some new commands. I am planning to do a simple GUI but it can take a lot more time that normal commands. :stuck_out_tongue:

Important: Backup your old containers.json file as this version may not work with old file.

Release Notes

Added:

  • Added item probability. (Randomizer)
  • Added option for choosing if items in chest should be replaced or appended.
  • Added option for hiding chest if it is empty. (There are still some work to do with this)
  • Added option for choosing if only one item at time should be regenrated in chest.

Fixed:

  • Enchanted items are now generated correctly (It was actually something that was missing in Sponge).

Download available at Github-ChestRefill


Thanks for using Chest Refill! :grin:

2 Likes

I’m having an issue with Chest Refill. Hopefully it is something I’m doing wrong on my end.

This is thrown on the server side when I execute “/cr c” and right click a chest filled with items.

[08:58:16] [Server thread/ERROR] [Sponge]: Could not pass InteractBlockEvent$Secondary$MainHand$Impl to Plugin{id=chestrefill, name=Chest Refill, version=1.3.0, description=Plugin for restoring contents of a container after the specified time., url=https://github.com/Aquerr/ChestRefill, authors=[Aquerr], source=./mods/ChestRefill-1.12.2-1.3.0.jar}
java.lang.IllegalArgumentException: Configuration does not accept objects of type class java.lang.Byte
at ninja.leaping.configurate.ScalarConfigValue.setValue(ScalarConfigValue.java:51) ~[spongeforge-1.12.2-2705-7.1.0-BETA-3246.jar:1.12.2-2705-7.1.0-BETA-3246]

Edit: Looks like it only happens when the chest has items in it that were modified by a mod like qualitytools. Further testing on my end. Apologies.

No problem. If you want me to do a mod support for this then feel free to ask about it. :slight_smile:
And sorry for late answer. I was on vacation.

1 Like

I was wondering if it might be possible to have an option to use the random loot table instead of this? (like from normal dungeon chests).

~ Alice

1 Like

Now we finally can enjoy a refill function plugin in sponge! What a nice plugin!

Chest Refill is so wonderful that i want to translate chestrefill into Chinese (include Wiki and this page).
I know copyright is very important for you, So may i translate ChestRefill and repost it to a Chinese Minecraft Forum (MCBBS, www.mcbbs.net)? I need your agreement :slight_smile:

If you agree, I will start translate this project at once.

I would love mod/custom item support for this plugin.

Also… if we could create loot tables for chests to pull from perhaps?

@yepidoodles That sounds good but the problem is that I am unfamiliar with loot tables. The only thing I know that they provide a way to randomly generate loot and that’s all. I would need to read about them more to know how to implement them or maybe there is someone who want to do it and make a pull request :stuck_out_tongue: .

@StarWishSama Sure thing! Go ahead and translate it if you want. You have my permission. This project is under MIT license so the only thing you need to do is to include a my permission in your wiki or something you want to create. Wish you good luck with translation! :smiley:

@hellbringer616 That would be awesome but as I said earlier, I would need to read more about loot tables :stuck_out_tongue: I know almost nothing about them. Besides this… I think if your place an item from a mod in the chest, it should regenerate it without any problems.

Chest Refill-1.3.1 (1.10.2-1.12.2)

This update contains some new features which has been requested and some improvements.

Release Notes

Added:

  • Added name argument to /cr create command. You can now name your refillable container if you want.
  • Added SetName Command. Just if you forgot setting a name during creation. :stuck_out_tongue:
  • Added Refill Command. Refill Command takes a name of the container and force refills it.
  • Added RefillAll Command. I don’t think I need to explain what it does. :thinking:

Improved:

  • Changed the way how containers show in the /cr list. Now they have a name (or not :scream:)!

Fixed:

  • If someone destroys a hidden container then the block that container is hidden under is not dropped.

Download available at Github-ChestRefill


Thanks for using Chest Refill! :grin: