Blacksmith
This blacksmith only uses materials in Minecraft, not use an economy to repair your tools. It is made specifically to repair your items in a more realistic way than the economy based blacksmiths, and cheaper than making a new one. Each item (except bows) takes one of whatever material it is made of to repair it to 100%. Bows take one string and one stick to be repaired. This will decrease the need for new items but increase the need for the base elements. This plugin takes the item in your hand and, if you have the required material for the repair, it resets the durability.
To use this plugin all you have to do is place an anvil (iron block) and activate it (hit or right click) with the item you want to repair.
To install: Download the desired Blacksmith.jar in the files page. Place the .jar into the plugins folder in your CraftBukkit folder.
List of Required Material: Tool:Cost
- Wood: 1 Wood Plank
- Stone: 1 Cobblestone
- Iron: 1 Iron Ingot
- Gold: 1 Gold Ingot
- Diamond: 1 Diamond
- Bow: 1 Stick + 1 String
- Enchantments: + 1 Blaze Powder
I am planning to add support for permissions, but if you have any suggestions please tell me. Also if you find any bugs, tell me so I can fix them ASAP. This is my first plugin, so I don't know how to do EVERYTHING with bukkit yet but I have learned a lot about making plugins using bukkit from this experience.
Feel free to view the source code HERE (There is a lot of temporary code for testing in there). I do not mind if you take pieces of my code and use them for your own projects, but please ask me before taking large chunks.
Please send a ticket with any ideas/suggestions/problems. They are easier to track than a comment. Thanks!
Video: WoopaGaming
There is a similar but updated mod made by Holyviruss and Thidox HERE
-
View User Profile
-
Send Message
Posted Feb 10, 2012@Vegy
Yes that is actually correct. All other items can be classified as one material (wood, stone iron, gold, diamond) but bows are not, so i used sponge and I know that if it is sponge it is a bow, so it uses bow materials (sticks/strings). I'll fix your error though, i know exactly where it should be.
-
View User Profile
-
Send Message
Posted Feb 10, 2012Hi, When attempting to fix a bow I get the message "You do not have enough bow.". I don't know Java perfectly but this line doesn't look right:
else if (material.equals("bow")) return (Material.SPONGE);
Shouldn't it return string/sticks?
I had string sticks and blaze powder in my inventory.
-
View User Profile
-
Send Message
Posted Feb 9, 2012@xXGameReaperXx
so ANYONE just puts down iron block. clicks it and thats it? no perms?
-
View User Profile
-
Send Message
Posted Feb 9, 2012@Dr_Proffesor
This does not use signs, just place an iron block and there is your anvil! Soon I hope to have the anvils set/destroy running, but i'm still working on that right now.
-
View User Profile
-
Send Message
Posted Feb 9, 2012I love the idea. I was looking for a plugin like this awhile back, but was forced to implement Economy on the server because all the friggin plugins just use fictive currency.
It would be great if there was a config file. Where we could select permissions req True or False.
Permissions; Create/delete + use ?
If i want everyone on the server to be able to create a repair table /anvil i would like it to be a Diamond block. If i only want admins to be able to create it, what then? Either a activation with command on that block or activation via sign.
In config fiile it would be good if we can set up the cost for repairs (want armor to cost 2x and tools 1x) and also select which block should be anvil.
Keep up the great work!
-
View User Profile
-
Send Message
Posted Feb 8, 2012@xXGameReaperXx
also... i made the sign just like this
[Blacksmith] repair
and it does not work at all. i also tried vaalue sign. it didnt work either
-
View User Profile
-
Send Message
Posted Feb 8, 2012@Dr_Proffesor
That error is caused when breaking blocks. I forgot to fix that part since it isnt even used in this latest update (will be used when saving locations). I'll comment that part out, re-upload and then fix it for the next update. Thanks for telling me that this was happening!
-
View User Profile
-
Send Message
Posted Feb 8, 2012Build 1846 and your newest build. spams this on starup or when i break sign. and signs produce no errors when used but dont work
2012-02-08 21:03:02 [SEVERE] Could not pass event org.bukkit.event.block.BlockBreakEvent to Blacksmith java.lang.ClassCastException: me.lukesmith.plugins.blacksmith.BlacksmithListener cannot be cast to org.bukkit.event.block.BlockListener at org.bukkit.plugin.java.JavaPluginLoader$42.execute(JavaPluginLoader.java:558) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:57) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:453) at net.minecraft.server.ItemInWorldManager.breakBlock(ItemInWorldManager.java:216) at net.minecraft.server.ItemInWorldManager.a(ItemInWorldManager.java:171) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:510) at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:202) at net.minecraft.server.Packet14BlockDig.handle(SourceFile:43) at net.minecraft.server.NetworkManager.b(NetworkManager.java:226) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:100) at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:552) at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:537) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:435) at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
-
View User Profile
-
Send Message
Posted Feb 7, 2012Just fixed most of the errors! It was, as I suspected, an error coming from a block not being targeted.
Edit: All error messages fixed! They all came from me trying to use a null object for different methods. I wonder if this could possibly fix those messed up pieces of leather too...? I don't know how it could but maybe. I'll upload the fixed .jar!
-
View User Profile
-
Send Message
Posted Feb 7, 2012Source Code: http://codeviewer.org/view/code:22cf
No there is no ETA for permissions yet, i'm still working on fixing the other stuff that is wrong. After I fix the current errors and add permissions I will add a configurable repair text document as I still don't quite know how to read and write files. Also there would not be much of a point in repairing items if it took as much material to repair as it took to build the item (so the max material requirement would be two). I could add in stick cost to picks to add a little more to the cost.
Anyone who has an idea to add or change this plugin, feel free to submit a ticket so I can better track what everyone wants!
-
View User Profile
-
Send Message
Posted Feb 7, 2012owww i like that you can repair enchantments, but could you make requirements to repair configurable? I personally would make the cost of repairing enchantments a LOT higher.
And is there an ETA on permissions? Would be great for a Blacksmith class.
-
View User Profile
-
Send Message
Posted Feb 6, 2012Source Code? I Might Be Able To Help + Make it so the more damaged the item is the more materials it takes
-
View User Profile
-
Send Message
Posted Feb 6, 2012Just uploaded the armor update. I could not find how to fix the error problem so you will still get those errors, just disregard them for now. Also there should be a file that is created in your plugins folder called "Blacksmith" which is for something i'm working on to make not every iron block an anvil. Just don't worry about that file for now, when I tested it nothing was created in that file but if something is created please tell me and copy/paste the content.
Thanks Game Reaper
-
View User Profile
-
Send Message
Posted Feb 6, 2012sweet sweet. and i know nothing about programming but my guess is you have your mod check for clicks everytime not just ones on the anvil
-
View User Profile
-
Send Message
Posted Feb 5, 2012@Pan7ss and everyone else
I do not know what is causing the error saying that it could not pass the event to blacksmith, but if any of you know what could be causing this please tell me. Like I have said before this is a first for me and I don't know exactly what to do with bukkit at the moment. I'll upload the armor plugin soon, maybe tomorrow (still not done haven't worked on it yet).
I have also added functionality for enchanted bow repairs with the newest update.
EDIT: I just thought of what may be causing the error. When the player interacts with anything it sends the event to blacksmith but that includes nothing so it may not be able to send the event to blacksmith without a block parameter. I'll check to see if I can do something with this before I upload.
-
View User Profile
-
Send Message
Posted Feb 3, 2012I would like you to update it with armour if you could. i don't give about leather. almost easier to get iron then leather. great little plugin though got to be one of my favourites on my small personal server.
armour should take more resources to fix though.
and not a big deal for me but i also get spammed with the blacksmith plug in
-
View User Profile
-
Send Message
Posted Feb 1, 2012Regarding everyone who has asked for permissions, I will try to add that at some point but I was just messing with adding a way to create anvils out of iron blocks and having the plugin save this information. For some reason the information will not write (I was never taught how to do this so I may be doing something wrong, I just looked up example code and modified it to what I needed and, from the looks of it compared to this example code, it should work but does not save the information). Anyway I think I may keep working on this plugin for a little while then, if I still feel like making my redstone one ill work on it. I probably won't update this often, at least not right now, but i'll try to continue fixing and adding stuff to this for now.
-
View User Profile
-
Send Message
Posted Jan 29, 2012Like it,but cant use it. If you add permissions node, I can add it to my Blacksmith class for our MMORPG server.
-
View User Profile
-
Send Message
Posted Jan 20, 2012Hey, I mostly stopped working on this because something is messed up with leather armor repair and I stopped playing Minecraft for a little while. I am thinking of making another mod for a sensor for redstone circuits to sense a given block either one or two spaces away from the sensor. For this I will have to add a new block type for the "sensor" and I do not yet know how to do this. I have only taken one CS class and everything else I taught to myself or from tutorials on the internet. I am working on learning more and figuring out how to add custom blocks and when I figure it out I will also add a custom anvil to this and see if I can complete the repair code.
Thanks so much for the support!
Also if you would like me to post the unfinished armor repair update, post a comment and I will go ahead and do it. Like I said, it all works except for a few pieces of leather and I don't think it is used much. It does not crash or anything when it fails, you may just get an error message or nothing at all.
-
View User Profile
-
Send Message
Posted Jan 19, 2012Keep getting this error...
[SEVERE] Could not pass event PLAYER_INTERACT to Blacksmith