Fix overlaying recipe not removing existing item grids on second page (#16)

* Fix overlaying recipe not removing existing item grids on second page

* updateBuildScript
This commit is contained in:
miozune authored and GitHub committed 2022-08-02 18:10:02 +07:00
1 parent 34aedb0db7
commit 18edf6d803
5 files changed
+242 -244

No files matched your search

@@ -184,17 +184,17 @@ public class PacketNEIPatternRecipe implements IMessage {
final IInventory outputMatrix = cct.getInventoryByName("output");
if (inv != null && message.input != null && security != null) {
for (int i = 0; i < Math.min(craftMatrix.getSizeInventory(), recipeInput.length); i++) {
for (int i = 0; i < craftMatrix.getSizeInventory(); i++) {
ItemStack currentItem = null;
if (recipeInput[i] != null) {
if (i < recipeInput.length && recipeInput[i] != null) {
currentItem = recipeInput[i].copy();
}
craftMatrix.setInventorySlotContents(i, currentItem);
}
for (int i = 0; i < recipeOutput.length; i++) {
for (int i = 0; i < outputMatrix.getSizeInventory(); i++) {
ItemStack currentItem = null;
if (recipeOutput[i] != null) {
if (i < recipeOutput.length && recipeOutput[i] != null) {
currentItem = recipeOutput[i].copy();
}
outputMatrix.setInventorySlotContents(i, currentItem);