Originally Posted by
rockarocka
I have item which should stack.. But it isn't.. How should i add it?
[SERVER SIDED]
Go to item.java and search for:
Code:
itemStackable[counter]
it should be something like this
Code:
itemStackable[counter] = false;
itemStackable[13879] = true;
just add something like this:
Code:
itemStackable[ITEM ID HERE] = true;
if u cant find
Code:
itemStackable[counter]
add under this
Code:
public static String getItemName(int id) {
for (int j = 0; j < Server.itemHandler.ItemList.length; j++) {
if (Server.itemHandler.ItemList[j] != null)
if (Server.itemHandler.ItemList[j].itemId == id)
return Server.itemHandler.ItemList[j].itemName;
}
return null;
}
this:
Code:
public static boolean[] itemStackable = new boolean[Config.ITEM_LIMIT];
public static boolean[] itemIsNote = new boolean[Config.ITEM_LIMIT];
public static int[] targetSlots = new int[Config.ITEM_LIMIT];
static {
int counter = 0;
int c;
try {
FileInputStream dataIn = new FileInputStream(new File("./Data/data/stackable.dat"));
while ((c = dataIn.read()) != -1) {
if (c == 0) {
itemStackable[counter] = false;
itemStackable[13879] = true;
itemStackable[13883] = true;
itemStackable[8239] = true;
itemStackable[15243] = true;
} else {
itemStackable[counter] = true;
}
counter++;
}
int[] stackableItems = {2};
dataIn.close();
} catch (IOException e) {
System.out.println("Critical error while loading stackabledata! Trace:");
e.printStackTrace();
}
Hope this is explained good enought
Thanks!