Rename API method.

This commit is contained in:
raoulvdberge
2018-10-27 19:54:48 +02:00
parent 20628f9bf7
commit 8cb38fe528
4 changed files with 6 additions and 6 deletions

View File

@@ -5,8 +5,8 @@ package com.raoulvdberge.refinedstorage.api.network.grid;
*/
public interface IGridCraftingListener {
/**
* Called when the crafting output changes.
* Called when the crafting matrix was changed.
* Usually you'd send slot updates for the crafting slots (and output slot) here, so that all clients get an actual view.
*/
void onCraftingOutputChanged();
void onCraftingMatrixChanged();
}

View File

@@ -330,7 +330,7 @@ public class NetworkNodeGrid extends NetworkNode implements IGridNetworkAware, I
result.setInventorySlotContents(0, currentRecipe.getCraftingResult(matrix));
}
craftingListeners.forEach(IGridCraftingListener::onCraftingOutputChanged);
craftingListeners.forEach(IGridCraftingListener::onCraftingMatrixChanged);
markDirty();
}

View File

@@ -77,7 +77,7 @@ public class ContainerGrid extends ContainerBase implements IGridCraftingListene
if (slot == craftingResultSlot) {
grid.onCraftedShift(getPlayer());
onCraftingOutputChanged();
onCraftingMatrixChanged();
detectAndSendChanges();
} else {
@@ -204,7 +204,7 @@ public class ContainerGrid extends ContainerBase implements IGridCraftingListene
}
@Override
public void onCraftingOutputChanged() {
public void onCraftingMatrixChanged() {
for (int i = 0; i < inventorySlots.size(); ++i) {
Slot slot = inventorySlots.get(i);

View File

@@ -27,7 +27,7 @@ public class SlotGridCraftingResult extends SlotCrafting {
if (!player.getEntityWorld().isRemote) {
grid.onCrafted(player);
container.onCraftingOutputChanged();
container.onCraftingMatrixChanged();
}
return ItemStack.EMPTY;