Fix curseforge issue #27

This commit is contained in:
Electroblob
2018-02-06 16:32:40 +00:00
parent c07ac1a1b2
commit 6d7791829c
@@ -102,7 +102,8 @@ public class RandomSpell extends LootFunction {
if(tier == Tier.BASIC){ if(tier == Tier.BASIC){
element = Element.values()[random.nextInt(Element.values().length)]; element = Element.values()[random.nextInt(Element.values().length)];
}else{ }else{
element = ArrayUtils.removeElement(Element.values(), Element.MAGIC)[random.nextInt(Element.values().length)]; Element[] elements = ArrayUtils.removeElement(Element.values(), Element.MAGIC);
element = elements[random.nextInt(elements.length)];
} }
}else{ }else{
// In theory, swapping this line to the commented one should make absolutely no difference. // In theory, swapping this line to the commented one should make absolutely no difference.