Grid optimizations
This commit is contained in:
@@ -7,6 +7,7 @@ import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.init.SoundEvents;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import refinedstorage.RefinedStorage;
|
||||
@@ -21,7 +22,7 @@ import refinedstorage.network.GridPullFlags;
|
||||
import refinedstorage.network.MessageGridCraftingClear;
|
||||
import refinedstorage.network.MessageGridCraftingPush;
|
||||
import refinedstorage.network.MessageGridPatternCreate;
|
||||
import refinedstorage.storage.ItemGroup;
|
||||
import refinedstorage.storage.ClientItemGroup;
|
||||
import refinedstorage.tile.grid.IGrid;
|
||||
import refinedstorage.tile.grid.TileGrid;
|
||||
import refinedstorage.tile.grid.WirelessGrid;
|
||||
@@ -30,15 +31,41 @@ import java.io.IOException;
|
||||
import java.util.*;
|
||||
|
||||
public class GuiGrid extends GuiBase {
|
||||
private Comparator<ClientItemGroup> quantityComparator = new Comparator<ClientItemGroup>() {
|
||||
@Override
|
||||
public int compare(ClientItemGroup left, ClientItemGroup right) {
|
||||
if (grid.getSortingDirection() == TileGrid.SORTING_DIRECTION_ASCENDING) {
|
||||
return Integer.valueOf(right.getStack().stackSize).compareTo(left.getStack().stackSize);
|
||||
} else if (grid.getSortingDirection() == TileGrid.SORTING_DIRECTION_DESCENDING) {
|
||||
return Integer.valueOf(left.getStack().stackSize).compareTo(right.getStack().stackSize);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
private Comparator<ClientItemGroup> nameComparator = new Comparator<ClientItemGroup>() {
|
||||
@Override
|
||||
public int compare(ClientItemGroup left, ClientItemGroup right) {
|
||||
if (grid.getSortingDirection() == TileGrid.SORTING_DIRECTION_ASCENDING) {
|
||||
return right.getStack().getDisplayName().compareTo(left.getStack().getDisplayName());
|
||||
} else if (grid.getSortingDirection() == TileGrid.SORTING_DIRECTION_DESCENDING) {
|
||||
return left.getStack().getDisplayName().compareTo(right.getStack().getDisplayName());
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
private ContainerGrid container;
|
||||
private IGrid grid;
|
||||
|
||||
private List<ItemGroup> items = new ArrayList<ItemGroup>();
|
||||
private List<ClientItemGroup> items = new ArrayList<ClientItemGroup>();
|
||||
|
||||
private GuiTextField searchField;
|
||||
|
||||
private int hoveringSlot;
|
||||
private int hoveringItemId;
|
||||
private int slotNumber;
|
||||
private int slotId;
|
||||
|
||||
private Scrollbar scrollbar;
|
||||
|
||||
@@ -95,43 +122,21 @@ public class GuiGrid extends GuiBase {
|
||||
items.addAll(grid.getItemGroups());
|
||||
|
||||
if (!searchField.getText().trim().isEmpty()) {
|
||||
Iterator<ItemGroup> t = items.iterator();
|
||||
Iterator<ClientItemGroup> t = items.iterator();
|
||||
|
||||
while (t.hasNext()) {
|
||||
ItemGroup group = t.next();
|
||||
ClientItemGroup group = t.next();
|
||||
|
||||
if (!group.toCachedStack().getDisplayName().toLowerCase().contains(searchField.getText().toLowerCase())) {
|
||||
if (!group.getStack().getDisplayName().toLowerCase().contains(searchField.getText().toLowerCase())) {
|
||||
t.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Collections.sort(items, new Comparator<ItemGroup>() {
|
||||
@Override
|
||||
public int compare(ItemGroup left, ItemGroup right) {
|
||||
if (grid.getSortingDirection() == TileGrid.SORTING_DIRECTION_ASCENDING) {
|
||||
return right.toCachedStack().getDisplayName().compareTo(left.toCachedStack().getDisplayName());
|
||||
} else if (grid.getSortingDirection() == TileGrid.SORTING_DIRECTION_DESCENDING) {
|
||||
return left.toCachedStack().getDisplayName().compareTo(right.toCachedStack().getDisplayName());
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
Collections.sort(items, nameComparator);
|
||||
|
||||
if (grid.getSortingType() == TileGrid.SORTING_TYPE_QUANTITY) {
|
||||
Collections.sort(items, new Comparator<ItemGroup>() {
|
||||
@Override
|
||||
public int compare(ItemGroup left, ItemGroup right) {
|
||||
if (grid.getSortingDirection() == TileGrid.SORTING_DIRECTION_ASCENDING) {
|
||||
return Integer.valueOf(right.getQuantity()).compareTo(left.getQuantity());
|
||||
} else if (grid.getSortingDirection() == TileGrid.SORTING_DIRECTION_DESCENDING) {
|
||||
return Integer.valueOf(left.getQuantity()).compareTo(right.getQuantity());
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
Collections.sort(items, quantityComparator);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,11 +155,11 @@ public class GuiGrid extends GuiBase {
|
||||
}
|
||||
|
||||
private boolean isHoveringOverItemInSlot() {
|
||||
return grid.isConnected() && isHoveringOverSlot() && hoveringSlot < items.size();
|
||||
return grid.isConnected() && isHoveringOverSlot() && slotNumber < items.size();
|
||||
}
|
||||
|
||||
private boolean isHoveringOverSlot() {
|
||||
return hoveringSlot >= 0;
|
||||
return slotNumber >= 0;
|
||||
}
|
||||
|
||||
public boolean isHoveringOverClear(int mouseX, int mouseY) {
|
||||
@@ -221,7 +226,7 @@ public class GuiGrid extends GuiBase {
|
||||
int x = 8;
|
||||
int y = 20;
|
||||
|
||||
this.hoveringSlot = -1;
|
||||
this.slotNumber = -1;
|
||||
|
||||
int slot = getOffset() * 9;
|
||||
|
||||
@@ -229,37 +234,17 @@ public class GuiGrid extends GuiBase {
|
||||
|
||||
for (int i = 0; i < 9 * getVisibleRows(); ++i) {
|
||||
if (inBounds(x, y, 16, 16, mouseX, mouseY) || !grid.isConnected()) {
|
||||
this.hoveringSlot = slot;
|
||||
this.slotNumber = slot;
|
||||
|
||||
if (slot < items.size()) {
|
||||
// we need to use the ID, because if we filter, the client-side index will change
|
||||
// while the server-side's index will still be the same.
|
||||
this.hoveringItemId = items.get(slot).getId();
|
||||
slotId = items.get(slot).getId();
|
||||
}
|
||||
}
|
||||
|
||||
if (slot < items.size()) {
|
||||
int qty = items.get(slot).getQuantity();
|
||||
ItemStack stack = items.get(slot).getStack();
|
||||
|
||||
String text;
|
||||
|
||||
if (qty >= 1000000) {
|
||||
text = String.format("%.1f", (float) qty / 1000000).replace(",", ".").replace(".0", "") + "M";
|
||||
} else if (qty >= 1000) {
|
||||
text = String.format("%.1f", (float) qty / 1000).replace(",", ".").replace(".0", "") + "K";
|
||||
} else if (qty == 1) {
|
||||
text = null;
|
||||
} else if (qty == 0) {
|
||||
text = t("gui.refinedstorage:grid.craft");
|
||||
} else {
|
||||
text = String.valueOf(qty);
|
||||
}
|
||||
|
||||
if (this.hoveringSlot == slot && GuiScreen.isShiftKeyDown() && qty > 1) {
|
||||
text = String.valueOf(qty);
|
||||
}
|
||||
|
||||
drawItem(x, y, items.get(slot).toCachedStack(), true, text);
|
||||
drawItem(x, y, stack, true, formatQuantity(stack.stackSize));
|
||||
}
|
||||
|
||||
if (inBounds(x, y, 16, 16, mouseX, mouseY) || !grid.isConnected()) {
|
||||
@@ -287,7 +272,7 @@ public class GuiGrid extends GuiBase {
|
||||
}
|
||||
|
||||
if (isHoveringOverItemInSlot()) {
|
||||
drawTooltip(mouseX, mouseY, items.get(hoveringSlot).toCachedStack());
|
||||
drawTooltip(mouseX, mouseY, items.get(slotNumber).getStack());
|
||||
}
|
||||
|
||||
if (isHoveringOverClear(mouseX, mouseY)) {
|
||||
@@ -299,6 +284,20 @@ public class GuiGrid extends GuiBase {
|
||||
}
|
||||
}
|
||||
|
||||
private String formatQuantity(int qty) {
|
||||
if (qty >= 1000000) {
|
||||
return String.format("%.1f", (float) qty / 1000000).replace(",", ".").replace(".0", "") + "M";
|
||||
} else if (qty >= 1000) {
|
||||
return String.format("%.1f", (float) qty / 1000).replace(",", ".").replace(".0", "") + "K";
|
||||
} else if (qty == 1) {
|
||||
return null;
|
||||
} else if (qty == 0) {
|
||||
return t("gui.refinedstorage:grid.craft");
|
||||
} else {
|
||||
return String.valueOf(qty);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseClicked(int mouseX, int mouseY, int clickedButton) throws IOException {
|
||||
super.mouseClicked(mouseX, mouseY, clickedButton);
|
||||
@@ -316,8 +315,8 @@ public class GuiGrid extends GuiBase {
|
||||
if (isHoveringOverSlot() && container.getPlayer().inventory.getItemStack() != null && (clickedButton == 0 || clickedButton == 1)) {
|
||||
grid.onItemPush(-1, clickedButton == 1);
|
||||
} else if (isHoveringOverItemInSlot() && container.getPlayer().inventory.getItemStack() == null) {
|
||||
if (items.get(hoveringSlot).getQuantity() == 0 || (GuiScreen.isShiftKeyDown() && GuiScreen.isCtrlKeyDown())) {
|
||||
FMLCommonHandler.instance().showGuiScreen(new GuiCraftingSettings(this, hoveringItemId));
|
||||
if (items.get(slotNumber).getStack().stackSize == 0 || (GuiScreen.isShiftKeyDown() && GuiScreen.isCtrlKeyDown())) {
|
||||
FMLCommonHandler.instance().showGuiScreen(new GuiCraftingSettings(this, slotId));
|
||||
} else {
|
||||
int flags = 0;
|
||||
|
||||
@@ -333,7 +332,7 @@ public class GuiGrid extends GuiBase {
|
||||
flags |= GridPullFlags.PULL_ONE;
|
||||
}
|
||||
|
||||
grid.onItemPull(hoveringItemId, flags);
|
||||
grid.onItemPull(slotId, flags);
|
||||
}
|
||||
} else if (clickedClear) {
|
||||
RefinedStorage.NETWORK.sendToServer(new MessageGridCraftingClear((TileGrid) grid));
|
||||
|
@@ -17,9 +17,9 @@ public class MessageCompareUpdate extends MessageHandlerPlayerToServer<MessageCo
|
||||
}
|
||||
|
||||
public MessageCompareUpdate(ICompareConfig setting, int compare) {
|
||||
this.x = setting.getMachinePos().getX();
|
||||
this.y = setting.getMachinePos().getY();
|
||||
this.z = setting.getMachinePos().getZ();
|
||||
this.x = ((TileEntity) setting).getPos().getX();
|
||||
this.y = ((TileEntity) setting).getPos().getY();
|
||||
this.z = ((TileEntity) setting).getPos().getZ();
|
||||
this.compare = compare;
|
||||
}
|
||||
|
||||
|
@@ -3,10 +3,13 @@ package refinedstorage.network;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.common.network.ByteBufUtils;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
|
||||
import refinedstorage.container.ContainerGrid;
|
||||
import refinedstorage.storage.ClientItemGroup;
|
||||
import refinedstorage.storage.ItemGroup;
|
||||
import refinedstorage.tile.controller.TileController;
|
||||
|
||||
@@ -15,7 +18,7 @@ import java.util.List;
|
||||
|
||||
public class MessageGridItems implements IMessage, IMessageHandler<MessageGridItems, IMessage> {
|
||||
private TileController controller;
|
||||
private List<ItemGroup> groups = new ArrayList<ItemGroup>();
|
||||
private List<ClientItemGroup> groups = new ArrayList<ClientItemGroup>();
|
||||
|
||||
public MessageGridItems() {
|
||||
}
|
||||
@@ -29,7 +32,14 @@ public class MessageGridItems implements IMessage, IMessageHandler<MessageGridIt
|
||||
int size = buf.readInt();
|
||||
|
||||
for (int i = 0; i < size; ++i) {
|
||||
groups.add(new ItemGroup(buf));
|
||||
int id = buf.readInt();
|
||||
|
||||
int quantity = buf.readInt();
|
||||
|
||||
ItemStack stack = ByteBufUtils.readItemStack(buf);
|
||||
stack.stackSize = quantity;
|
||||
|
||||
groups.add(new ClientItemGroup(id, stack));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +48,9 @@ public class MessageGridItems implements IMessage, IMessageHandler<MessageGridIt
|
||||
buf.writeInt(controller.getItemGroups().size());
|
||||
|
||||
for (int i = 0; i < controller.getItemGroups().size(); ++i) {
|
||||
controller.getItemGroups().get(i).toBytes(buf, i);
|
||||
buf.writeInt(i);
|
||||
buf.writeInt(controller.getItemGroups().get(i).getQuantity());
|
||||
ByteBufUtils.writeItemStack(buf, controller.getItemGroups().get(i).toStack());
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -17,9 +17,9 @@ public class MessageModeToggle extends MessageHandlerPlayerToServer<MessageModeT
|
||||
}
|
||||
|
||||
public MessageModeToggle(IModeConfig mode) {
|
||||
this.x = mode.getMachinePos().getX();
|
||||
this.y = mode.getMachinePos().getY();
|
||||
this.z = mode.getMachinePos().getZ();
|
||||
this.x = ((TileEntity) mode).getPos().getX();
|
||||
this.y = ((TileEntity) mode).getPos().getY();
|
||||
this.z = ((TileEntity) mode).getPos().getZ();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -16,9 +16,9 @@ public class MessageRedstoneModeUpdate extends MessageHandlerPlayerToServer<Mess
|
||||
}
|
||||
|
||||
public MessageRedstoneModeUpdate(IRedstoneModeConfig setting) {
|
||||
this.x = setting.getMachinePos().getX();
|
||||
this.y = setting.getMachinePos().getY();
|
||||
this.z = setting.getMachinePos().getZ();
|
||||
this.x = ((TileEntity) setting).getPos().getX();
|
||||
this.y = ((TileEntity) setting).getPos().getY();
|
||||
this.z = ((TileEntity) setting).getPos().getZ();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
21
src/main/java/refinedstorage/storage/ClientItemGroup.java
Executable file
21
src/main/java/refinedstorage/storage/ClientItemGroup.java
Executable file
@@ -0,0 +1,21 @@
|
||||
package refinedstorage.storage;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public final class ClientItemGroup {
|
||||
private int id;
|
||||
private ItemStack stack;
|
||||
|
||||
public ClientItemGroup(int id, ItemStack stack) {
|
||||
this.id = id;
|
||||
this.stack = stack;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public ItemStack getStack() {
|
||||
return stack;
|
||||
}
|
||||
}
|
@@ -7,22 +7,11 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.fml.common.network.ByteBufUtils;
|
||||
import refinedstorage.RefinedStorageUtils;
|
||||
|
||||
public class ItemGroup {
|
||||
public final class ItemGroup {
|
||||
private Item type;
|
||||
private int quantity;
|
||||
private int damage;
|
||||
private NBTTagCompound tag;
|
||||
// Used clientside
|
||||
private int id;
|
||||
private ItemStack cachedStack;
|
||||
|
||||
public ItemGroup(ByteBuf buf) {
|
||||
this.id = buf.readInt();
|
||||
this.type = Item.getItemById(buf.readInt());
|
||||
this.quantity = buf.readInt();
|
||||
this.damage = buf.readInt();
|
||||
this.tag = buf.readBoolean() ? ByteBufUtils.readTag(buf) : null;
|
||||
}
|
||||
|
||||
public ItemGroup(Item type, int quantity, int damage, NBTTagCompound tag) {
|
||||
this.type = type;
|
||||
@@ -35,18 +24,6 @@ public class ItemGroup {
|
||||
this(stack.getItem(), stack.stackSize, stack.getItemDamage(), stack.getTagCompound());
|
||||
}
|
||||
|
||||
public void toBytes(ByteBuf buf, int id) {
|
||||
buf.writeInt(id);
|
||||
buf.writeInt(Item.getIdFromItem(type));
|
||||
buf.writeInt(quantity);
|
||||
buf.writeInt(damage);
|
||||
buf.writeBoolean(hasTag());
|
||||
|
||||
if (hasTag()) {
|
||||
ByteBufUtils.writeTag(buf, tag);
|
||||
}
|
||||
}
|
||||
|
||||
public int getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
@@ -147,10 +124,6 @@ public class ItemGroup {
|
||||
return compare(stack, RefinedStorageUtils.COMPARE_NBT | RefinedStorageUtils.COMPARE_DAMAGE);
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public ItemGroup copy() {
|
||||
return copy(quantity);
|
||||
}
|
||||
@@ -166,12 +139,4 @@ public class ItemGroup {
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
public ItemStack toCachedStack() {
|
||||
if (cachedStack == null) {
|
||||
cachedStack = toStack();
|
||||
}
|
||||
|
||||
return cachedStack;
|
||||
}
|
||||
}
|
||||
|
@@ -131,11 +131,6 @@ public abstract class TileMachine extends TileBase implements ISynchronizedConta
|
||||
this.redstoneMode = mode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockPos getMachinePos() {
|
||||
return pos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readContainerData(ByteBuf buf) {
|
||||
redstoneMode = RedstoneMode.getById(buf.readInt());
|
||||
|
@@ -6,6 +6,4 @@ public interface ICompareConfig {
|
||||
int getCompare();
|
||||
|
||||
void setCompare(int compare);
|
||||
|
||||
BlockPos getMachinePos();
|
||||
}
|
||||
|
@@ -6,6 +6,4 @@ public interface IModeConfig {
|
||||
void setMode(int mode);
|
||||
|
||||
int getMode();
|
||||
|
||||
BlockPos getMachinePos();
|
||||
}
|
||||
|
@@ -6,6 +6,4 @@ public interface IRedstoneModeConfig {
|
||||
RedstoneMode getRedstoneMode();
|
||||
|
||||
void setRedstoneMode(RedstoneMode mode);
|
||||
|
||||
BlockPos getMachinePos();
|
||||
}
|
||||
|
@@ -545,11 +545,6 @@ public class TileController extends TileBase implements IEnergyReceiver, ISynchr
|
||||
markDirty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockPos getMachinePos() {
|
||||
return pos;
|
||||
}
|
||||
|
||||
public List<ClientSideMachine> getClientSideMachines() {
|
||||
return clientSideMachines;
|
||||
}
|
||||
|
@@ -2,6 +2,7 @@ package refinedstorage.tile.grid;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import refinedstorage.block.EnumGridType;
|
||||
import refinedstorage.storage.ClientItemGroup;
|
||||
import refinedstorage.storage.ItemGroup;
|
||||
import refinedstorage.tile.config.IRedstoneModeConfig;
|
||||
|
||||
@@ -10,9 +11,9 @@ import java.util.List;
|
||||
public interface IGrid {
|
||||
EnumGridType getType();
|
||||
|
||||
List<ItemGroup> getItemGroups();
|
||||
List<ClientItemGroup> getItemGroups();
|
||||
|
||||
void setItemGroups(List<ItemGroup> groups);
|
||||
void setItemGroups(List<ClientItemGroup> groups);
|
||||
|
||||
BlockPos getControllerPos();
|
||||
|
||||
|
@@ -24,6 +24,7 @@ import refinedstorage.network.MessageGridCraftingStart;
|
||||
import refinedstorage.network.MessageGridSettingsUpdate;
|
||||
import refinedstorage.network.MessageGridStoragePull;
|
||||
import refinedstorage.network.MessageGridStoragePush;
|
||||
import refinedstorage.storage.ClientItemGroup;
|
||||
import refinedstorage.storage.ItemGroup;
|
||||
import refinedstorage.tile.TileMachine;
|
||||
import refinedstorage.tile.config.IRedstoneModeConfig;
|
||||
@@ -69,7 +70,7 @@ public class TileGrid extends TileMachine implements IGrid {
|
||||
private int sortingType = SORTING_TYPE_NAME;
|
||||
private int searchBoxMode = SEARCH_BOX_MODE_NORMAL;
|
||||
|
||||
private List<ItemGroup> itemGroups = new ArrayList<ItemGroup>();
|
||||
private List<ClientItemGroup> itemGroups = new ArrayList<ClientItemGroup>();
|
||||
|
||||
@Override
|
||||
public int getEnergyUsage() {
|
||||
@@ -89,12 +90,12 @@ public class TileGrid extends TileMachine implements IGrid {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemGroup> getItemGroups() {
|
||||
public List<ClientItemGroup> getItemGroups() {
|
||||
return itemGroups;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setItemGroups(List<ItemGroup> itemGroups) {
|
||||
public void setItemGroups(List<ClientItemGroup> itemGroups) {
|
||||
this.itemGroups = itemGroups;
|
||||
}
|
||||
|
||||
|
@@ -13,6 +13,7 @@ import refinedstorage.network.MessageWirelessGridCraftingStart;
|
||||
import refinedstorage.network.MessageWirelessGridSettingsUpdate;
|
||||
import refinedstorage.network.MessageWirelessGridStoragePull;
|
||||
import refinedstorage.network.MessageWirelessGridStoragePush;
|
||||
import refinedstorage.storage.ClientItemGroup;
|
||||
import refinedstorage.storage.ItemGroup;
|
||||
import refinedstorage.tile.config.IRedstoneModeConfig;
|
||||
import refinedstorage.tile.controller.TileController;
|
||||
@@ -26,7 +27,7 @@ public class WirelessGrid implements IGrid {
|
||||
private int sortingType;
|
||||
private int sortingDirection;
|
||||
private int searchBoxMode;
|
||||
private List<ItemGroup> itemGroups = new ArrayList<ItemGroup>();
|
||||
private List<ClientItemGroup> itemGroups = new ArrayList<ClientItemGroup>();
|
||||
private long lastUpdate;
|
||||
|
||||
public WirelessGrid(ItemStack stack, EnumHand hand) {
|
||||
@@ -43,12 +44,12 @@ public class WirelessGrid implements IGrid {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemGroup> getItemGroups() {
|
||||
public List<ClientItemGroup> getItemGroups() {
|
||||
return itemGroups;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setItemGroups(List<ItemGroup> groups) {
|
||||
public void setItemGroups(List<ClientItemGroup> groups) {
|
||||
this.itemGroups = groups;
|
||||
this.lastUpdate = System.currentTimeMillis();
|
||||
}
|
||||
|
Reference in New Issue
Block a user