mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-22 13:09:47 +00:00
Fixed brewery recipes
This commit is contained in:
1 parent
f3d93b47b9
commit
83fd00cad5
2 files changed
+9
-1
No files matched your search
@@ -35,6 +35,14 @@ public class BreweryCrafting implements INbtWritable {
|
||||
ItemStack yeast = new ItemStack(nbt.getCompoundTag("yeast"));
|
||||
return new BreweryCrafting(inputFluid, ingredient, inputGrains, yeast);
|
||||
}
|
||||
|
||||
public boolean hasInputGrainsEmpty(){
|
||||
return inputGrains == null || (isEmptyStack(inputGrains[0]) && isEmptyStack(inputGrains[1]) && isEmptyStack(inputGrains[2]));
|
||||
}
|
||||
|
||||
private boolean isEmptyStack(ItemStack stack){
|
||||
return stack == null || stack.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT(final NBTTagCompound nbt) {
|
||||
|
||||
@@ -31,7 +31,7 @@ public class BreweryRecipe implements IBreweryRecipe {
|
||||
if (!this.yeast.isItemEqual(crafting.yeast)) {
|
||||
return null;
|
||||
}
|
||||
if(crafting.inputGrains != null && crafting.inputGrains.length > 0){
|
||||
if(!crafting.hasInputGrainsEmpty()){
|
||||
return null;
|
||||
}
|
||||
if(!crafting.ingredient.isEmpty()){
|
||||
|
||||
Reference in new issue
Block a user