add search to grid!
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package storagecraft.storage;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -10,6 +12,8 @@ public class StorageItem {
|
||||
private int quantity;
|
||||
private int damage;
|
||||
private NBTTagCompound tag;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private int id;
|
||||
|
||||
public StorageItem(Item type, int quantity, int damage, NBTTagCompound tag) {
|
||||
this.type = type;
|
||||
@@ -18,6 +22,12 @@ public class StorageItem {
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
public StorageItem(Item type, int quantity, int damage, NBTTagCompound tag, int id) {
|
||||
this(type, quantity, damage, tag);
|
||||
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public StorageItem(ItemStack stack) {
|
||||
this(stack.getItem(), stack.stackSize, stack.getItemDamage(), stack.stackTagCompound);
|
||||
}
|
||||
@@ -50,6 +60,11 @@ public class StorageItem {
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public StorageItem copy() {
|
||||
return copy(quantity);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user