Fix for cells in CT scripts. Some work on #1590

This commit is contained in:
drcrazy 2018-08-29 18:23:56 +03:00
parent c41b889160
commit 2d3c074767
2 changed files with 6 additions and 3 deletions

View file

@ -101,7 +101,8 @@ public class CTFusionReactor {
@Override @Override
public void apply() { public void apply() {
for (FusionReactorRecipe recipeType : FusionReactorRecipeHelper.reactorRecipes) { for (FusionReactorRecipe recipeType : FusionReactorRecipeHelper.reactorRecipes) {
if (ItemUtils.isItemEqual(recipeType.getOutput(), output, true, false)) { boolean matchNBT = output.hasTagCompound();
if (ItemUtils.isItemEqual(recipeType.getOutput(), output, true, matchNBT)) {
removedRecipes.add(recipeType); removedRecipes.add(recipeType);
FusionReactorRecipeHelper.reactorRecipes.remove(recipeType); FusionReactorRecipeHelper.reactorRecipes.remove(recipeType);
break; break;

View file

@ -75,7 +75,8 @@ public class CTGeneric {
public void apply() { public void apply() {
for (IBaseRecipeType recipeType : RecipeHandler.getRecipeClassFromName(name)) { for (IBaseRecipeType recipeType : RecipeHandler.getRecipeClassFromName(name)) {
for (ItemStack stack : recipeType.getOutputs()) { for (ItemStack stack : recipeType.getOutputs()) {
if (ItemUtils.isItemEqual(stack, output, true, false)) { boolean matchNBT = output.hasTagCompound();
if (ItemUtils.isItemEqual(stack, output, true, matchNBT)) {
removedRecipes.add((BaseRecipe) recipeType); removedRecipes.add((BaseRecipe) recipeType);
RecipeHandler.recipeList.remove(recipeType); RecipeHandler.recipeList.remove(recipeType);
break; break;
@ -106,7 +107,8 @@ public class CTGeneric {
for (Object recipeInput : recipeType.getInputs()) { for (Object recipeInput : recipeType.getInputs()) {
ItemStack ingredientStack = CraftTweakerMC.getItemStack(ingredient); ItemStack ingredientStack = CraftTweakerMC.getItemStack(ingredient);
if (!ingredientStack.isEmpty()) { if (!ingredientStack.isEmpty()) {
if (ItemUtils.isInputEqual(recipeInput, ingredientStack, true, false, true)) { boolean matchNBT = ingredientStack.hasTagCompound();
if (ItemUtils.isInputEqual(recipeInput, ingredientStack, true, matchNBT, true)) {
removedRecipes.add((BaseRecipe) recipeType); removedRecipes.add((BaseRecipe) recipeType);
RecipeHandler.recipeList.remove(recipeType); RecipeHandler.recipeList.remove(recipeType);
break; break;