Fixies v2 (merged into Core r635+)
#1
Tongue 

If you're using r635 or higher (or core plugin from r635 or higher) you don't need this plugin! It's merged into Core since r635.

Fixies v2

Fixies are tiny fictional characters that are commonly used in Minecraft worlds to merge two used intems into one.
They can:
  • Repair items!
  • Repair armor!
They do it like in vanilla minecraft - with your hands placing two damaged items in crafting grid.

They also give your repaired items durability bonis (10% of maximal item uses, but not more that maximum). You could change 10% to whatever you like through modifying plugin source.

Enchanted items behaviour is unpredictable, but I expect such operation to give you unenchanted item.

v2 has all know bugs fixed: items don't duplicate, you can't merge two undamaged items, and you can't even merge one damaged and one undamaged item (because it's obviously just a waste of damaged item)


Attached Files
.zip   Fixies.zip (Size: 1.32 KB / Downloads: 318)
Reply
Thanks given by: xoft
#2
now the support page needs to be editted Smile http://www.mc-server.org/support/index.p...&sort=desc
Reply
Thanks given by:
#3
I think implementing this in server code will happen one day. And probably without bugs!Big Grin
Reply
Thanks given by:
#4
I think it can stay in a plugin, perhaps merging the plugin into the Core. Why not - if block collision checking is done in a plugin, tooTongue
Reply
Thanks given by:
#5
Why have core functionality in a plugin? The server doesn't benefit other than being able to run in a very crippled mode without said plugins.
Reply
Thanks given by:
#6
I was thinking the same thing, but then I realized - sometimes there are situations where you don't want the default behavior. For example, an admin might want to be able to place blocks anywhere, even when there are other players occupying the spot. So it kinda makes sense for the functionality to be modifiable. And the Core is distributed and set up by default, so it should be pretty okay.
Reply
Thanks given by:
#7
I also think some things are easier to implement in a plugin than in the native code.

Like repairing items. Item repairing is not a recipe, because the recipes do not support such a thing. How would the crafting hooks work when there's no recipe but it does have functionality behind it? It's much easier, and makes much more sense to put it in a plugin.
Reply
Thanks given by:
#8
Still, xoft had to work out how to handle that weird bug with no clearing crafting grid on crafting plugin recipe.

Because the most flexible solution would be to allow plugins somehow clear crafting grid manually, but making hook-hook interactions within a plugin could be painful (imagine that we added OnGetCraftedItem hook - we now got to check if we're dealing with same player that had placed items in crafting grid when OnCraftingNoRecipe was called. We should store player and crafting details, and check them all).

The other way would be flushing whole crafting grid when item is crafted through such "plugin" recipe. But then we'll loose additional "multiple items in slop per recipe" functionality (which is nice thing to have, actually!). And we'll run into troubles with situation when player tries to use stacked items in crafting (meaning he want to craft only one item).

Just a thought: could we somehow requie plugin to provide crafting grid output AFTER crafting happened? That would be flexible and (in my mind) easy to implement enough. If plugin returns true - use it's output in recipe and in crafting grid after crafting.

Although maybe I'm just missing something, and there is already some way to handle that... Xoft?
Reply
Thanks given by:
#9
The plugins return a full recipe - they need to set not only the resulting item, but they also need to indicate what (and how many) ingredients will be consumed, in the Ingredients part of cCraftingRecipe. I'll look at your plugin and try to find what's wrong, I suspect, though, that you forgot to indicate ingredients, so that when MCServer actually uses the recipe, nothing is consumed off the crafting grid.

I don't understand the rest of your text, really. The crafting windows use the recipe provided by either builtin recipes or plugins, then re-calculate a new recipe for the leftover ingredients. All cases should be covered by that.
Yup, you didn't indicate the ingredients.
Reply
Thanks given by:
#10
Quote:I don't understand the rest of your text, really.
That's because I'm inattentive as always and wasn't digging cCraftingRecipe detailsBig Grin Nevermind, I'll fix that bug in my plugin soon (with another bug that allowed to "fix" two undamaged items)
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)