1
0

Recipes match zero DamageValue strictly.

To match any DamageValue for the ingredient, an explicit "-1" as the DamageValue must be specified.
Fixes #1859.
This commit is contained in:
Mattes D 2015-04-16 21:33:42 +02:00
parent ffe7dae4fc
commit 0b3fd73f90
2 changed files with 58 additions and 55 deletions

View File

@ -14,7 +14,10 @@
#
# <ItemType> can be either a number, or an item name (checked against items.ini)
#
# ^<DamageValue> is optional, if not present, any damage value is matched for ingredients and zero is produced for the result
# ^<DamageValue> is optional, if not present, the default damage for the given item is used
#
# If the DamageValue in the ingredients list is set to -1, the ingredient matches the specified item with any DamageValue.
# This is used e. g. for "any planks -> sticks", or beds using any color wool etc.
#
# Ingredients with an asterisk for a coord will not match already matched crafting grid items. This enables simplifying some of the recipes,
# e. g. hoe: "Iron, 2:1, *:1"
@ -46,10 +49,10 @@ BirchPlanks, 4 = BirchLog, *
JunglePlanks, 4 = JungleLog, *
AcaciaPlanks, 4 = AcaciaLog, *
DarkOakPlanks, 4 = DarkOakLog, *
Stick, 4 = Planks, 2:2, 2:3
Stick, 4 = Planks^-1, 2:2, 2:3
Torch, 4 = Stick, 1:2 | Coal, 1:1
Workbench = Planks, 1:1, 1:2, 2:1, 2:2
Chest = Planks, 1:1, 1:2, 1:3, 2:1, 2:3, 3:1, 3:2, 3:3
Workbench = Planks^-1, 1:1, 1:2, 2:1, 2:2
Chest = Planks^-1, 1:1, 1:2, 1:3, 2:1, 2:3, 3:1, 3:2, 3:3
TrappedChest = TripWireHook, 1:1 | Chest, 2:1
EnderChest = EyeOfEnder, 2:2 | Obsidian, 1:1, 1:2, 1:3, 2:1, 2:3, 3:1, 3:2, 3:3
Furnace = Cobblestone, 1:1, 1:2, 1:3, 2:1, 2:3, 3:1, 3:2, 3:3
@ -79,11 +82,11 @@ HayBale = Wheat, 1:1, 1:2, 1:3, 2:1, 2:2, 2:3, 3:1, 3:2, 3:3
SnowBlock = SnowBall, 1:1, 1:2, 2:1, 2:2
ClayBlock = Clay, 1:1, 1:2, 2:1, 2:2
BrickBlock = Brick, 1:1, 1:2, 2:1, 2:2
PolishedGranite, 4 = Granite, 1:1, 1:2, 2:1, 2:2
PolishedDiorite, 4 = Diorite, 1:1, 1:2, 2:1, 2:2
PolishedAndesite, 4 = Andesite, 1:1, 1:2, 2:1, 2:2
PolishedGranite, 4 = Granite, 1:1, 1:2, 2:1, 2:2
PolishedDiorite, 4 = Diorite, 1:1, 1:2, 2:1, 2:2
PolishedAndesite, 4 = Andesite, 1:1, 1:2, 2:1, 2:2
StoneBrick, 4 = Stone, 1:1, 1:2, 2:1, 2:2
BookShelf = Planks, 1:1, 2:1, 3:1, 1:3, 2:3, 3:3 | Book, 1:2, 2:2, 3:2
BookShelf = Planks^-1, 1:1, 2:1, 3:1, 1:3, 2:3, 3:3 | Book, 1:2, 2:2, 3:2
Sandstone, 4 = Sand, 1:1, 1:2, 2:1, 2:2
SmoothSandstone, 4 = Sandstone, 1:1, 1:2, 2:1, 2:2
OrnamentSandstone = SandstoneSlab, 1:1, 1:2
@ -154,8 +157,8 @@ RedSandstoneStairs, 4 = RedSandstone, 3:1, 2:2, 3:2, 1:3, 2:3, 3:3
#
# Axes:
WoodenAxe = Stick, 2:2, 2:3 | Planks, 2:1, 1:1, 1:2
WoodenAxe = Stick, 2:2, 2:3 | Planks, 2:1, 3:1, 3:2
WoodenAxe = Stick, 2:2, 2:3 | Planks^-1, 2:1, 1:1, 1:2
WoodenAxe = Stick, 2:2, 2:3 | Planks^-1, 2:1, 3:1, 3:2
StoneAxe = Stick, 2:2, 2:3 | Cobblestone, 2:1, 1:1, 1:2
StoneAxe = Stick, 2:2, 2:3 | Cobblestone, 2:1, 3:1, 3:2
GoldenAxe = Stick, 2:2, 2:3 | GoldIngot, 2:1, 1:1, 1:2
@ -166,21 +169,21 @@ DiamondAxe = Stick, 2:2, 2:3 | Diamond, 2:1, 1:1, 1:2
DiamondAxe = Stick, 2:2, 2:3 | Diamond, 2:1, 3:1, 3:2
# Pickaxes:
WoodenPickaxe = Stick, 2:2, 2:3 | Planks, 1:1, 2:1, 3:1
WoodenPickaxe = Stick, 2:2, 2:3 | Planks^-1, 1:1, 2:1, 3:1
StonePickaxe = Stick, 2:2, 2:3 | Cobblestone, 1:1, 2:1, 3:1
GoldenPickaxe = Stick, 2:2, 2:3 | GoldIngot, 1:1, 2:1, 3:1
IronPickaxe = Stick, 2:2, 2:3 | IronIngot, 1:1, 2:1, 3:1
DiamondPickaxe = Stick, 2:2, 2:3 | Diamond, 1:1, 2:1, 3:1
# Shovels:
WoodenShovel = Stick, 2:2, 2:3 | Planks, 2:1
WoodenShovel = Stick, 2:2, 2:3 | Planks^-1, 2:1
StoneShovel = Stick, 2:2, 2:3 | Cobblestone, 2:1
GoldenShovel = Stick, 2:2, 2:3 | GoldIngot, 2:1
IronShovel = Stick, 2:2, 2:3 | IronIngot, 2:1
DiamondShovel = Stick, 2:2, 2:3 | Diamond, 2:1
# Hoes:
WoodenHoe = Stick, 2:2, 2:3 | Planks, 2:1, *:1
WoodenHoe = Stick, 2:2, 2:3 | Planks^-1, 2:1, *:1
StoneHoe = Stick, 2:2, 2:3 | Cobblestone, 2:1, *:1
GoldenHoe = Stick, 2:2, 2:3 | GoldIngot, 2:1, *:1
IronHoe = Stick, 2:2, 2:3 | IronIngot, 2:1, *:1
@ -206,7 +209,7 @@ Lead = String, 1:1, 1:2, 2:1, 3:3 | Slimeball, 2:2
#******************************************************#
# Weapons
#
WoodenSword = Stick, 2:3 | Planks, 2:1, 2:2
WoodenSword = Stick, 2:3 | Planks^-1, 2:1, 2:2
StoneSword = Stick, 2:3 | Cobblestone, 2:1, 2:2
GoldenSword = Stick, 2:3 | GoldIngot, 2:1, 2:2
IronSword = Stick, 2:3 | IronIngot, 2:1, 2:2
@ -268,7 +271,7 @@ hopperminecart = Minecart, * | Hopper, *
Rails, 16 = IronIngot, 1:1, 3:1, 1:2, 3:2, 1:3, 3:3 | Stick, 2:2
PoweredRail, 6 = GoldIngot, 1:1, 3:1, 1:2, 3:2, 1:3, 3:3 | Stick, 2:2 | RedstoneDust, 2:3
DetectorRail, 6 = IronIngot, 1:1, 3:1, 1:2, 3:2, 1:3, 3:3 | StonePlate, 2:2 | RedstoneDust, 2:3
Boat = Planks, 1:1, 3:1, 1:2, 2:2, 3:2
Boat = Planks^-1, 1:1, 3:1, 1:2, 2:2, 3:2
ActivatorRail, 6 = IronIngot, 1:1, 1:2, 1:3, 3:1, 3:2, 3:3 | Stick, 2:1, 2:3 | RedstoneTorchon, 2:2
@ -277,35 +280,35 @@ ActivatorRail, 6 = IronIngot, 1:1, 1:2, 1:3, 3:1, 3:2, 3:3 | Stick, 2:1, 2:3 | R
#******************************************************#
# Mechanisms
#
SpruceDoor, 3 = SprucePlanks, 1:1, 1:2, 1:3, 2:1, 2:2, 2:3
BirchDoor, 3 = BirchPlanks, 1:1, 1:2, 1:3, 2:1, 2:2, 2:3
JungleDoor, 3 = JunglePlanks, 1:1, 1:2, 1:3, 2:1, 2:2, 2:3
AcaciaDoor, 3 = AcaciaPlanks, 1:1, 1:2, 1:3, 2:1, 2:2, 2:3
SpruceDoor, 3 = SprucePlanks, 1:1, 1:2, 1:3, 2:1, 2:2, 2:3
BirchDoor, 3 = BirchPlanks, 1:1, 1:2, 1:3, 2:1, 2:2, 2:3
JungleDoor, 3 = JunglePlanks, 1:1, 1:2, 1:3, 2:1, 2:2, 2:3
AcaciaDoor, 3 = AcaciaPlanks, 1:1, 1:2, 1:3, 2:1, 2:2, 2:3
DarkOakDoor, 3 = DarkOakPlanks, 1:1, 1:2, 1:3, 2:1, 2:2, 2:3
WoodenDoor, 3 = OakPlanks, 1:1, 1:2, 1:3, 2:1, 2:2, 2:3
WoodenDoor, 3 = OakPlanks, 1:1, 1:2, 1:3, 2:1, 2:2, 2:3
IronDoor, 3 = IronIngot, 1:1, 1:2, 1:3, 2:1, 2:2, 2:3
TrapDoor, 2 = Planks, 1:1, 2:1, 3:1, 1:2, 2:2, 3:2
TrapDoor, 2 = Planks^-1, 1:1, 2:1, 3:1, 1:2, 2:2, 3:2
IronTrapDoor = IronIngot, 1:1, 1:2, 2:1, 2:2
WoodPlate = Planks, 1:1, 2:1
StonePlate = Stone, 1:1, 2:1
WoodPlate = Planks^-1, 1:1, 2:1
StonePlate = Stone, 1:1, 2:1
lightweightedpressureplate = IronIngot, 1:1, 2:1
heavyweightedpressureplate = GoldIngot, 1:1, 2:1
StoneButton = Stone, 1:1
WoodenButton = Planks, 1:1
StoneButton = Stone, 1:1
WoodenButton = Planks^-1, 1:1
RedstoneTorchOn = Stick, 1:2 | RedstoneDust, 1:1
Lever = Cobblestone, 1:2 | Stick, 1:1
NoteBlock = Planks, 1:1, 1:2, 1:3, 2:1, 2:3, 3:1, 3:2, 3:3 | RedstoneDust, 2:2
Jukebox = Planks, 1:1, 1:2, 1:3, 2:1, 2:3, 3:1, 3:2, 3:3 | Diamond, 2:2
NoteBlock = Planks^-1, 1:1, 1:2, 1:3, 2:1, 2:3, 3:1, 3:2, 3:3 | RedstoneDust, 2:2
Jukebox = Planks^-1, 1:1, 1:2, 1:3, 2:1, 2:3, 3:1, 3:2, 3:3 | Diamond, 2:2
Dispenser = Cobblestone, 1:1, 1:2, 1:3, 2:1, 3:1, 3:2, 3:3 | RedstoneDust, 2:3 | Bow, 2:2
Dropper = Cobblestone, 1:1, 2:1, 3:1, 1:2, 1:3, 3:2, 3:3 | Hopper, 2:2 | RedstoneDust, 2:3
Repeater = Stone, 1:2, 2:2, 3:2 | RedstoneTorchOn, 1:1, 3:1 | RedstoneDust, 2:1
Comparator = RedstoneTorchOn, 2:1, 1:2, 3:2 | NetherQuartz, 2:2 | Stone, 1:3, 2:3, 3:3
DaylightSensor = Glass, 1:1, 2:1, 3:1 | NetherQuartz, 1:2, 2:2, 3:2 | Woodslab, 1:3, 2:3, 3:3
Hopper = Ironbars, 1:1, 3:1, 1:2, 3:2, 2:3 | Chest, 2:2
Piston = Planks, 1:1, 2:1, 3:1 | RedstoneDust, 2:3 | Cobblestone, 1:2, 3:2, 1:3, 3:3 | IronIngot, 2:2
StickyPiston = Piston, * | SlimeBall, *
Piston = Planks^-1, 1:1, 2:1, 3:1 | RedstoneDust, 2:3 | Cobblestone, 1:2, 3:2, 1:3, 3:3 | IronIngot, 2:2
StickyPiston = Piston, * | SlimeBall, *
RedstoneLamp = RedstoneDust, 2:1, 1:2, 3:2, 2:3 | Glowstone, 2:2
tripwirehook, 2 = planks, 2:3 | stick, 2:2 | ironbar, 2:1
TripwireHook, 2 = Planks^-1, 2:3 | stick, 2:2 | IronIngot, 2:1
@ -314,7 +317,7 @@ tripwirehook, 2 = planks, 2:3 | stick, 2:2 | ironbar, 2:1
#******************************************************#
# Food
#
Bowl, 4 = Planks, 1:1, 2:2, 3:1
Bowl, 4 = Planks^-1, 1:1, 2:2, 3:1
MushroomStew = Bowl, * | BrownMushroom, * | RedMushroom, *
Bread = Wheat, 1:1, 2:1, 3:1
Sugar = Sugarcane, *
@ -349,9 +352,9 @@ Coal, 9 = CoalBlock, *
Clay, 4 = ClayBlock, *
SlimeBall, 9 = SlimeBlock, *
Painting = Stick, 1:1, 1:2, 1:3, 2:1, 2:3, 3:1, 3:2, 3:3 | Wool, 2:2
Painting = Stick, 1:1, 1:2, 1:3, 2:1, 2:3, 3:1, 3:2, 3:3 | Wool^-1, 2:2
ItemFrame = Stick, 1:1, 1:2, 1:3, 2:1, 2:3, 3:1, 3:2, 3:3 | Leather, 2:2
Sign, 3 = Planks, 1:1, 2:1, 3:1, 1:2, 2:2, 3:2 | Stick, 2:3
Sign, 3 = Planks^-1, 1:1, 2:1, 3:1, 1:2, 2:2, 3:2 | Stick, 2:3
Ladder, 3 = Stick, 1:1, 3:1, 1:2, 2:2, 3:2, 1:3, 3:3
GlassPane, 16 = Glass, 1:1, 2:1, 3:1, 1:2, 2:2, 3:2
IronBars, 16 = IronIngot, 1:1, 2:1, 3:1, 1:2, 2:2, 3:2
@ -373,7 +376,7 @@ JungleFenceGate = Stick, 1:1, 1:2, 3:1, 3:2 | JunglePlanks, 2:1, 2:2
DarkOakFenceGate = Stick, 1:1, 1:2, 3:1, 3:2 | DarkOakPlanks, 2:1, 2:2
AcaciaFenceGate = Stick, 1:1, 1:2, 3:1, 3:2 | AcaciaPlanks, 2:1, 2:2
FenceGate = Stick, 1:1, 1:2, 3:1, 3:2 | OakPlanks, 2:1, 2:2
Bed = Planks, 1:2, 2:2, 3:2 | Wool, 1:1, 2:1, 3:1
Bed = Planks^-1, 1:2, 2:2, 3:2 | Wool^-1, 1:1, 2:1, 3:1
GoldIngot = GoldNugget, 1:1, 1:2, 1:3, 2:1, 2:2, 2:3, 3:1, 3:2, 3:3
EyeOfEnder = EnderPearl, * | BlazePowder, *
Beacon = Glass, 1:1, 1:2, 2:1, 3:1, 3:2 | Obsidian, 1:3, 2:3, 3:3 | NetherStar, 2:2
@ -439,24 +442,23 @@ MagentaDye, 4 = BlueDye, * | WhiteDye, * | RedDye, *, *
#******************************************************#
# Colored wool:
#
WhiteWool = Wool, * | BoneMeal, *
OrangeWool = Wool, * | OrangeDye, *
MagentaWool = Wool, * | MagentaDye, *
LightBlueWool = Wool, * | LightBlueDye, *
YellowWool = Wool, * | YellowDye, *
LimeWool = Wool, * | LimeDye, *
PinkWool = Wool, * | PinkDye, *
GrayWool = Wool, * | GrayDye, *
LightGrayWool = Wool, * | LightGrayDye, *
CyanWool = Wool, * | CyanDye, *
PurpleWool = Wool, * | PurpleDye, *
BlueWool = Wool, * | BlueDye, *
BrownWool = Wool, * | BrownDye, *
GreenWool = Wool, * | GreenDye, *
RedWool = Wool, * | RedDye, *
BlackWool = Wool, * | BlackDye, *
WhiteWool = Wool^-1, * | BoneMeal, *
OrangeWool = WhiteWool, * | OrangeDye, *
MagentaWool = WhiteWool, * | MagentaDye, *
LightBlueWool = WhiteWool, * | LightBlueDye, *
YellowWool = WhiteWool, * | YellowDye, *
LimeWool = WhiteWool, * | LimeDye, *
PinkWool = WhiteWool, * | PinkDye, *
GrayWool = WhiteWool, * | GrayDye, *
LightGrayWool = WhiteWool, * | LightGrayDye, *
CyanWool = WhiteWool, * | CyanDye, *
PurpleWool = WhiteWool, * | PurpleDye, *
BlueWool = WhiteWool, * | BlueDye, *
BrownWool = WhiteWool, * | BrownDye, *
GreenWool = WhiteWool, * | GreenDye, *
RedWool = WhiteWool, * | RedDye, *
BlackWool = WhiteWool, * | BlackDye, *
WhiteCarpet, 3 = WhiteWool, 1:1, 2:1
OrangeCarpet, 3 = OrangeWool, 1:1, 2:1
MagentaCarpet, 3 = MagentaWool, 1:1, 2:1
LightBlueCarpet, 3 = LightBlueWool, 1:1, 2:1
@ -472,11 +474,11 @@ BrownCarpet, 3 = BrownWool, 1:1, 2:1
GreenCarpet, 3 = GreenWool, 1:1, 2:1
RedCarpet, 3 = RedWool, 1:1, 2:2
BlackCarpet, 3 = BlackWool, 1:1, 2:1
WhiteCarpet, 3 = WhiteWool, 1:1, 2:1
#******************************************************#
# Stained Glass:
#
WhiteStainedGlass, 8 = Glass, 1:1, 1:2, 1:3, 2:1, 2:3, 3:1, 3:2, 3:3 | BoneMeal, 2:2
OrangeStainedGlass, 8 = Glass, 1:1, 1:2, 1:3, 2:1, 2:3, 3:1, 3:2, 3:3 | OrangeDye, 2:2
MagentaStainedGlass, 8 = Glass, 1:1, 1:2, 1:3, 2:1, 2:3, 3:1, 3:2, 3:3 | MagentaDye, 2:2
LightBlueStainedGlass, 8 = Glass, 1:1, 1:2, 1:3, 2:1, 2:3, 3:1, 3:2, 3:3 | LightBlueDye, 2:2
@ -492,11 +494,11 @@ BrownStainedGlass, 8 = Glass, 1:1, 1:2, 1:3, 2:1, 2:3, 3:1, 3:2, 3:3 | Brown
GreenStainedGlass, 8 = Glass, 1:1, 1:2, 1:3, 2:1, 2:3, 3:1, 3:2, 3:3 | GreenDye, 2:2
RedStainedGlass, 8 = Glass, 1:1, 1:2, 1:3, 2:1, 2:3, 3:1, 3:2, 3:3 | RedDye, 2:2
BlackStainedGlass, 8 = Glass, 1:1, 1:2, 1:3, 2:1, 2:3, 3:1, 3:2, 3:3 | BlackDye, 2:2
WhiteStainedGlass, 8 = Glass, 1:1, 1:2, 1:3, 2:1, 2:3, 3:1, 3:2, 3:3 | BoneMeal, 2:2
#******************************************************#
# Stained Glass Pane:
#
WhiteStainedGlassPane, 16 = WhiteStainedGlass, 1:2, 1:3, 2:2, 2:3, 3:2, 3:3
OrangeStainedGlassPane, 16 = OrangeStainedGlass, 1:2, 1:3, 2:2, 2:3, 3:2, 3:3
MagentaStainedGlassPane, 16 = MagentaStainedGlass, 1:2, 1:3, 2:2, 2:3, 3:2, 3:3
LightBlueStainedGlassPane, 16 = LightBlueStainedGlass, 1:2, 1:3, 2:2, 2:3, 3:2, 3:3
@ -512,6 +514,7 @@ BrownStainedGlassPane, 16 = BrownStainedGlass, 1:2, 1:3, 2:2, 2:3, 3:2, 3:3
GreenStainedGlassPane, 16 = GreenStainedGlass, 1:2, 1:3, 2:2, 2:3, 3:2, 3:3
RedStainedGlassPane, 16 = RedStainedGlass, 1:2, 1:3, 2:2, 2:3, 3:2, 3:3
BlackStainedGlassPane , 16 = BlackStainedGlass, 1:2, 1:3, 2:2, 2:3, 3:2, 3:3
WhiteStainedGlassPane, 16 = WhiteStainedGlass, 1:2, 1:3, 2:2, 2:3, 3:2, 3:3
#******************************************************#

View File

@ -673,10 +673,10 @@ cCraftingRecipes::cRecipe * cCraftingRecipes::MatchRecipe(const cItem * a_Crafti
if (
(itrS->x >= a_GridWidth) ||
(itrS->y >= a_GridHeight) ||
(Item.m_ItemType != a_CraftingGrid[GridID].m_ItemType) || // same item type?
(Item.m_ItemType != a_CraftingGrid[GridID].m_ItemType) || // same item type?
(Item.m_ItemCount > a_CraftingGrid[GridID].m_ItemCount) || // not enough items
(
(Item.m_ItemDamage > 0) && // should compare damage values?
(Item.m_ItemDamage >= 0) && // should compare damage values?
(Item.m_ItemDamage != a_CraftingGrid[GridID].m_ItemDamage)
)
)