feat: added support for custom Elements
This commit is contained in:
@@ -747,7 +747,8 @@ public class EntityWizard extends EntityCreature implements INpc, IMerchant, ISp
|
||||
textureIndex = this.rand.nextInt(6);
|
||||
|
||||
if(rand.nextBoolean()){
|
||||
this.setElement(Element.values()[rand.nextInt(Element.values().length - 1) + 1]);
|
||||
Element[] elements = (Element[]) Arrays.stream(Element.values()).filter(Element::hasWizards).toArray();
|
||||
this.setElement(elements[rand.nextInt(elements.length - 1) + 1]);
|
||||
}else{
|
||||
this.setElement(Element.MAGIC);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user