bravoserver / bravo

UNMAINTAINED: Reverse-engineered Minecraft stuff. Worked with 1.4.x protocol
http://bravoserver.org/
Other
206 stars 45 forks source link

Bed can be crafted only from white-wool #336

Closed mcsakoff closed 12 years ago

mcsakoff commented 13 years ago

It's limitation of our recipes system. This shall be re-factored. IRecipe shall have method check() that accepts inventory.slots.Crafting and returns True if the recipe matches.

Basically inventory.slots.Crafting.check_recipes must be moved into the Recipe/StraightRecipe.

MostAwesomeDude commented 12 years ago

The recipe-rework branch does this. As a positive side-effect, it unifies the location of several codepaths, including single-block recipes and recipe checking, and saves some LOCs with a terser recipe syntax. In fact, with 902+ and 980-, not only are the new files in this branch offset by cleanups in recipe listings, there's actually a net savings!

I'll merge it after a day; I want to take some time to verify that things have not horribly broken.

MostAwesomeDude commented 12 years ago

Are beds the only thing which can be crafted from any kind of wool, not just white wool? More generally, is wool color ever accounted for in recipes?

MostAwesomeDude commented 12 years ago

No, wool appears to not ever matter for recipes. Debating whether to special-case wool, or just special-case the two recipes which use wool: Painting and bed. As I'm typing this, I am thinking that the latter is far better.

gtaylor commented 12 years ago

Latter seems sensible to me for now, until/unless some crazy Mojang shake-up with recipes happens in the future.