![Rough Mobs Revamped](https://media.forgecdn.net/avatars/thumbnails/247/41/256/256/637161034679470158.png)
Equipment doesn't respect dimension specifier
p1ut0nium-git opened this issue ยท 1 comments
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.
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;