Rough Mobs Revamped

Rough Mobs Revamped

2M Downloads

Equipment doesn't respect dimension specifier

p1ut0nium-git opened this issue ยท 1 comments

commented

This is a bug carried over from the original Rough Mobs 2 code (version 2.0.15). I've tracked down where it is happening, just need to figure out Lellson's logic to fix it.

commented

This issue should hopefuly be solved now. I altered the getRandom function in the EntryPool class inside of EquipHelper.java

		int rnd = RND.nextInt(entries.size());
		T entry = entries.get(rnd);
		String dimension = dimensions.get(rnd);
		
		/* TODO: I don't understand why Lellson was looping through this 100 times
		But it doesn't seem to be needed? So I've commented it out for now.
		int i = 100;
		while (!isDimension(entity, dimension) && i > 0) {
			rnd = RND.nextInt(entries.size());
			entry = entries.get(rnd);
			dimension = dimensions.get(rnd);
			i--;
		}
		*/
		
		// If entity is in wrong dimension, then don't return items
                   // This conditional should be the fix.
		if (!isDimension(entity, dimension)) {
			entry = null;
			return entry;
		}
		
		// Otherwise, return items
		return entry;