Check ItemStack NBT for comparison in more places (#5491)

* Check NBT in a bunch more item comparision checks
* Fix Gas conversion checking stack size when comparing itemstacks
This commit is contained in:
Richard Freimer authored and Xander committed 2019-05-27 12:08:09 +08:00
1 parent 7438ad4d9e
commit eb2de11b72
20 files changed
+105 -81

No files matched your search

@@ -30,6 +30,7 @@ import net.minecraft.util.EnumFacing;
import net.minecraft.util.IStringSerializable;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundEvent;
import net.minecraftforge.items.ItemHandlerHelper;
/**
* Internal interface for managing various Factory types.
@@ -163,11 +164,10 @@ public interface IFactory {
} else if (this == INFUSING) {
if (infuse.getType() != null) {
return RecipeHandler.getMetallurgicInfuserRecipe(new InfusionInput(infuse, slotStack));
} else {
for (Entry<InfusionInput, MetallurgicInfuserRecipe> entry : Recipe.METALLURGIC_INFUSER.get().entrySet()) {
if (entry.getKey().inputStack.isItemEqual(slotStack)) {
return entry.getValue();
}
}
for (Entry<InfusionInput, MetallurgicInfuserRecipe> entry : Recipe.METALLURGIC_INFUSER.get().entrySet()) {
if (ItemHandlerHelper.canItemStacksStack(entry.getKey().inputStack, slotStack)) {
return entry.getValue();
}
}
}