I tried packing 474 animations and gfx into my 317 (galkons refactored) client but when I login no animations or gfxs are working and all the old ones look broken, and when I login i get this error:

Code:
java.lang.NullPointerException
	at Class36.forId(Class36.java:83)
	at Model.method470(Model.java:872)
	at EntityDef.method164(EntityDef.java:166)
	at NPC.method450(NPC.java:20)
	at NPC.getRotatedModel(NPC.java:28)
	at Animable.method443(Animable.java:8)
	at WorldController.method314(WorldController.java:1356)
	at WorldController.method313(WorldController.java:981)
	at Game.method146(Game.java:11574)
	at Game.drawGameScreen(Game.java:7607)
	at Game.processDrawing(Game.java:8481)
	at RSApplet.run(RSApplet.java:123)
	at Game.run(Game.java:4351)
	at java.lang.Thread.run(Unknown Source)
I replaced seq.dat and spotanim.dat with toms cache suite and I also packed the gfx in index1 and the animations in index2 by using galkons index repacking. I also updated read values in SpotAnim.java and Animation.java Can anyone please point me in the right direction?

I used this to get the data: [Only registered and activated users can see links. ]

Spoiler for code from the error:

Code:
	public static Class36 forId(int i) {
		try {
			String s = "";
			int file = 0;
			int k = 0;
			s = Integer.toHexString(i);
			file = Integer.parseInt(s.substring(0, s.length() - 4), 16);
			k = Integer.parseInt(s.substring(s.length() - 4), 16);
			if(animationlist[file].length == 0) {
				clientInstance.onDemandFetcher.method558(1, file);
				return null;
			}
			return animationlist[file][k];
		} catch(Exception e) {
			e.printStackTrace();
			return null;
		}
	}
Code:
	public void method470(int i) {
		if (anIntArrayArray1657 == null) {
			return;
		}
		if (i == -1) {
			return;
		}
		Class36 class36 = Class36.forId(i);
		if (class36 == null) {
			return;
		}
		Class18 class18 = class36.aClass18_637;
		anInt1681 = 0;
		anInt1682 = 0;
		anInt1683 = 0;
		for (int k = 0; k < class36.anInt638; k++) {
			int l = class36.anIntArray639[k];
			method472(class18.anIntArray342[l], class18.anIntArray343[l], class36.anIntArray640[k], class36.anIntArray641[k], class36.anIntArray642[k]);
		}

	}
Code:
public Model method164(int j, int k, int ai[]) {
		if (childrenIDs != null) {
			EntityDef entityDef = method161();
			if (entityDef == null) {
				return null;
			} else {
				return entityDef.method164(j, k, ai);
			}
		}
		Model model = (Model) mruNodes.insertFromCache(type);
		if (model == null) {
			boolean flag = false;
			for (int i1 = 0; i1 < anIntArray94.length; i1++) {
				if (!Model.method463(anIntArray94[i1])) {
					flag = true;
				}
			}

			if (flag) {
				return null;
			}
			Model aclass30_sub2_sub4_sub6s[] = new Model[anIntArray94.length];
			for (int j1 = 0; j1 < anIntArray94.length; j1++) {
				aclass30_sub2_sub4_sub6s[j1] = Model.method462(anIntArray94[j1]);
			}

			if (aclass30_sub2_sub4_sub6s.length == 1) {
				model = aclass30_sub2_sub4_sub6s[0];
			} else {
				model = new Model(aclass30_sub2_sub4_sub6s.length, aclass30_sub2_sub4_sub6s);
			}
			if (anIntArray76 != null) {
				for (int k1 = 0; k1 < anIntArray76.length; k1++) {
					model.method476(anIntArray76[k1], anIntArray70[k1]);
				}

			}
			model.method469();
			model.method479(64 + anInt85, 850 + anInt92, -30, -50, -30, true);
			mruNodes.removeFromCache(model, type);
		}
		Model model_1 = Model.aModel_1621;
		model_1.method464(model, Class36.method532(k) & Class36.method532(j));
		if (k != -1 && j != -1) {
			model_1.method471(ai, j, k);
		} else if (k != -1) {
			model_1.method470(k);
		}
		if (anInt91 != 128 || anInt86 != 128) {
			model_1.method478(anInt91, anInt91, anInt86);
		}
		model_1.method466();
		model_1.anIntArrayArray1658 = null;
		model_1.anIntArrayArray1657 = null;
		if (aByte68 == 1) {
			model_1.aBoolean1659 = true;
		}
		return model_1;
	}
SpotAnim.java
[Only registered and activated users can see links. ]

Animation.java
[Only registered and activated users can see links. ]

OnDemandFetcher
[Only registered and activated users can see links. ]


Any help is appreciated, thank you!