also use that tool code in the CraftingStep, fixes #619
This commit is contained in:
@@ -105,6 +105,12 @@ public class CraftingStepCraft extends CraftingStep {
|
|||||||
for (int i = 0; i < toInsert.size(); i++) {
|
for (int i = 0; i < toInsert.size(); i++) {
|
||||||
ItemStack input = toInsert.get(i);
|
ItemStack input = toInsert.get(i);
|
||||||
if (input != null) {
|
if (input != null) {
|
||||||
|
// This will be a tool, like a hammer
|
||||||
|
if (input.isItemStackDamageable()) {
|
||||||
|
compare &= ~IComparer.COMPARE_DAMAGE;
|
||||||
|
} else {
|
||||||
|
compare |= IComparer.COMPARE_DAMAGE;
|
||||||
|
}
|
||||||
ItemStack actualInput = actualInputs.get(input, compare);
|
ItemStack actualInput = actualInputs.get(input, compare);
|
||||||
ItemStack taken = ItemHandlerHelper.copyStackWithSize(actualInput, input.stackSize);
|
ItemStack taken = ItemHandlerHelper.copyStackWithSize(actualInput, input.stackSize);
|
||||||
took[i] = taken;
|
took[i] = taken;
|
||||||
|
@@ -219,6 +219,7 @@ public class CraftingTask implements ICraftingTask {
|
|||||||
for (int i = 0; i < usedStacks.size(); i++) {
|
for (int i = 0; i < usedStacks.size(); i++) {
|
||||||
ItemStack input = usedStacks.get(i);
|
ItemStack input = usedStacks.get(i);
|
||||||
if (input != null) {
|
if (input != null) {
|
||||||
|
// This will be a tool, like a hammer
|
||||||
if (input.isItemStackDamageable()) {
|
if (input.isItemStackDamageable()) {
|
||||||
compare &= ~IComparer.COMPARE_DAMAGE;
|
compare &= ~IComparer.COMPARE_DAMAGE;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user