summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-28 00:33:46 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-03-09 13:48:49 +0100
commite2cbebe522c8d52dc68e513d7896c1f0d21d5b71 (patch)
treea1de370b5d96abcdf348157cb1ca8efab3d162c0
parentRemoved unneeded includes in Player.cpp (diff)
downloadcuberite-e2cbebe522c8d52dc68e513d7896c1f0d21d5b71.tar
cuberite-e2cbebe522c8d52dc68e513d7896c1f0d21d5b71.tar.gz
cuberite-e2cbebe522c8d52dc68e513d7896c1f0d21d5b71.tar.bz2
cuberite-e2cbebe522c8d52dc68e513d7896c1f0d21d5b71.tar.lz
cuberite-e2cbebe522c8d52dc68e513d7896c1f0d21d5b71.tar.xz
cuberite-e2cbebe522c8d52dc68e513d7896c1f0d21d5b71.tar.zst
cuberite-e2cbebe522c8d52dc68e513d7896c1f0d21d5b71.zip
Diffstat (limited to '')
-rw-r--r--src/CraftingRecipes.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/CraftingRecipes.cpp b/src/CraftingRecipes.cpp
index 41de0da8c..5d9992fd3 100644
--- a/src/CraftingRecipes.cpp
+++ b/src/CraftingRecipes.cpp
@@ -806,6 +806,8 @@ cCraftingRecipes::cRecipe * cCraftingRecipes::MatchRecipe(const cItem * a_Crafti
}
case E_ITEM_DYE:
{
+ int GridID = (itr->x + a_OffsetX) + a_GridStride * (itr->y + a_OffsetY);
+
// Found a dye in ingredients...
for (cRecipeSlots::const_iterator itrnumerodos = Recipe->m_Ingredients.begin(); itrnumerodos != Recipe->m_Ingredients.end(); ++itrnumerodos)
{
@@ -821,7 +823,7 @@ cCraftingRecipes::cRecipe * cCraftingRecipes::MatchRecipe(const cItem * a_Crafti
// Yep, push back fade colour and exit the loop
// There is a potential for flexibility here - we can move the goto out of the loop, so we can add multiple dyes (∴ multiple fade colours)
// That will require lots of dye-adding to crafting.txt though - TODO, perchance?
- int GridID = (itrnumerotres->x + a_OffsetX) + a_GridStride * (itrnumerotres->y + a_OffsetY);
+ GridID = (itrnumerotres->x + a_OffsetX) + a_GridStride * (itrnumerotres->y + a_OffsetY);
Recipe->m_Result.m_FireworkItem.m_FadeColours.push_back(cFireworkItem::GetVanillaColourCodeFromDye(a_CraftingGrid[GridID].m_ItemDamage));
goto next;
}
@@ -830,7 +832,6 @@ cCraftingRecipes::cRecipe * cCraftingRecipes::MatchRecipe(const cItem * a_Crafti
}
// Just normal crafting of star, push back normal colours
- int GridID = (itr->x + a_OffsetX) + a_GridStride * (itr->y + a_OffsetY);
Recipe->m_Result.m_FireworkItem.m_Colours.push_back(cFireworkItem::GetVanillaColourCodeFromDye(a_CraftingGrid[GridID].m_ItemDamage));
next: