Fixed some misc bugs with pattern grid, removed unused translations

This commit is contained in:
raoulvdberge
2017-06-28 13:02:35 +02:00
parent f914596fe8
commit 5e6d446bc6
11 changed files with 12 additions and 43 deletions

View File

@@ -9,7 +9,6 @@ import com.raoulvdberge.refinedstorage.api.util.IComparer;
import com.raoulvdberge.refinedstorage.apiimpl.API;
import com.raoulvdberge.refinedstorage.block.BlockGrid;
import com.raoulvdberge.refinedstorage.block.GridType;
import com.raoulvdberge.refinedstorage.container.ContainerGrid;
import com.raoulvdberge.refinedstorage.inventory.ItemHandlerBase;
import com.raoulvdberge.refinedstorage.inventory.ItemHandlerFilter;
import com.raoulvdberge.refinedstorage.inventory.ItemHandlerListenerNetworkNode;
@@ -330,10 +329,6 @@ public class NetworkNodeGrid extends NetworkNode implements IGrid {
for (int i = 0; i < matrix.getSizeInventory(); ++i) {
matrix.setInventorySlotContents(i, ItemStack.EMPTY);
}
world.getMinecraftServer().getPlayerList().getPlayers().stream()
.filter(player -> player.openContainer instanceof ContainerGrid && ((ContainerGrid) player.openContainer).getTile() != null && ((ContainerGrid) player.openContainer).getTile().getPos().equals(pos))
.forEach(player -> player.openContainer.detectAndSendChanges());
}
@Override

View File

@@ -148,6 +148,16 @@ public class ContainerGrid extends ContainerBase {
}
}
public void sendAllSlots() {
for (int i = 0; i < inventorySlots.size(); ++i) {
Slot slot = inventorySlots.get(i);
for (IContainerListener listener : listeners) {
listener.sendSlotContents(this, i, slot.getStack());
}
}
}
@Override
public void onContainerClosed(EntityPlayer player) {
super.onContainerClosed(player);

View File

@@ -324,7 +324,7 @@ public class GuiGrid extends GuiBase implements IGridDisplay {
case CRAFTING:
return inBounds(82, y, 7, 7, mouseX, mouseY);
case PATTERN:
if (TileGrid.PROCESSING_PATTERN.getValue()) {
if (((NetworkNodeGrid) grid).isProcessingPattern()) {
return inBounds(154, y, 7, 7, mouseX, mouseY);
}

View File

@@ -149,8 +149,7 @@ public class TileGrid extends TileNode<NetworkNodeGrid> {
.filter(player -> player.openContainer instanceof ContainerGrid && ((ContainerGrid) player.openContainer).getTile() != null && ((ContainerGrid) player.openContainer).getTile().getPos().equals(tile.getPos()))
.forEach(player -> {
((ContainerGrid) player.openContainer).initSlots();
player.openContainer.detectAndSendChanges();
((ContainerGrid) player.openContainer).sendAllSlots();
});
}
}, parameter -> {