Fixed some misc bugs with pattern grid, removed unused translations
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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 -> {
|
||||
|
||||
Reference in New Issue
Block a user