Thread: fixed

Results 1 to 2 of 2
  1. #1 fixed 
    Registered Member rockarocka's Avatar
    Join Date
    May 2010
    Posts
    978
    Thanks given
    27
    Thanks received
    7
    Rep Power
    20
    fixed...
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Jan 2012
    Posts
    70
    Thanks given
    1
    Thanks received
    4
    Rep Power
    11
    Quote Originally Posted by rockarocka View Post
    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!
    Reply With Quote  
     

  3. Thankful user:



Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [PI] Stackable
    By Files' in forum Help
    Replies: 13
    Last Post: 04-23-2011, 11:27 PM
  2. Stackable
    By Moofens in forum Help
    Replies: 2
    Last Post: 01-30-2010, 09:07 PM
  3. Make any item stackable/non-stackable
    By Luke in forum Snippets
    Replies: 6
    Last Post: 07-20-2009, 04:43 PM
  4. Stackable?
    By Tylerr in forum Help
    Replies: 5
    Last Post: 05-12-2009, 06:18 AM
  5. All stackable
    By Vastiko in forum Snippets
    Replies: 4
    Last Post: 02-28-2009, 01:39 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •