Recycler
Recycler is a small plugin that allows players to smelt items in furnaces in order to turn them back into the materials they got made out of. It offers configuration options to allow it being adjusted to many different use cases.
So it's kinda like smelting iron/gold equipment since 1.11, just better.
Usage
To recycle an item you need to put it in an furnace with some fuel. After the burning process the resulting material will wait in the output slot for you. It is possible to modify the output based on the durability of the item, to prevent that tool can be replaced for free with this plugin.
The remaining reward for will be calculated
amount = defaultAmount * (remainingDurability + extraDurability) / input.maxDurability
Hoppers and Droppers won't put defined item into furnaces by default, but you can deactivate this behavior.
Permissions
Each recycle recipe is bound to a permission node. If a player doesn't have this node, he'll not be able to put this item in the furnace.
recycler.item.<itemName> - allows the player to recycle this item
recycler.item.* - allows the player to recycle every defined item
recycler.admin - allows the player to reload the config
Configuration
# General options general: # prevents hoppers and droppers from putting recyclable items into furnaces disableHopper: true # Recipes # # diamond_pickaxe: # unique key, can be anything # input: DIAMOND_PICKAXE # Material to smelt, for names see # https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/browse/src/main/java/org/bukkit/Material.java # result: DIAMOND # Smelting result item # resultamount: 3 # number of result items per smelted input # extradura: 0 # extra durability for amount calculation # calcdura: true # whether the resulting amount should be calculated # based on item damage, formula: # reward = rewardamount * (input.maxDurability + # extradura - input.damage) / input.maxDurability # burntime: 100 # the time the item burn in the oven in ticks (1/20th seconds) recipes: diamond_pickaxe: input: DIAMOND_PICKAXE result: DIAMOND resultamount: 3 extradura: 0 calcdura: true burntime: 100
Source
Get the Source on GitHub
-
View User Profile
-
Send Message
Posted Sep 1, 2013@gyro89
Do you have any other plugins, that is adding recipes or is working with recipes in any way?
-
View User Profile
-
Send Message
Posted Aug 31, 2013@SydMontague
Yes it always says that and I'm using the latest 1.6.2 craftbukkit BETA build.
-
View User Profile
-
Send Message
Posted Aug 31, 2013@gyro89
This one is pretty hard to track. Does this error occur every startup, or just when you use the /reload command? (If only /reload, you should really stop to do that - the command causes tons of bugs and memory leaks)
Also, what CB build are you running at?
-
View User Profile
-
Send Message
Posted Aug 31, 2013Here is the error log:
[SEVERE] Error occurred while enabling Recycler v1.0.1 (Is it up to date?) java.lang.NullPointerException at net.minecraft.server.v1_6_R2.RecipesFurnace.registerRecipe(RecipesFurnace.java:41) at org.bukkit.craftbukkit.v1_6_R2.inventory.CraftFurnaceRecipe.addToCraftingManager(CraftFurnaceRecipe.java:23) at org.bukkit.craftbukkit.v1_6_R2.CraftServer.addRecipe(CraftServer.java:901) at de.craftlancer.recycler.Recycler.loadConfig(Recycler.java:65) at de.craftlancer.recycler.Recycler.onEnable(Recycler.java:26) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217) at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:457) at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381) at org.bukkit.craftbukkit.v1_6_R2.CraftServer.loadPlugin(CraftServer.java:282) at org.bukkit.craftbukkit.v1_6_R2.CraftServer.enablePlugins(CraftServer.java:264) at org.bukkit.craftbukkit.v1_6_R2.CraftServer.reload(CraftServer.java:609) at org.bukkit.Bukkit.reload(Bukkit.java:275) at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:23) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:191) at org.bukkit.craftbukkit.v1_6_R2.CraftServer.dispatchCommand(CraftServer.java:523) at net.minecraft.server.v1_6_R2.PlayerConnection.handleCommand(PlayerConnection.java:962) at net.minecraft.server.v1_6_R2.PlayerConnection.chat(PlayerConnection.java:880) at net.minecraft.server.v1_6_R2.PlayerConnection.a(PlayerConnection.java:837) at net.minecraft.server.v1_6_R2.Packet3Chat.handle(SourceFile:49) at net.minecraft.server.v1_6_R2.NetworkManager.b(NetworkManager.java:296) at net.minecraft.server.v1_6_R2.PlayerConnection.e(PlayerConnection.java:116) at net.minecraft.server.v1_6_R2.ServerConnection.b(SourceFile:37) at net.minecraft.server.v1_6_R2.DedicatedServerConnection.b(SourceFile:30) at net.minecraft.server.v1_6_R2.MinecraftServer.t(MinecraftServer.java:590) at net.minecraft.server.v1_6_R2.DedicatedServer.t(DedicatedServer.java:226) at net.minecraft.server.v1_6_R2.MinecraftServer.s(MinecraftServer.java:486) at net.minecraft.server.v1_6_R2.MinecraftServer.run(MinecraftServer.java:419) at net.minecraft.server.v1_6_R2.ThreadServerApplication.run(SourceFile:582)
-
View User Profile
-
Send Message
Posted Aug 23, 2013@SydMontague
Yes it says that the recycleables are loaded in the server log
-
View User Profile
-
Send Message
Posted Aug 23, 2013@gyro89
I just copied my posted config and it worked like it should.
Do you have the permissions to use the plugin?
Do you get any error message?
Does you serverlog say "[Recycler] 2 recycleables loaded."?
-
View User Profile
-
Send Message
Posted Aug 22, 2013@SydMontague
Ok I did all of that and it is still messed up. I isolated the plugin to make sure another plugin wasn't interfering. But to my disappointment even when the plugin was isolated it didn't work.
Here is my config
disableHopper: true bucket: id: 325 rewardid: 265 rewardamount: 3 maxdura: 0 extradura: 0 calcdura: false
Diamondhelmet: id: 310 rewardid: 264 rewardamount: 3 maxdura: 0 extradura: 0 calcdura: false
-
View User Profile
-
Send Message
Posted Aug 22, 2013@SydMontague
Okay, Thanks!
-
View User Profile
-
Send Message
Posted Aug 21, 2013@gyro89
You only need the "disableHopper" node once, and you need to change the name of the top node ("bucket") to something else.
-
View User Profile
-
Send Message
Posted Aug 20, 2013I am experiencing a bug. The plugin works great if I don't add anything to the config with just the bukkit. But when I add it the plugin still runs but it doesn't work. I have the latest version of the plugin. Her is my config:
disableHopper: true bucket: id: 325 rewardid: 265 rewardamount: 3 maxdura: 0 extradura: 0 calcdura: false
disableHopper: true bucket: id: 310 rewardid: 264 rewardamount: 3 maxdura: 0 extradura: 0 calcdura: false
-
View User Profile
-
Send Message
Posted Aug 13, 2013@gyro89
Thank you for the report. I just uploaded a fixed version.
Until it's approved you can copy & paste the config from the description page - it's the same as the created one.
-
View User Profile
-
Send Message
Posted Aug 13, 2013I ran the plugin, but no config file was created. Please fix this. Thanks!
-
View User Profile
-
Send Message
Posted Aug 9, 2013Superb idea (been looking for a plugin that does this!). Shall be trying it out shortly :)