Nei now shows correct stack size, crafting system now uses correct stack amount, fixed syncing issues.

This commit is contained in:
modmuss50 2015-05-09 20:29:26 +01:00
parent 3d92772004
commit 4d68b34143
14 changed files with 209 additions and 15 deletions

View file

@ -92,7 +92,7 @@ public class RecipeCrafter {
for (IBaseRecipeType recipe : RecipeHanderer.getRecipeClassFromName(recipeName)) {
boolean isFullRecipe = false;
for (int i = 0; i < inputs; i++) {
if (ItemUtils.isItemEqual(inventory.getStackInSlot(inputSlots[i]), recipe.getInputs().get(i), true, true, true)) {
if (ItemUtils.isItemEqual(inventory.getStackInSlot(inputSlots[i]), recipe.getInputs().get(i), true, true, true) && inventory.getStackInSlot(inputSlots[i]).stackSize >= recipe.getInputs().get(i).stackSize) {
isFullRecipe = true;
} else {
isFullRecipe = false;
@ -105,7 +105,7 @@ public class RecipeCrafter {
}
} else {
for (int i = 0; i < inputs; i++) {
if (!ItemUtils.isItemEqual(inventory.getStackInSlot(inputSlots[i]), currentRecipe.getInputs().get(i), true, true, true)) {
if (!ItemUtils.isItemEqual(inventory.getStackInSlot(inputSlots[i]), currentRecipe.getInputs().get(i), true, true, true) || (inventory.getStackInSlot(inputSlots[i]) == null || (inventory.getStackInSlot(inputSlots[i]).stackSize < currentRecipe.getInputs().get(i).stackSize))) {
currentRecipe = null;
currentTickTime = 0;
return;