Thread: adding 725 items, itemdef error

Results 1 to 3 of 3
  1. #1 adding 725 items, itemdef error 
    Registered Member
    Join Date
    Jun 2012
    Posts
    159
    Thanks given
    11
    Thanks received
    3
    Rep Power
    11
    Ok so i added the 725 items, and downloaded the models.rar someone posted and extracted to my raw folder (idk if i needed to do more im not good at client sided or cache) and i did that and changed the stuff basically and the items work, but some of the items if you look at them it gets this and freezes client.

    line 1271: sprite = getSprite(itemDef.certID, 10, -1);
    Method getSprite:
    Code:
    public static Sprite getSprite(int i, int j, int k) {
    		if (k == 0) {
    			Sprite sprite = (Sprite) mruNodes1.insertFromCache(i);
    			if (sprite != null && sprite.maxHeight != j && sprite.maxHeight != -1) {
    				sprite.unlink();
    				sprite = null;
    			}
    			if (sprite != null)
    				return sprite;
    		}
    		ItemDef itemDef = forID(i);
    		if (itemDef.stackIDs == null)
    			j = -1;
    		if (j > 1) {
    			int i1 = -1;
    			for (int j1 = 0; j1 < 10; j1++)
    				if (j >= itemDef.stackAmounts[j1] && itemDef.stackAmounts[j1] != 0)
    					i1 = itemDef.stackIDs[j1];
    			if (i1 != -1)
    				itemDef = forID(i1);
    		}
    		Model model = itemDef.method201(1);
    		if (model == null)
    			return null;
    		Sprite sprite = null;
    		if (itemDef.certTemplateID != -1) {
    			sprite = getSprite(itemDef.certID, 10, -1);
    			if (sprite == null)
    				return null;
    		}
    		if (itemDef.lentItemID != -1) {
    			sprite = getSprite(itemDef.lendID, 50, 0);
    			if (sprite == null)
    				return null;
    		}
    		Sprite sprite2 = new Sprite(32, 32);
    		int k1 = Texture.textureInt1;
    		int l1 = Texture.textureInt2;
    		int ai[] = Texture.anIntArray1472;
    		int ai1[] = DrawingArea.pixels;
    		int i2 = DrawingArea.width;
    		int j2 = DrawingArea.height;
    		int k2 = DrawingArea.topX;
    		int l2 = DrawingArea.bottomX;
    		int i3 = DrawingArea.topY;
    		int j3 = DrawingArea.bottomY;
    		Texture.aBoolean1464 = false;
    		DrawingArea.initDrawingArea(32, 32, sprite2.myPixels);
    		DrawingArea.drawPixels(32, 0, 0, 0, 32);
    		Texture.method364();
    		int k3 = itemDef.modelZoom;
    		if (k == -1)
    			k3 = (int) ((double) k3 * 1.5D);
    		if (k > 0)
    			k3 = (int) ((double) k3 * 1.04D);
    		int l3 = Texture.anIntArray1470[itemDef.modelRotationY] * k3 >> 16;
    		int i4 = Texture.anIntArray1471[itemDef.modelRotationY] * k3 >> 16;
    		model.method482(itemDef.modelRotationX, itemDef.anInt204, itemDef.modelRotationY, itemDef.modelOffset1, l3 + model.modelHeight / 2 + itemDef.modelOffset2, i4 + itemDef.modelOffset2);
    		for (int i5 = 31; i5 >= 0; i5--) {
    			for (int j4 = 31; j4 >= 0; j4--)
    				if (sprite2.myPixels[i5 + j4 * 32] == 0)
    					if (i5 > 0 && sprite2.myPixels[(i5 - 1) + j4 * 32] > 1)
    						sprite2.myPixels[i5 + j4 * 32] = 1;
    					else if (j4 > 0 && sprite2.myPixels[i5 + (j4 - 1) * 32] > 1)
    						sprite2.myPixels[i5 + j4 * 32] = 1;
    					else if (i5 < 31 && sprite2.myPixels[i5 + 1 + j4 * 32] > 1)
    						sprite2.myPixels[i5 + j4 * 32] = 1;
    					else if (j4 < 31 && sprite2.myPixels[i5 + (j4 + 1) * 32] > 1)
    						sprite2.myPixels[i5 + j4 * 32] = 1;
    		}
    		if (k > 0) {
    			for (int j5 = 31; j5 >= 0; j5--) {
    				for (int k4 = 31; k4 >= 0; k4--)
    					if (sprite2.myPixels[j5 + k4 * 32] == 0)
    						if (j5 > 0 && sprite2.myPixels[(j5 - 1) + k4 * 32] == 1)
    							sprite2.myPixels[j5 + k4 * 32] = k;
    						else if (k4 > 0 && sprite2.myPixels[j5 + (k4 - 1) * 32] == 1)
    							sprite2.myPixels[j5 + k4 * 32] = k;
    						else if (j5 < 31 && sprite2.myPixels[j5 + 1 + k4 * 32] == 1)
    							sprite2.myPixels[j5 + k4 * 32] = k;
    						else if (k4 < 31 && sprite2.myPixels[j5 + (k4 + 1) * 32] == 1)
    							sprite2.myPixels[j5 + k4 * 32] = k;
    			}
    		} else if (k == 0) {
    			for (int k5 = 31; k5 >= 0; k5--) {
    				for (int l4 = 31; l4 >= 0; l4--)
    					if (sprite2.myPixels[k5 + l4 * 32] == 0 && k5 > 0 && l4 > 0 && sprite2.myPixels[(k5 - 1) + (l4 - 1) * 32] > 0)
    						sprite2.myPixels[k5 + l4 * 32] = 0x302020;
    			}
    		}
    		if (itemDef.certTemplateID != -1) {
    			int l5 = sprite.maxWidth;
    			int j6 = sprite.maxHeight;
    			sprite.maxWidth = 32;
    			sprite.maxHeight = 32;
    			sprite.drawSprite(0, 0);
    			sprite.maxWidth = l5;
    			sprite.maxHeight = j6;
    		}
    		if (itemDef.lentItemID != -1) {
    			int l5 = sprite.maxWidth;
    			int j6 = sprite.maxHeight;
    			sprite.maxWidth = 32;
    			sprite.maxHeight = 32;
    			sprite.drawSprite(0, 0);
    			sprite.maxWidth = l5;
    			sprite.maxHeight = j6;
    		}
    		if (k == 0)
    			mruNodes1.removeFromCache(sprite2, i);
    		DrawingArea.initDrawingArea(j2, i2, ai1);
    		DrawingArea.setDrawingArea(j3, k2, l2, i3);
    		Texture.textureInt1 = k1;
    		Texture.textureInt2 = l1;
    		Texture.anIntArray1472 = ai;
    		Texture.aBoolean1464 = true;
    		if (itemDef.stackable)
    			sprite2.maxWidth = 33;
    		else
    			sprite2.maxWidth = 32;
    		sprite2.maxHeight = j;
    		return sprite2;
    	}
    skype is x25xquintonp, 7$ for person to fix weather its thru here or skype. I really need this ASAP as it dcs it and its annoying
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Jun 2012
    Posts
    159
    Thanks given
    11
    Thanks received
    3
    Rep Power
    11
    bump 10$ friend used eclipse

    Exception in thread "Thread-4" java.lang.StackOverflowError
    at ItemDef.getSprite(ItemDef.java:1246)
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jun 2012
    Posts
    159
    Thanks given
    11
    Thanks received
    3
    Rep Power
    11
    15$ 2 people failed so far
    [Only registered and activated users can see links. ]
    Reply With Quote  
     


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. 100% 725 Packable Items
    By Xcess in forum Snippets
    Replies: 98
    Last Post: 07-13-2013, 05:28 PM
  2. Replies: 5
    Last Post: 07-20-2012, 12:33 AM
  3. 725 items, screwed buildings
    By pkingbandit in forum Help
    Replies: 6
    Last Post: 07-18-2012, 06:59 PM
  4. Replies: 7
    Last Post: 04-30-2012, 08:02 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •