e.setType(MathHelper.RANDOM.nextInt(5));
/** * Sets the explosion type using an integer. * * @param type The explosion type as an integer. * @return The current Explosion instance. */ public Explosion setType(int type) { this.setType(Type.values()[MathHelper.clamp(type, 0, Type.values().length - 1)]); return this; }