RecipeManager

RecipeManager

130k Downloads

Continuing theme from bukkit

SoSeDiK opened this issue · 6 comments

commented

I will try to tell what I want as detiled as possible.

Basics

I want to add recipe for sapling that will give 0-4 sticks:

craft
sapling:*
= stick:0:4
= stick:0:3
= stick:0:2
= stick:0:1
= 30% fail

And yeah, it works:

My idea

I am using Optifine CIT feature which allows setting texture based on items amount:

So I thought: It will be nice if I'll add icons for recipe. I changed four symbols in Minecraft: 郅魠魡魢.
This is how it looks in chat:

I tryed to add this icons to recipe:

craft
sapling:*
= stick:0:4
@itemname Stick 魢
= stick:0:3
@itemname &rПалка 魡
= stick:0:2
@itemname &rПалка 魠
= stick:0:1
@itemname &rПалка 郅
= 30% fail

Result:


I think this looks pretty nice.
But now I have a problem. If I craft it, I'll get sticks with custom name:

Because of this, I can't stack sticks anymore.

Ending

So what I want:
It must looks like this:


But crafting result must be stick without name.

commented

try this instead:

craft
sapling:*
= stick:0:4
@displayresult stick:0:4 | name Stick 魢
= stick:0:3
@displayresult stick:0:3 | name &rПалка 魡
= stick:0:2
@displayresult stick:0:2 | name &rПалка 魠
= stick:0:1
@displayresult stick:0:1 | name &rПалка 郅
= 30% fail
commented

"Flag @displayresult only works on recipes!"

commented

Apologies, been a bit since I used it. I'll play around some more :)

commented

Try this:

craft
@displayresult first
sapling:*
= 0% stick
@name You will get a random item:
@lore <green>17.5% 4x <white>Stick 魢
@lore <green>17.5% 3x <white>Stick 魡
@lore <green>17.5% 2x <white>Stick 魠
@lore <green>17.5% <white>Stick 郅
@lore <red>30% Failure Chance
= stick:0:4
= stick:0:3
= stick:0:2
= stick:0:1
= 30% fail

You may need to play with colors to get it to match what you want.

We'll be looking into a better solution to just change the name though, that seems like it could be useful.

commented

Thanks. Just didn't understand you properly at the first time.

commented

Don't worry about it, this is a hard thing to describe without examples. Hopefully that works out for you at least until a better result aliasing system is implemented.