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.
Check our Wiki to get to know how everything works!
If you enjoy using Chest Refill, give this repo a star!
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.
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. (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.
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?
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.
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
If you agree, I will start translate this project at once.
@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 .
@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!
@hellbringer616 That would be awesome but as I said earlier, I would need to read more about loot tables 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.