Hey, I'm searching for a way to add a crafting recipe to Bukkit. Problem is, I want to ignore the damage value. Little example: Sword + Rose = Sword with a lore. Now I want to add this to any damaged sword, not only repaired sword (damage value 0). And I don't want to add a recipe for every damagevalue out there. Anyone got an idea?
tobiyas Check this video. It may help you I believe: . About the damage values, if you just not define it, I believe that the code ignores it automatically. (Please correct me if I'm not correct. )
I'm affraid you are wrong. It get's broken down to: (int count, Material ingredient, int rawdata) with rawdata = 0 and count = 1. So the Damage value is always 0 for a Material passed to addIngredient. Anyone else got an idea that is working?
It might be a limitation that Minecraft has - there is no other recipe that allows for damaged items so it might not even be possible. Don't take my word for it though. SourceForums linked a good video showing how to do the rest of it, though.
That's true, but I know how the rest works. Maybe there is something in the 'repairing'. Putting 2 same items in the craftingbenche repairs them. Does someone know anything about that?
Ah F*ck.... Found it in the NMS source. It's hardcoded... And when repairing, Bukkit is generating a new temporary Recipe on time.... So it seems like this is not possible. EDIT: LoL found a Bypass. There seems to be a wildcard for bypassing the DamageValues. Just put the DamageValue of the Material of the Recipe to Short.MaxValue.